@screeps/renderer 1.5.14 → 1.5.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/renderer.js +22 -158
- package/dist/renderer.js.map +1 -1
- package/package.json +45 -45
package/dist/renderer.js
CHANGED
|
@@ -1,188 +1,52 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("renderer",[],e):"object"==typeof exports?exports.renderer=e():t.renderer=e()}(window,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=198)}([function(t,e,r){"use strict";(function(t){e.__esModule=!0,e.loader=e.prepare=e.particles=e.mesh=e.loaders=e.interaction=e.filters=e.extras=e.extract=e.accessibility=void 0;var n=r(94);Object.keys(n).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var i=r(3);Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})});var o=function(t){return t&&t.__esModule?t:{default:t}}(r(155)),a=_(r(156)),s=_(r(158)),u=_(r(73)),l=_(r(168)),c=_(r(175)),h=_(r(177)),f=_(r(181)),d=_(r(186)),p=_(r(191));function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}i.utils.mixins.performMixins();var v=h.shared||null;e.accessibility=a,e.extract=s,e.extras=u,e.filters=l,e.interaction=c,e.loaders=h,e.mesh=f,e.particles=d,e.prepare=p,e.loader=v,"function"==typeof o.default&&(0,o.default)(e),t.PIXI=e}).call(this,r(19))},function(t,e){Object.assign(e,{OK:0,ERR_NOT_OWNER:-1,ERR_NO_PATH:-2,ERR_NAME_EXISTS:-3,ERR_BUSY:-4,ERR_NOT_FOUND:-5,ERR_NOT_ENOUGH_ENERGY:-6,ERR_NOT_ENOUGH_RESOURCES:-6,ERR_INVALID_TARGET:-7,ERR_FULL:-8,ERR_NOT_IN_RANGE:-9,ERR_INVALID_ARGS:-10,ERR_TIRED:-11,ERR_NO_BODYPART:-12,ERR_NOT_ENOUGH_EXTENSIONS:-6,ERR_RCL_NOT_ENOUGH:-14,ERR_GCL_NOT_ENOUGH:-15,FIND_EXIT_TOP:1,FIND_EXIT_RIGHT:3,FIND_EXIT_BOTTOM:5,FIND_EXIT_LEFT:7,FIND_EXIT:10,FIND_CREEPS:101,FIND_MY_CREEPS:102,FIND_HOSTILE_CREEPS:103,FIND_SOURCES_ACTIVE:104,FIND_SOURCES:105,FIND_DROPPED_RESOURCES:106,FIND_STRUCTURES:107,FIND_MY_STRUCTURES:108,FIND_HOSTILE_STRUCTURES:109,FIND_FLAGS:110,FIND_CONSTRUCTION_SITES:111,FIND_MY_SPAWNS:112,FIND_HOSTILE_SPAWNS:113,FIND_MY_CONSTRUCTION_SITES:114,FIND_HOSTILE_CONSTRUCTION_SITES:115,FIND_MINERALS:116,FIND_NUKES:117,FIND_TOMBSTONES:118,FIND_POWER_CREEPS:119,FIND_MY_POWER_CREEPS:120,FIND_HOSTILE_POWER_CREEPS:121,FIND_DEPOSITS:122,FIND_RUINS:123,TOP:1,TOP_RIGHT:2,RIGHT:3,BOTTOM_RIGHT:4,BOTTOM:5,BOTTOM_LEFT:6,LEFT:7,TOP_LEFT:8,COLOR_RED:1,COLOR_PURPLE:2,COLOR_BLUE:3,COLOR_CYAN:4,COLOR_GREEN:5,COLOR_YELLOW:6,COLOR_ORANGE:7,COLOR_BROWN:8,COLOR_GREY:9,COLOR_WHITE:10,LOOK_CREEPS:"creep",LOOK_ENERGY:"energy",LOOK_RESOURCES:"resource",LOOK_SOURCES:"source",LOOK_MINERALS:"mineral",LOOK_DEPOSITS:"deposit",LOOK_STRUCTURES:"structure",LOOK_FLAGS:"flag",LOOK_CONSTRUCTION_SITES:"constructionSite",LOOK_NUKES:"nuke",LOOK_TERRAIN:"terrain",LOOK_TOMBSTONES:"tombstone",LOOK_POWER_CREEPS:"powerCreep",LOOK_RUINS:"ruin",OBSTACLE_OBJECT_TYPES:["spawn","creep","powerCreep","source","mineral","deposit","controller","constructedWall","extension","link","storage","tower","observer","powerSpawn","powerBank","lab","terminal","nuker","factory","invaderCore"],MOVE:"move",WORK:"work",CARRY:"carry",ATTACK:"attack",RANGED_ATTACK:"ranged_attack",TOUGH:"tough",HEAL:"heal",CLAIM:"claim",BODYPART_COST:{move:50,work:100,attack:80,carry:50,heal:250,ranged_attack:150,tough:10,claim:600},WORLD_WIDTH:202,WORLD_HEIGHT:202,CREEP_LIFE_TIME:1500,CREEP_CLAIM_LIFE_TIME:600,CREEP_CORPSE_RATE:.2,CREEP_PART_MAX_ENERGY:125,CARRY_CAPACITY:50,HARVEST_POWER:2,HARVEST_MINERAL_POWER:1,HARVEST_DEPOSIT_POWER:1,REPAIR_POWER:100,DISMANTLE_POWER:50,BUILD_POWER:5,ATTACK_POWER:30,UPGRADE_CONTROLLER_POWER:1,RANGED_ATTACK_POWER:10,HEAL_POWER:12,RANGED_HEAL_POWER:4,REPAIR_COST:.01,DISMANTLE_COST:.005,RAMPART_DECAY_AMOUNT:300,RAMPART_DECAY_TIME:100,RAMPART_HITS:1,RAMPART_HITS_MAX:{2:3e5,3:1e6,4:3e6,5:1e7,6:3e7,7:1e8,8:3e8},ENERGY_REGEN_TIME:300,ENERGY_DECAY:1e3,SPAWN_HITS:5e3,SPAWN_ENERGY_START:300,SPAWN_ENERGY_CAPACITY:300,CREEP_SPAWN_TIME:3,SPAWN_RENEW_RATIO:1.2,SOURCE_ENERGY_CAPACITY:3e3,SOURCE_ENERGY_NEUTRAL_CAPACITY:1500,SOURCE_ENERGY_KEEPER_CAPACITY:4e3,WALL_HITS:1,WALL_HITS_MAX:3e8,EXTENSION_HITS:1e3,EXTENSION_ENERGY_CAPACITY:{0:50,1:50,2:50,3:50,4:50,5:50,6:50,7:100,8:200},ROAD_HITS:5e3,ROAD_WEAROUT:1,ROAD_WEAROUT_POWER_CREEP:100,ROAD_DECAY_AMOUNT:100,ROAD_DECAY_TIME:1e3,LINK_HITS:1e3,LINK_HITS_MAX:1e3,LINK_CAPACITY:800,LINK_COOLDOWN:1,LINK_LOSS_RATIO:.03,STORAGE_CAPACITY:1e6,STORAGE_HITS:1e4,STRUCTURE_SPAWN:"spawn",STRUCTURE_EXTENSION:"extension",STRUCTURE_ROAD:"road",STRUCTURE_WALL:"constructedWall",STRUCTURE_RAMPART:"rampart",STRUCTURE_KEEPER_LAIR:"keeperLair",STRUCTURE_PORTAL:"portal",STRUCTURE_CONTROLLER:"controller",STRUCTURE_LINK:"link",STRUCTURE_STORAGE:"storage",STRUCTURE_TOWER:"tower",STRUCTURE_OBSERVER:"observer",STRUCTURE_POWER_BANK:"powerBank",STRUCTURE_POWER_SPAWN:"powerSpawn",STRUCTURE_EXTRACTOR:"extractor",STRUCTURE_LAB:"lab",STRUCTURE_TERMINAL:"terminal",STRUCTURE_CONTAINER:"container",STRUCTURE_NUKER:"nuker",STRUCTURE_FACTORY:"factory",STRUCTURE_INVADER_CORE:"invaderCore",CONSTRUCTION_COST:{spawn:15e3,extension:3e3,road:300,constructedWall:1,rampart:1,link:5e3,storage:3e4,tower:5e3,observer:8e3,powerSpawn:1e5,extractor:5e3,lab:5e4,terminal:1e5,container:5e3,nuker:1e5,factory:1e5},CONSTRUCTION_COST_ROAD_SWAMP_RATIO:5,CONSTRUCTION_COST_ROAD_WALL_RATIO:150,CONTROLLER_LEVELS:{1:200,2:45e3,3:135e3,4:405e3,5:1215e3,6:3645e3,7:10935e3},CONTROLLER_STRUCTURES:{spawn:{0:0,1:1,2:1,3:1,4:1,5:1,6:1,7:2,8:3},extension:{0:0,1:0,2:5,3:10,4:20,5:30,6:40,7:50,8:60},link:{1:0,2:0,3:0,4:0,5:2,6:3,7:4,8:6},road:{0:2500,1:2500,2:2500,3:2500,4:2500,5:2500,6:2500,7:2500,8:2500},constructedWall:{1:0,2:2500,3:2500,4:2500,5:2500,6:2500,7:2500,8:2500},rampart:{1:0,2:2500,3:2500,4:2500,5:2500,6:2500,7:2500,8:2500},storage:{1:0,2:0,3:0,4:1,5:1,6:1,7:1,8:1},tower:{1:0,2:0,3:1,4:1,5:2,6:2,7:3,8:6},observer:{1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:1},powerSpawn:{1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:1},extractor:{1:0,2:0,3:0,4:0,5:0,6:1,7:1,8:1},terminal:{1:0,2:0,3:0,4:0,5:0,6:1,7:1,8:1},lab:{1:0,2:0,3:0,4:0,5:0,6:3,7:6,8:10},container:{0:5,1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:5},nuker:{1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:1},factory:{1:0,2:0,3:0,4:0,5:0,6:0,7:1,8:1}},CONTROLLER_DOWNGRADE:{1:2e4,2:1e4,3:2e4,4:4e4,5:8e4,6:12e4,7:15e4,8:2e5},CONTROLLER_DOWNGRADE_RESTORE:100,CONTROLLER_DOWNGRADE_SAFEMODE_THRESHOLD:5e3,CONTROLLER_CLAIM_DOWNGRADE:300,CONTROLLER_RESERVE:1,CONTROLLER_RESERVE_MAX:5e3,CONTROLLER_MAX_UPGRADE_PER_TICK:15,CONTROLLER_ATTACK_BLOCKED_UPGRADE:1e3,CONTROLLER_NUKE_BLOCKED_UPGRADE:200,SAFE_MODE_DURATION:2e4,SAFE_MODE_COOLDOWN:5e4,SAFE_MODE_COST:1e3,TOWER_HITS:3e3,TOWER_CAPACITY:1e3,TOWER_ENERGY_COST:10,TOWER_POWER_ATTACK:600,TOWER_POWER_HEAL:400,TOWER_POWER_REPAIR:800,TOWER_OPTIMAL_RANGE:5,TOWER_FALLOFF_RANGE:20,TOWER_FALLOFF:.75,OBSERVER_HITS:500,OBSERVER_RANGE:10,POWER_BANK_HITS:2e6,POWER_BANK_CAPACITY_MAX:5e3,POWER_BANK_CAPACITY_MIN:500,POWER_BANK_CAPACITY_CRIT:.3,POWER_BANK_DECAY:5e3,POWER_BANK_HIT_BACK:.5,POWER_SPAWN_HITS:5e3,POWER_SPAWN_ENERGY_CAPACITY:5e3,POWER_SPAWN_POWER_CAPACITY:100,POWER_SPAWN_ENERGY_RATIO:50,EXTRACTOR_HITS:500,EXTRACTOR_COOLDOWN:5,LAB_HITS:500,LAB_MINERAL_CAPACITY:3e3,LAB_ENERGY_CAPACITY:2e3,LAB_BOOST_ENERGY:20,LAB_BOOST_MINERAL:30,LAB_COOLDOWN:10,LAB_REACTION_AMOUNT:5,LAB_UNBOOST_ENERGY:0,LAB_UNBOOST_MINERAL:15,GCL_POW:2.4,GCL_MULTIPLY:1e6,GCL_NOVICE:3,MODE_SIMULATION:null,MODE_WORLD:null,TERRAIN_MASK_WALL:1,TERRAIN_MASK_SWAMP:2,TERRAIN_MASK_LAVA:4,MAX_CONSTRUCTION_SITES:100,MAX_CREEP_SIZE:50,MINERAL_REGEN_TIME:5e4,MINERAL_MIN_AMOUNT:{H:35e3,O:35e3,L:35e3,K:35e3,Z:35e3,U:35e3,X:35e3},MINERAL_RANDOM_FACTOR:2,MINERAL_DENSITY:{1:15e3,2:35e3,3:7e4,4:1e5},MINERAL_DENSITY_PROBABILITY:{1:.1,2:.5,3:.9,4:1},MINERAL_DENSITY_CHANGE:.05,DENSITY_LOW:1,DENSITY_MODERATE:2,DENSITY_HIGH:3,DENSITY_ULTRA:4,DEPOSIT_EXHAUST_MULTIPLY:.001,DEPOSIT_EXHAUST_POW:1.2,DEPOSIT_DECAY_TIME:5e4,TERMINAL_CAPACITY:3e5,TERMINAL_HITS:3e3,TERMINAL_SEND_COST:.1,TERMINAL_MIN_SEND:100,TERMINAL_COOLDOWN:10,CONTAINER_HITS:25e4,CONTAINER_CAPACITY:2e3,CONTAINER_DECAY:5e3,CONTAINER_DECAY_TIME:100,CONTAINER_DECAY_TIME_OWNED:500,NUKER_HITS:1e3,NUKER_COOLDOWN:1e5,NUKER_ENERGY_CAPACITY:3e5,NUKER_GHODIUM_CAPACITY:5e3,NUKE_LAND_TIME:5e4,NUKE_RANGE:10,NUKE_DAMAGE:{0:1e7,2:5e6},FACTORY_HITS:1e3,FACTORY_CAPACITY:5e4,TOMBSTONE_DECAY_PER_PART:5,TOMBSTONE_DECAY_POWER_CREEP:500,RUIN_DECAY:500,RUIN_DECAY_STRUCTURES:{powerBank:10},PORTAL_DECAY:3e4,ORDER_SELL:"sell",ORDER_BUY:"buy",MARKET_FEE:.05,MARKET_MAX_ORDERS:300,MARKET_ORDER_LIFE_TIME:2592e6,FLAGS_LIMIT:1e4,SUBSCRIPTION_TOKEN:"token",CPU_UNLOCK:"cpuUnlock",PIXEL:"pixel",ACCESS_KEY:"accessKey",PIXEL_CPU_COST:1e4,RESOURCE_ENERGY:"energy",RESOURCE_POWER:"power",RESOURCE_HYDROGEN:"H",RESOURCE_OXYGEN:"O",RESOURCE_UTRIUM:"U",RESOURCE_LEMERGIUM:"L",RESOURCE_KEANIUM:"K",RESOURCE_ZYNTHIUM:"Z",RESOURCE_CATALYST:"X",RESOURCE_GHODIUM:"G",RESOURCE_SILICON:"silicon",RESOURCE_METAL:"metal",RESOURCE_BIOMASS:"biomass",RESOURCE_MIST:"mist",RESOURCE_HYDROXIDE:"OH",RESOURCE_ZYNTHIUM_KEANITE:"ZK",RESOURCE_UTRIUM_LEMERGITE:"UL",RESOURCE_UTRIUM_HYDRIDE:"UH",RESOURCE_UTRIUM_OXIDE:"UO",RESOURCE_KEANIUM_HYDRIDE:"KH",RESOURCE_KEANIUM_OXIDE:"KO",RESOURCE_LEMERGIUM_HYDRIDE:"LH",RESOURCE_LEMERGIUM_OXIDE:"LO",RESOURCE_ZYNTHIUM_HYDRIDE:"ZH",RESOURCE_ZYNTHIUM_OXIDE:"ZO",RESOURCE_GHODIUM_HYDRIDE:"GH",RESOURCE_GHODIUM_OXIDE:"GO",RESOURCE_UTRIUM_ACID:"UH2O",RESOURCE_UTRIUM_ALKALIDE:"UHO2",RESOURCE_KEANIUM_ACID:"KH2O",RESOURCE_KEANIUM_ALKALIDE:"KHO2",RESOURCE_LEMERGIUM_ACID:"LH2O",RESOURCE_LEMERGIUM_ALKALIDE:"LHO2",RESOURCE_ZYNTHIUM_ACID:"ZH2O",RESOURCE_ZYNTHIUM_ALKALIDE:"ZHO2",RESOURCE_GHODIUM_ACID:"GH2O",RESOURCE_GHODIUM_ALKALIDE:"GHO2",RESOURCE_CATALYZED_UTRIUM_ACID:"XUH2O",RESOURCE_CATALYZED_UTRIUM_ALKALIDE:"XUHO2",RESOURCE_CATALYZED_KEANIUM_ACID:"XKH2O",RESOURCE_CATALYZED_KEANIUM_ALKALIDE:"XKHO2",RESOURCE_CATALYZED_LEMERGIUM_ACID:"XLH2O",RESOURCE_CATALYZED_LEMERGIUM_ALKALIDE:"XLHO2",RESOURCE_CATALYZED_ZYNTHIUM_ACID:"XZH2O",RESOURCE_CATALYZED_ZYNTHIUM_ALKALIDE:"XZHO2",RESOURCE_CATALYZED_GHODIUM_ACID:"XGH2O",RESOURCE_CATALYZED_GHODIUM_ALKALIDE:"XGHO2",RESOURCE_OPS:"ops",RESOURCE_UTRIUM_BAR:"utrium_bar",RESOURCE_LEMERGIUM_BAR:"lemergium_bar",RESOURCE_ZYNTHIUM_BAR:"zynthium_bar",RESOURCE_KEANIUM_BAR:"keanium_bar",RESOURCE_GHODIUM_MELT:"ghodium_melt",RESOURCE_OXIDANT:"oxidant",RESOURCE_REDUCTANT:"reductant",RESOURCE_PURIFIER:"purifier",RESOURCE_BATTERY:"battery",RESOURCE_COMPOSITE:"composite",RESOURCE_CRYSTAL:"crystal",RESOURCE_LIQUID:"liquid",RESOURCE_WIRE:"wire",RESOURCE_SWITCH:"switch",RESOURCE_TRANSISTOR:"transistor",RESOURCE_MICROCHIP:"microchip",RESOURCE_CIRCUIT:"circuit",RESOURCE_DEVICE:"device",RESOURCE_CELL:"cell",RESOURCE_PHLEGM:"phlegm",RESOURCE_TISSUE:"tissue",RESOURCE_MUSCLE:"muscle",RESOURCE_ORGANOID:"organoid",RESOURCE_ORGANISM:"organism",RESOURCE_ALLOY:"alloy",RESOURCE_TUBE:"tube",RESOURCE_FIXTURES:"fixtures",RESOURCE_FRAME:"frame",RESOURCE_HYDRAULICS:"hydraulics",RESOURCE_MACHINE:"machine",RESOURCE_CONDENSATE:"condensate",RESOURCE_CONCENTRATE:"concentrate",RESOURCE_EXTRACT:"extract",RESOURCE_SPIRIT:"spirit",RESOURCE_EMANATION:"emanation",RESOURCE_ESSENCE:"essence",REACTIONS:{H:{O:"OH",L:"LH",K:"KH",U:"UH",Z:"ZH",G:"GH"},O:{H:"OH",L:"LO",K:"KO",U:"UO",Z:"ZO",G:"GO"},Z:{K:"ZK",H:"ZH",O:"ZO"},L:{U:"UL",H:"LH",O:"LO"},K:{Z:"ZK",H:"KH",O:"KO"},G:{H:"GH",O:"GO"},U:{L:"UL",H:"UH",O:"UO"},OH:{UH:"UH2O",UO:"UHO2",ZH:"ZH2O",ZO:"ZHO2",KH:"KH2O",KO:"KHO2",LH:"LH2O",LO:"LHO2",GH:"GH2O",GO:"GHO2"},X:{UH2O:"XUH2O",UHO2:"XUHO2",LH2O:"XLH2O",LHO2:"XLHO2",KH2O:"XKH2O",KHO2:"XKHO2",ZH2O:"XZH2O",ZHO2:"XZHO2",GH2O:"XGH2O",GHO2:"XGHO2"},ZK:{UL:"G"},UL:{ZK:"G"},LH:{OH:"LH2O"},ZH:{OH:"ZH2O"},GH:{OH:"GH2O"},KH:{OH:"KH2O"},UH:{OH:"UH2O"},LO:{OH:"LHO2"},ZO:{OH:"ZHO2"},KO:{OH:"KHO2"},UO:{OH:"UHO2"},GO:{OH:"GHO2"},LH2O:{X:"XLH2O"},KH2O:{X:"XKH2O"},ZH2O:{X:"XZH2O"},UH2O:{X:"XUH2O"},GH2O:{X:"XGH2O"},LHO2:{X:"XLHO2"},UHO2:{X:"XUHO2"},KHO2:{X:"XKHO2"},ZHO2:{X:"XZHO2"},GHO2:{X:"XGHO2"}},BOOSTS:{work:{UO:{harvest:3},UHO2:{harvest:5},XUHO2:{harvest:7},LH:{build:1.5,repair:1.5},LH2O:{build:1.8,repair:1.8},XLH2O:{build:2,repair:2},ZH:{dismantle:2},ZH2O:{dismantle:3},XZH2O:{dismantle:4},GH:{upgradeController:1.5},GH2O:{upgradeController:1.8},XGH2O:{upgradeController:2}},attack:{UH:{attack:2},UH2O:{attack:3},XUH2O:{attack:4}},ranged_attack:{KO:{rangedAttack:2,rangedMassAttack:2},KHO2:{rangedAttack:3,rangedMassAttack:3},XKHO2:{rangedAttack:4,rangedMassAttack:4}},heal:{LO:{heal:2,rangedHeal:2},LHO2:{heal:3,rangedHeal:3},XLHO2:{heal:4,rangedHeal:4}},carry:{KH:{capacity:2},KH2O:{capacity:3},XKH2O:{capacity:4}},move:{ZO:{fatigue:2},ZHO2:{fatigue:3},XZHO2:{fatigue:4}},tough:{GO:{damage:.7},GHO2:{damage:.5},XGHO2:{damage:.3}}},REACTION_TIME:{OH:20,ZK:5,UL:5,G:5,UH:10,UH2O:5,XUH2O:60,UO:10,UHO2:5,XUHO2:60,KH:10,KH2O:5,XKH2O:60,KO:10,KHO2:5,XKHO2:60,LH:15,LH2O:10,XLH2O:65,LO:10,LHO2:5,XLHO2:60,ZH:20,ZH2O:40,XZH2O:160,ZO:10,ZHO2:5,XZHO2:60,GH:10,GH2O:15,XGH2O:80,GO:10,GHO2:30,XGHO2:150},PORTAL_UNSTABLE:864e6,PORTAL_MIN_TIMEOUT:10368e5,PORTAL_MAX_TIMEOUT:19008e5,POWER_BANK_RESPAWN_TIME:5e4,INVADERS_ENERGY_GOAL:1e5,SYSTEM_USERNAME:"Screeps",SIGN_NOVICE_AREA:"A new Novice or Respawn Area is being planned somewhere in this sector. Please make sure all important rooms are reserved.",SIGN_RESPAWN_AREA:"A new Novice or Respawn Area is being planned somewhere in this sector. Please make sure all important rooms are reserved.",SIGN_PLANNED_AREA:"A new Novice or Respawn Area is being planned somewhere in this sector. Please make sure all important rooms are reserved.",EVENT_ATTACK:1,EVENT_OBJECT_DESTROYED:2,EVENT_ATTACK_CONTROLLER:3,EVENT_BUILD:4,EVENT_HARVEST:5,EVENT_HEAL:6,EVENT_REPAIR:7,EVENT_RESERVE_CONTROLLER:8,EVENT_UPGRADE_CONTROLLER:9,EVENT_EXIT:10,EVENT_POWER:11,EVENT_TRANSFER:12,EVENT_ATTACK_TYPE_MELEE:1,EVENT_ATTACK_TYPE_RANGED:2,EVENT_ATTACK_TYPE_RANGED_MASS:3,EVENT_ATTACK_TYPE_DISMANTLE:4,EVENT_ATTACK_TYPE_HIT_BACK:5,EVENT_ATTACK_TYPE_NUKE:6,EVENT_HEAL_TYPE_MELEE:1,EVENT_HEAL_TYPE_RANGED:2,POWER_LEVEL_MULTIPLY:1e3,POWER_LEVEL_POW:2,POWER_CREEP_SPAWN_COOLDOWN:288e5,POWER_CREEP_DELETE_COOLDOWN:864e5,POWER_CREEP_MAX_LEVEL:25,POWER_CREEP_LIFE_TIME:5e3,POWER_CLASS:{OPERATOR:"operator"},PWR_GENERATE_OPS:1,PWR_OPERATE_SPAWN:2,PWR_OPERATE_TOWER:3,PWR_OPERATE_STORAGE:4,PWR_OPERATE_LAB:5,PWR_OPERATE_EXTENSION:6,PWR_OPERATE_OBSERVER:7,PWR_OPERATE_TERMINAL:8,PWR_DISRUPT_SPAWN:9,PWR_DISRUPT_TOWER:10,PWR_DISRUPT_SOURCE:11,PWR_SHIELD:12,PWR_REGEN_SOURCE:13,PWR_REGEN_MINERAL:14,PWR_DISRUPT_TERMINAL:15,PWR_OPERATE_POWER:16,PWR_FORTIFY:17,PWR_OPERATE_CONTROLLER:18,PWR_OPERATE_FACTORY:19,EFFECT_INVULNERABILITY:1001,EFFECT_COLLAPSE_TIMER:1002,INVADER_CORE_HITS:1e5,INVADER_CORE_CREEP_SPAWN_TIME:{0:0,1:0,2:6,3:3,4:2,5:1},INVADER_CORE_EXPAND_TIME:{1:4e3,2:3500,3:3e3,4:2500,5:2e3},INVADER_CORE_CONTROLLER_POWER:2,INVADER_CORE_CONTROLLER_DOWNGRADE:5e3,STRONGHOLD_RAMPART_HITS:{0:0,1:1e5,2:2e5,3:5e5,4:1e6,5:2e6},STRONGHOLD_DECAY_TICKS:75e3}),Object.assign(e,{POWER_INFO:{[e.PWR_GENERATE_OPS]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:50,effect:[1,2,4,6,8]},[e.PWR_OPERATE_SPAWN]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:300,duration:1e3,range:3,ops:100,effect:[.9,.7,.5,.35,.2]},[e.PWR_OPERATE_TOWER]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:10,duration:100,range:3,ops:10,effect:[1.1,1.2,1.3,1.4,1.5]},[e.PWR_OPERATE_STORAGE]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:800,duration:1e3,range:3,ops:100,effect:[5e5,1e6,2e6,4e6,7e6]},[e.PWR_OPERATE_LAB]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:50,duration:1e3,range:3,ops:10,effect:[2,4,6,8,10]},[e.PWR_OPERATE_EXTENSION]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:50,range:3,ops:2,effect:[.2,.4,.6,.8,1]},[e.PWR_OPERATE_OBSERVER]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:400,duration:[200,400,600,800,1e3],range:3,ops:10},[e.PWR_OPERATE_TERMINAL]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:500,duration:1e3,range:3,ops:100,effect:[.9,.8,.7,.6,.5]},[e.PWR_DISRUPT_SPAWN]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:5,range:20,ops:10,duration:[1,2,3,4,5]},[e.PWR_DISRUPT_TOWER]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:0,duration:5,range:50,ops:10,effect:[.9,.8,.7,.6,.5]},[e.PWR_DISRUPT_SOURCE]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:100,range:3,ops:100,duration:[100,200,300,400,500]},[e.PWR_SHIELD]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],effect:[5e3,1e4,15e3,2e4,25e3],duration:50,cooldown:20,energy:100},[e.PWR_REGEN_SOURCE]:{className:e.POWER_CLASS.OPERATOR,level:[10,11,12,14,22],cooldown:100,duration:300,range:3,effect:[50,100,150,200,250],period:15},[e.PWR_REGEN_MINERAL]:{className:e.POWER_CLASS.OPERATOR,level:[10,11,12,14,22],cooldown:100,duration:100,range:3,effect:[2,4,6,8,10],period:10},[e.PWR_DISRUPT_TERMINAL]:{className:e.POWER_CLASS.OPERATOR,level:[20,21,22,23,24],cooldown:8,duration:10,range:50,ops:[50,40,30,20,10]},[e.PWR_FORTIFY]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:5,range:3,ops:5,duration:[1,2,3,4,5]},[e.PWR_OPERATE_POWER]:{className:e.POWER_CLASS.OPERATOR,level:[10,11,12,14,22],cooldown:800,range:3,duration:1e3,ops:200,effect:[1,2,3,4,5]},[e.PWR_OPERATE_CONTROLLER]:{className:e.POWER_CLASS.OPERATOR,level:[20,21,22,23,24],cooldown:800,range:3,duration:1e3,ops:200,effect:[10,20,30,40,50]},[e.PWR_OPERATE_FACTORY]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:800,range:3,duration:1e3,ops:100}},BODYPARTS_ALL:[e.MOVE,e.WORK,e.CARRY,e.ATTACK,e.RANGED_ATTACK,e.TOUGH,e.HEAL,e.CLAIM],RESOURCES_ALL:[e.RESOURCE_ENERGY,e.RESOURCE_POWER,e.RESOURCE_HYDROGEN,e.RESOURCE_OXYGEN,e.RESOURCE_UTRIUM,e.RESOURCE_KEANIUM,e.RESOURCE_LEMERGIUM,e.RESOURCE_ZYNTHIUM,e.RESOURCE_CATALYST,e.RESOURCE_GHODIUM,e.RESOURCE_HYDROXIDE,e.RESOURCE_ZYNTHIUM_KEANITE,e.RESOURCE_UTRIUM_LEMERGITE,e.RESOURCE_UTRIUM_HYDRIDE,e.RESOURCE_UTRIUM_OXIDE,e.RESOURCE_KEANIUM_HYDRIDE,e.RESOURCE_KEANIUM_OXIDE,e.RESOURCE_LEMERGIUM_HYDRIDE,e.RESOURCE_LEMERGIUM_OXIDE,e.RESOURCE_ZYNTHIUM_HYDRIDE,e.RESOURCE_ZYNTHIUM_OXIDE,e.RESOURCE_GHODIUM_HYDRIDE,e.RESOURCE_GHODIUM_OXIDE,e.RESOURCE_UTRIUM_ACID,e.RESOURCE_UTRIUM_ALKALIDE,e.RESOURCE_KEANIUM_ACID,e.RESOURCE_KEANIUM_ALKALIDE,e.RESOURCE_LEMERGIUM_ACID,e.RESOURCE_LEMERGIUM_ALKALIDE,e.RESOURCE_ZYNTHIUM_ACID,e.RESOURCE_ZYNTHIUM_ALKALIDE,e.RESOURCE_GHODIUM_ACID,e.RESOURCE_GHODIUM_ALKALIDE,e.RESOURCE_CATALYZED_UTRIUM_ACID,e.RESOURCE_CATALYZED_UTRIUM_ALKALIDE,e.RESOURCE_CATALYZED_KEANIUM_ACID,e.RESOURCE_CATALYZED_KEANIUM_ALKALIDE,e.RESOURCE_CATALYZED_LEMERGIUM_ACID,e.RESOURCE_CATALYZED_LEMERGIUM_ALKALIDE,e.RESOURCE_CATALYZED_ZYNTHIUM_ACID,e.RESOURCE_CATALYZED_ZYNTHIUM_ALKALIDE,e.RESOURCE_CATALYZED_GHODIUM_ACID,e.RESOURCE_CATALYZED_GHODIUM_ALKALIDE,e.RESOURCE_OPS,e.RESOURCE_SILICON,e.RESOURCE_METAL,e.RESOURCE_BIOMASS,e.RESOURCE_MIST,e.RESOURCE_UTRIUM_BAR,e.RESOURCE_LEMERGIUM_BAR,e.RESOURCE_ZYNTHIUM_BAR,e.RESOURCE_KEANIUM_BAR,e.RESOURCE_GHODIUM_MELT,e.RESOURCE_OXIDANT,e.RESOURCE_REDUCTANT,e.RESOURCE_PURIFIER,e.RESOURCE_BATTERY,e.RESOURCE_COMPOSITE,e.RESOURCE_CRYSTAL,e.RESOURCE_LIQUID,e.RESOURCE_WIRE,e.RESOURCE_SWITCH,e.RESOURCE_TRANSISTOR,e.RESOURCE_MICROCHIP,e.RESOURCE_CIRCUIT,e.RESOURCE_DEVICE,e.RESOURCE_CELL,e.RESOURCE_PHLEGM,e.RESOURCE_TISSUE,e.RESOURCE_MUSCLE,e.RESOURCE_ORGANOID,e.RESOURCE_ORGANISM,e.RESOURCE_ALLOY,e.RESOURCE_TUBE,e.RESOURCE_FIXTURES,e.RESOURCE_FRAME,e.RESOURCE_HYDRAULICS,e.RESOURCE_MACHINE,e.RESOURCE_CONDENSATE,e.RESOURCE_CONCENTRATE,e.RESOURCE_EXTRACT,e.RESOURCE_SPIRIT,e.RESOURCE_EMANATION,e.RESOURCE_ESSENCE],COLORS_ALL:[e.COLOR_RED,e.COLOR_PURPLE,e.COLOR_BLUE,e.COLOR_CYAN,e.COLOR_GREEN,e.COLOR_YELLOW,e.COLOR_ORANGE,e.COLOR_BROWN,e.COLOR_GREY,e.COLOR_WHITE],INTERSHARD_RESOURCES:[e.SUBSCRIPTION_TOKEN,e.CPU_UNLOCK,e.PIXEL,e.ACCESS_KEY],COMMODITIES:{[e.RESOURCE_UTRIUM_BAR]:{amount:100,cooldown:20,components:{[e.RESOURCE_UTRIUM]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_UTRIUM]:{amount:500,cooldown:20,components:{[e.RESOURCE_UTRIUM_BAR]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_LEMERGIUM_BAR]:{amount:100,cooldown:20,components:{[e.RESOURCE_LEMERGIUM]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_LEMERGIUM]:{amount:500,cooldown:20,components:{[e.RESOURCE_LEMERGIUM_BAR]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_ZYNTHIUM_BAR]:{amount:100,cooldown:20,components:{[e.RESOURCE_ZYNTHIUM]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_ZYNTHIUM]:{amount:500,cooldown:20,components:{[e.RESOURCE_ZYNTHIUM_BAR]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_KEANIUM_BAR]:{amount:100,cooldown:20,components:{[e.RESOURCE_KEANIUM]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_KEANIUM]:{amount:500,cooldown:20,components:{[e.RESOURCE_KEANIUM_BAR]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_GHODIUM_MELT]:{amount:100,cooldown:20,components:{[e.RESOURCE_GHODIUM]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_GHODIUM]:{amount:500,cooldown:20,components:{[e.RESOURCE_GHODIUM_MELT]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_OXIDANT]:{amount:100,cooldown:20,components:{[e.RESOURCE_OXYGEN]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_OXYGEN]:{amount:500,cooldown:20,components:{[e.RESOURCE_OXIDANT]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_REDUCTANT]:{amount:100,cooldown:20,components:{[e.RESOURCE_HYDROGEN]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_HYDROGEN]:{amount:500,cooldown:20,components:{[e.RESOURCE_REDUCTANT]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_PURIFIER]:{amount:100,cooldown:20,components:{[e.RESOURCE_CATALYST]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_CATALYST]:{amount:500,cooldown:20,components:{[e.RESOURCE_PURIFIER]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_BATTERY]:{amount:50,cooldown:10,components:{[e.RESOURCE_ENERGY]:600}},[e.RESOURCE_ENERGY]:{amount:500,cooldown:10,components:{[e.RESOURCE_BATTERY]:50}},[e.RESOURCE_COMPOSITE]:{level:1,amount:20,cooldown:50,components:{[e.RESOURCE_UTRIUM_BAR]:20,[e.RESOURCE_ZYNTHIUM_BAR]:20,[e.RESOURCE_ENERGY]:20}},[e.RESOURCE_CRYSTAL]:{level:2,amount:6,cooldown:21,components:{[e.RESOURCE_LEMERGIUM_BAR]:6,[e.RESOURCE_KEANIUM_BAR]:6,[e.RESOURCE_PURIFIER]:6,[e.RESOURCE_ENERGY]:45}},[e.RESOURCE_LIQUID]:{level:3,amount:12,cooldown:60,components:{[e.RESOURCE_OXIDANT]:12,[e.RESOURCE_REDUCTANT]:12,[e.RESOURCE_GHODIUM_MELT]:12,[e.RESOURCE_ENERGY]:90}},[e.RESOURCE_WIRE]:{amount:20,cooldown:8,components:{[e.RESOURCE_UTRIUM_BAR]:20,[e.RESOURCE_SILICON]:100,[e.RESOURCE_ENERGY]:40}},[e.RESOURCE_SWITCH]:{level:1,amount:5,cooldown:70,components:{[e.RESOURCE_WIRE]:40,[e.RESOURCE_OXIDANT]:95,[e.RESOURCE_UTRIUM_BAR]:35,[e.RESOURCE_ENERGY]:20}},[e.RESOURCE_TRANSISTOR]:{level:2,amount:1,cooldown:59,components:{[e.RESOURCE_SWITCH]:4,[e.RESOURCE_WIRE]:15,[e.RESOURCE_REDUCTANT]:85,[e.RESOURCE_ENERGY]:8}},[e.RESOURCE_MICROCHIP]:{level:3,amount:1,cooldown:250,components:{[e.RESOURCE_TRANSISTOR]:2,[e.RESOURCE_COMPOSITE]:50,[e.RESOURCE_WIRE]:117,[e.RESOURCE_PURIFIER]:25,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_CIRCUIT]:{level:4,amount:1,cooldown:800,components:{[e.RESOURCE_MICROCHIP]:1,[e.RESOURCE_TRANSISTOR]:5,[e.RESOURCE_SWITCH]:4,[e.RESOURCE_OXIDANT]:115,[e.RESOURCE_ENERGY]:32}},[e.RESOURCE_DEVICE]:{level:5,amount:1,cooldown:600,components:{[e.RESOURCE_CIRCUIT]:1,[e.RESOURCE_MICROCHIP]:3,[e.RESOURCE_CRYSTAL]:110,[e.RESOURCE_GHODIUM_MELT]:150,[e.RESOURCE_ENERGY]:64}},[e.RESOURCE_CELL]:{amount:20,cooldown:8,components:{[e.RESOURCE_LEMERGIUM_BAR]:20,[e.RESOURCE_BIOMASS]:100,[e.RESOURCE_ENERGY]:40}},[e.RESOURCE_PHLEGM]:{level:1,amount:2,cooldown:35,components:{[e.RESOURCE_CELL]:20,[e.RESOURCE_OXIDANT]:36,[e.RESOURCE_LEMERGIUM_BAR]:16,[e.RESOURCE_ENERGY]:8}},[e.RESOURCE_TISSUE]:{level:2,amount:2,cooldown:164,components:{[e.RESOURCE_PHLEGM]:10,[e.RESOURCE_CELL]:10,[e.RESOURCE_REDUCTANT]:110,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_MUSCLE]:{level:3,amount:1,cooldown:250,components:{[e.RESOURCE_TISSUE]:3,[e.RESOURCE_PHLEGM]:3,[e.RESOURCE_ZYNTHIUM_BAR]:50,[e.RESOURCE_REDUCTANT]:50,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_ORGANOID]:{level:4,amount:1,cooldown:800,components:{[e.RESOURCE_MUSCLE]:1,[e.RESOURCE_TISSUE]:5,[e.RESOURCE_PURIFIER]:208,[e.RESOURCE_OXIDANT]:256,[e.RESOURCE_ENERGY]:32}},[e.RESOURCE_ORGANISM]:{level:5,amount:1,cooldown:600,components:{[e.RESOURCE_ORGANOID]:1,[e.RESOURCE_LIQUID]:150,[e.RESOURCE_TISSUE]:6,[e.RESOURCE_CELL]:310,[e.RESOURCE_ENERGY]:64}},[e.RESOURCE_ALLOY]:{amount:20,cooldown:8,components:{[e.RESOURCE_ZYNTHIUM_BAR]:20,[e.RESOURCE_METAL]:100,[e.RESOURCE_ENERGY]:40}},[e.RESOURCE_TUBE]:{level:1,amount:2,cooldown:45,components:{[e.RESOURCE_ALLOY]:40,[e.RESOURCE_ZYNTHIUM_BAR]:16,[e.RESOURCE_ENERGY]:8}},[e.RESOURCE_FIXTURES]:{level:2,amount:1,cooldown:115,components:{[e.RESOURCE_COMPOSITE]:20,[e.RESOURCE_ALLOY]:41,[e.RESOURCE_OXIDANT]:161,[e.RESOURCE_ENERGY]:8}},[e.RESOURCE_FRAME]:{level:3,amount:1,cooldown:125,components:{[e.RESOURCE_FIXTURES]:2,[e.RESOURCE_TUBE]:4,[e.RESOURCE_REDUCTANT]:330,[e.RESOURCE_ZYNTHIUM_BAR]:31,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_HYDRAULICS]:{level:4,amount:1,cooldown:800,components:{[e.RESOURCE_LIQUID]:150,[e.RESOURCE_FIXTURES]:3,[e.RESOURCE_TUBE]:15,[e.RESOURCE_PURIFIER]:208,[e.RESOURCE_ENERGY]:32}},[e.RESOURCE_MACHINE]:{level:5,amount:1,cooldown:600,components:{[e.RESOURCE_HYDRAULICS]:1,[e.RESOURCE_FRAME]:2,[e.RESOURCE_FIXTURES]:3,[e.RESOURCE_TUBE]:12,[e.RESOURCE_ENERGY]:64}},[e.RESOURCE_CONDENSATE]:{amount:20,cooldown:8,components:{[e.RESOURCE_KEANIUM_BAR]:20,[e.RESOURCE_MIST]:100,[e.RESOURCE_ENERGY]:40}},[e.RESOURCE_CONCENTRATE]:{level:1,amount:3,cooldown:41,components:{[e.RESOURCE_CONDENSATE]:30,[e.RESOURCE_KEANIUM_BAR]:15,[e.RESOURCE_REDUCTANT]:54,[e.RESOURCE_ENERGY]:12}},[e.RESOURCE_EXTRACT]:{level:2,amount:2,cooldown:128,components:{[e.RESOURCE_CONCENTRATE]:10,[e.RESOURCE_CONDENSATE]:30,[e.RESOURCE_OXIDANT]:60,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_SPIRIT]:{level:3,amount:1,cooldown:200,components:{[e.RESOURCE_EXTRACT]:2,[e.RESOURCE_CONCENTRATE]:6,[e.RESOURCE_REDUCTANT]:90,[e.RESOURCE_PURIFIER]:20,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_EMANATION]:{level:4,amount:1,cooldown:800,components:{[e.RESOURCE_SPIRIT]:2,[e.RESOURCE_EXTRACT]:2,[e.RESOURCE_CONCENTRATE]:3,[e.RESOURCE_KEANIUM_BAR]:112,[e.RESOURCE_ENERGY]:32}},[e.RESOURCE_ESSENCE]:{level:5,amount:1,cooldown:600,components:{[e.RESOURCE_EMANATION]:1,[e.RESOURCE_SPIRIT]:3,[e.RESOURCE_CRYSTAL]:110,[e.RESOURCE_GHODIUM_MELT]:150,[e.RESOURCE_ENERGY]:64}}}})},function(t,e,r){"use strict";e.__esModule=!0;e.VERSION="4.8.1",e.PI_2=2*Math.PI,e.RAD_TO_DEG=180/Math.PI,e.DEG_TO_RAD=Math.PI/180,e.RENDERER_TYPE={UNKNOWN:0,WEBGL:1,CANVAS:2},e.BLEND_MODES={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,NORMAL_NPM:17,ADD_NPM:18,SCREEN_NPM:19},e.DRAW_MODES={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},e.SCALE_MODES={LINEAR:0,NEAREST:1},e.WRAP_MODES={CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},e.GC_MODES={AUTO:0,MANUAL:1},e.URL_FILE_EXTENSION=/\.(\w{3,4})(?:$|\?|#)/i,e.DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i,e.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},e.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},e.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},e.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},e.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},function(t,e,r){"use strict";e.__esModule=!0,e.autoDetectRenderer=e.Application=e.Filter=e.SpriteMaskFilter=e.Quad=e.RenderTarget=e.ObjectRenderer=e.WebGLManager=e.Shader=e.CanvasRenderTarget=e.TextureUvs=e.VideoBaseTexture=e.BaseRenderTexture=e.RenderTexture=e.BaseTexture=e.TextureMatrix=e.Texture=e.Spritesheet=e.CanvasGraphicsRenderer=e.GraphicsRenderer=e.GraphicsData=e.Graphics=e.TextMetrics=e.TextStyle=e.Text=e.SpriteRenderer=e.CanvasTinter=e.CanvasSpriteRenderer=e.Sprite=e.TransformBase=e.TransformStatic=e.Transform=e.Container=e.DisplayObject=e.Bounds=e.glCore=e.WebGLRenderer=e.CanvasRenderer=e.ticker=e.utils=e.settings=void 0;var n=r(2);Object.keys(n).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var i=r(6);Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})});var o=r(7);Object.defineProperty(e,"glCore",{enumerable:!0,get:function(){return V(o).default}});var a=r(28);Object.defineProperty(e,"Bounds",{enumerable:!0,get:function(){return V(a).default}});var s=r(51);Object.defineProperty(e,"DisplayObject",{enumerable:!0,get:function(){return V(s).default}});var u=r(13);Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return V(u).default}});var l=r(53);Object.defineProperty(e,"Transform",{enumerable:!0,get:function(){return V(l).default}});var c=r(52);Object.defineProperty(e,"TransformStatic",{enumerable:!0,get:function(){return V(c).default}});var h=r(30);Object.defineProperty(e,"TransformBase",{enumerable:!0,get:function(){return V(h).default}});var f=r(32);Object.defineProperty(e,"Sprite",{enumerable:!0,get:function(){return V(f).default}});var d=r(123);Object.defineProperty(e,"CanvasSpriteRenderer",{enumerable:!0,get:function(){return V(d).default}});var p=r(36);Object.defineProperty(e,"CanvasTinter",{enumerable:!0,get:function(){return V(p).default}});var _=r(126);Object.defineProperty(e,"SpriteRenderer",{enumerable:!0,get:function(){return V(_).default}});var v=r(142);Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return V(v).default}});var g=r(67);Object.defineProperty(e,"TextStyle",{enumerable:!0,get:function(){return V(g).default}});var y=r(68);Object.defineProperty(e,"TextMetrics",{enumerable:!0,get:function(){return V(y).default}});var m=r(144);Object.defineProperty(e,"Graphics",{enumerable:!0,get:function(){return V(m).default}});var E=r(69);Object.defineProperty(e,"GraphicsData",{enumerable:!0,get:function(){return V(E).default}});var x=r(146);Object.defineProperty(e,"GraphicsRenderer",{enumerable:!0,get:function(){return V(x).default}});var b=r(153);Object.defineProperty(e,"CanvasGraphicsRenderer",{enumerable:!0,get:function(){return V(b).default}});var T=r(154);Object.defineProperty(e,"Spritesheet",{enumerable:!0,get:function(){return V(T).default}});var R=r(10);Object.defineProperty(e,"Texture",{enumerable:!0,get:function(){return V(R).default}});var O=r(65);Object.defineProperty(e,"TextureMatrix",{enumerable:!0,get:function(){return V(O).default}});var S=r(12);Object.defineProperty(e,"BaseTexture",{enumerable:!0,get:function(){return V(S).default}});var w=r(35);Object.defineProperty(e,"RenderTexture",{enumerable:!0,get:function(){return V(w).default}});var C=r(60);Object.defineProperty(e,"BaseRenderTexture",{enumerable:!0,get:function(){return V(C).default}});var A=r(57);Object.defineProperty(e,"VideoBaseTexture",{enumerable:!0,get:function(){return V(A).default}});var I=r(58);Object.defineProperty(e,"TextureUvs",{enumerable:!0,get:function(){return V(I).default}});var P=r(61);Object.defineProperty(e,"CanvasRenderTarget",{enumerable:!0,get:function(){return V(P).default}});var M=r(16);Object.defineProperty(e,"Shader",{enumerable:!0,get:function(){return V(M).default}});var D=r(15);Object.defineProperty(e,"WebGLManager",{enumerable:!0,get:function(){return V(D).default}});var L=r(20);Object.defineProperty(e,"ObjectRenderer",{enumerable:!0,get:function(){return V(L).default}});var U=r(22);Object.defineProperty(e,"RenderTarget",{enumerable:!0,get:function(){return V(U).default}});var N=r(66);Object.defineProperty(e,"Quad",{enumerable:!0,get:function(){return V(N).default}});var F=r(63);Object.defineProperty(e,"SpriteMaskFilter",{enumerable:!0,get:function(){return V(F).default}});var j=r(64);Object.defineProperty(e,"Filter",{enumerable:!0,get:function(){return V(j).default}});var k=r(70);Object.defineProperty(e,"Application",{enumerable:!0,get:function(){return V(k).default}});var B=r(71);Object.defineProperty(e,"autoDetectRenderer",{enumerable:!0,get:function(){return B.autoDetectRenderer}});var H=z(r(4)),X=z(r(34)),W=V(r(5)),G=V(r(14)),Y=V(r(21));function z(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function V(t){return t&&t.__esModule?t:{default:t}}e.settings=W.default,e.utils=H,e.ticker=X,e.CanvasRenderer=G.default,e.WebGLRenderer=Y.default},function(t,e,r){"use strict";e.__esModule=!0,e.premultiplyBlendMode=e.BaseTextureCache=e.TextureCache=e.earcut=e.mixins=e.pluginTarget=e.EventEmitter=e.removeItems=e.isMobile=void 0,e.uid=function(){return++p},e.hex2rgb=function(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},e.hex2string=function(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)},e.rgb2hex=function(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},e.getResolutionOfUrl=function(t,e){var r=i.default.RETINA_PREFIX.exec(t);if(r)return parseFloat(r[1]);return void 0!==e?e:1},e.decomposeDataUri=function(t){var e=n.DATA_URI.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]};return},e.getUrlFileExtension=function(t){var e=n.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase();return},e.getSvgSize=function(t){var e=n.SVG_SIZE.exec(t),r={};e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7])));return r},e.skipHello=function(){_=!0},e.sayHello=function(t){if(_)return;if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c PixiJS "+n.VERSION+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("PixiJS "+n.VERSION+" - "+t+" - http://www.pixijs.com/");_=!0},e.isWebGLSupported=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),n=!(!r||!r.getContextAttributes().stencil);if(r){var i=r.getExtension("WEBGL_lose_context");i&&i.loseContext()}return r=null,n}catch(t){return!1}},e.sign=function(t){return 0===t?0:t<0?-1:1},e.destroyTextureCache=function(){var t=void 0;for(t in v)v[t].destroy();for(t in g)g[t].destroy()},e.clearTextureCache=function(){var t=void 0;for(t in v)delete v[t];for(t in g)delete g[t]},e.correctBlendMode=function(t,e){return y[e?1:0][t]},e.premultiplyTint=function(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,n=t>>8&255,i=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((n=n*e+.5|0)<<8)+(i=i*e+.5|0)},e.premultiplyRgba=function(t,e,r,n){r=r||new Float32Array(4),n||void 0===n?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]);return r[3]=e,r},e.premultiplyTintToRgba=function(t,e,r,n){(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(n||void 0===n)&&(r[0]*=e,r[1]*=e,r[2]*=e);return r[3]=e,r};var n=r(2),i=d(r(5)),o=d(r(11)),a=d(r(112)),s=f(r(113)),u=f(r(29)),l=d(r(114)),c=d(r(115)),h=d(r(31));function f(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function d(t){return t&&t.__esModule?t:{default:t}}var p=0,_=!1;e.isMobile=u,e.removeItems=l.default,e.EventEmitter=o.default,e.pluginTarget=a.default,e.mixins=s,e.earcut=h.default;var v=e.TextureCache=Object.create(null),g=e.BaseTextureCache=Object.create(null);var y=e.premultiplyBlendMode=(0,c.default)()},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(110)),i=o(r(111));function o(t){return t&&t.__esModule?t:{default:t}}e.default={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:(0,n.default)(32),SPRITE_BATCH_SIZE:4096,RETINA_PREFIX:/@([0-9\.]+)x/,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1,width:800,height:600,legacy:!1},TRANSFORM_MODE:0,GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:0,SCALE_MODE:0,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:"mediump",CAN_UPLOAD_SAME_BUFFER:(0,i.default)(),MESH_CANVAS_PADDING:0}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(24);Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return f(n).default}});var i=r(40);Object.defineProperty(e,"ObservablePoint",{enumerable:!0,get:function(){return f(i).default}});var o=r(25);Object.defineProperty(e,"Matrix",{enumerable:!0,get:function(){return f(o).default}});var a=r(41);Object.defineProperty(e,"GroupD8",{enumerable:!0,get:function(){return f(a).default}});var s=r(100);Object.defineProperty(e,"Circle",{enumerable:!0,get:function(){return f(s).default}});var u=r(101);Object.defineProperty(e,"Ellipse",{enumerable:!0,get:function(){return f(u).default}});var l=r(102);Object.defineProperty(e,"Polygon",{enumerable:!0,get:function(){return f(l).default}});var c=r(26);Object.defineProperty(e,"Rectangle",{enumerable:!0,get:function(){return f(c).default}});var h=r(103);function f(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"RoundedRectangle",{enumerable:!0,get:function(){return f(h).default}})},function(t,e,r){var n={createContext:r(104),setVertexAttribArrays:r(42),GLBuffer:r(105),GLFramebuffer:r(106),GLShader:r(107),GLTexture:r(43),VertexArrayObject:r(108),shader:r(109)};void 0!==t&&t.exports&&(t.exports=n),"undefined"!=typeof window&&(window.PIXI=window.PIXI||{},window.PIXI.glCore=n)},function(t,e,r){(function(t,n){var i;
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("renderer",[],e):"object"==typeof exports?exports.renderer=e():t.renderer=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=198)}([function(t,e,r){"use strict";(function(t){e.__esModule=!0,e.loader=e.prepare=e.particles=e.mesh=e.loaders=e.interaction=e.filters=e.extras=e.extract=e.accessibility=void 0;var n=r(94);Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})}));var i=r(3);Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})}));var o,a=r(155),s=(o=a)&&o.__esModule?o:{default:o},u=g(r(156)),l=g(r(158)),c=g(r(73)),h=g(r(168)),f=g(r(175)),d=g(r(177)),p=g(r(181)),v=g(r(186)),_=g(r(191));function g(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}i.utils.mixins.performMixins();var y=d.shared||null;e.accessibility=u,e.extract=l,e.extras=c,e.filters=h,e.interaction=f,e.loaders=d,e.mesh=p,e.particles=v,e.prepare=_,e.loader=y,"function"==typeof s.default&&(0,s.default)(e),t.PIXI=e}).call(this,r(19))},function(t,e){Object.assign(e,{OK:0,ERR_NOT_OWNER:-1,ERR_NO_PATH:-2,ERR_NAME_EXISTS:-3,ERR_BUSY:-4,ERR_NOT_FOUND:-5,ERR_NOT_ENOUGH_ENERGY:-6,ERR_NOT_ENOUGH_RESOURCES:-6,ERR_INVALID_TARGET:-7,ERR_FULL:-8,ERR_NOT_IN_RANGE:-9,ERR_INVALID_ARGS:-10,ERR_TIRED:-11,ERR_NO_BODYPART:-12,ERR_NOT_ENOUGH_EXTENSIONS:-6,ERR_RCL_NOT_ENOUGH:-14,ERR_GCL_NOT_ENOUGH:-15,FIND_EXIT_TOP:1,FIND_EXIT_RIGHT:3,FIND_EXIT_BOTTOM:5,FIND_EXIT_LEFT:7,FIND_EXIT:10,FIND_CREEPS:101,FIND_MY_CREEPS:102,FIND_HOSTILE_CREEPS:103,FIND_SOURCES_ACTIVE:104,FIND_SOURCES:105,FIND_DROPPED_RESOURCES:106,FIND_STRUCTURES:107,FIND_MY_STRUCTURES:108,FIND_HOSTILE_STRUCTURES:109,FIND_FLAGS:110,FIND_CONSTRUCTION_SITES:111,FIND_MY_SPAWNS:112,FIND_HOSTILE_SPAWNS:113,FIND_MY_CONSTRUCTION_SITES:114,FIND_HOSTILE_CONSTRUCTION_SITES:115,FIND_MINERALS:116,FIND_NUKES:117,FIND_TOMBSTONES:118,FIND_POWER_CREEPS:119,FIND_MY_POWER_CREEPS:120,FIND_HOSTILE_POWER_CREEPS:121,FIND_DEPOSITS:122,FIND_RUINS:123,TOP:1,TOP_RIGHT:2,RIGHT:3,BOTTOM_RIGHT:4,BOTTOM:5,BOTTOM_LEFT:6,LEFT:7,TOP_LEFT:8,COLOR_RED:1,COLOR_PURPLE:2,COLOR_BLUE:3,COLOR_CYAN:4,COLOR_GREEN:5,COLOR_YELLOW:6,COLOR_ORANGE:7,COLOR_BROWN:8,COLOR_GREY:9,COLOR_WHITE:10,LOOK_CREEPS:"creep",LOOK_ENERGY:"energy",LOOK_RESOURCES:"resource",LOOK_SOURCES:"source",LOOK_MINERALS:"mineral",LOOK_DEPOSITS:"deposit",LOOK_STRUCTURES:"structure",LOOK_FLAGS:"flag",LOOK_CONSTRUCTION_SITES:"constructionSite",LOOK_NUKES:"nuke",LOOK_TERRAIN:"terrain",LOOK_TOMBSTONES:"tombstone",LOOK_POWER_CREEPS:"powerCreep",LOOK_RUINS:"ruin",OBSTACLE_OBJECT_TYPES:["spawn","creep","powerCreep","source","mineral","deposit","controller","constructedWall","extension","link","storage","tower","observer","powerSpawn","powerBank","lab","terminal","nuker","factory","invaderCore"],MOVE:"move",WORK:"work",CARRY:"carry",ATTACK:"attack",RANGED_ATTACK:"ranged_attack",TOUGH:"tough",HEAL:"heal",CLAIM:"claim",BODYPART_COST:{move:50,work:100,attack:80,carry:50,heal:250,ranged_attack:150,tough:10,claim:600},WORLD_WIDTH:202,WORLD_HEIGHT:202,CREEP_LIFE_TIME:1500,CREEP_CLAIM_LIFE_TIME:600,CREEP_CORPSE_RATE:.2,CREEP_PART_MAX_ENERGY:125,CARRY_CAPACITY:50,HARVEST_POWER:2,HARVEST_MINERAL_POWER:1,HARVEST_DEPOSIT_POWER:1,REPAIR_POWER:100,DISMANTLE_POWER:50,BUILD_POWER:5,ATTACK_POWER:30,UPGRADE_CONTROLLER_POWER:1,RANGED_ATTACK_POWER:10,HEAL_POWER:12,RANGED_HEAL_POWER:4,REPAIR_COST:.01,DISMANTLE_COST:.005,RAMPART_DECAY_AMOUNT:300,RAMPART_DECAY_TIME:100,RAMPART_HITS:1,RAMPART_HITS_MAX:{2:3e5,3:1e6,4:3e6,5:1e7,6:3e7,7:1e8,8:3e8},ENERGY_REGEN_TIME:300,ENERGY_DECAY:1e3,SPAWN_HITS:5e3,SPAWN_ENERGY_START:300,SPAWN_ENERGY_CAPACITY:300,CREEP_SPAWN_TIME:3,SPAWN_RENEW_RATIO:1.2,SOURCE_ENERGY_CAPACITY:3e3,SOURCE_ENERGY_NEUTRAL_CAPACITY:1500,SOURCE_ENERGY_KEEPER_CAPACITY:4e3,WALL_HITS:1,WALL_HITS_MAX:3e8,EXTENSION_HITS:1e3,EXTENSION_ENERGY_CAPACITY:{0:50,1:50,2:50,3:50,4:50,5:50,6:50,7:100,8:200},ROAD_HITS:5e3,ROAD_WEAROUT:1,ROAD_WEAROUT_POWER_CREEP:100,ROAD_DECAY_AMOUNT:100,ROAD_DECAY_TIME:1e3,LINK_HITS:1e3,LINK_HITS_MAX:1e3,LINK_CAPACITY:800,LINK_COOLDOWN:1,LINK_LOSS_RATIO:.03,STORAGE_CAPACITY:1e6,STORAGE_HITS:1e4,STRUCTURE_SPAWN:"spawn",STRUCTURE_EXTENSION:"extension",STRUCTURE_ROAD:"road",STRUCTURE_WALL:"constructedWall",STRUCTURE_RAMPART:"rampart",STRUCTURE_KEEPER_LAIR:"keeperLair",STRUCTURE_PORTAL:"portal",STRUCTURE_CONTROLLER:"controller",STRUCTURE_LINK:"link",STRUCTURE_STORAGE:"storage",STRUCTURE_TOWER:"tower",STRUCTURE_OBSERVER:"observer",STRUCTURE_POWER_BANK:"powerBank",STRUCTURE_POWER_SPAWN:"powerSpawn",STRUCTURE_EXTRACTOR:"extractor",STRUCTURE_LAB:"lab",STRUCTURE_TERMINAL:"terminal",STRUCTURE_CONTAINER:"container",STRUCTURE_NUKER:"nuker",STRUCTURE_FACTORY:"factory",STRUCTURE_INVADER_CORE:"invaderCore",CONSTRUCTION_COST:{spawn:15e3,extension:3e3,road:300,constructedWall:1,rampart:1,link:5e3,storage:3e4,tower:5e3,observer:8e3,powerSpawn:1e5,extractor:5e3,lab:5e4,terminal:1e5,container:5e3,nuker:1e5,factory:1e5},CONSTRUCTION_COST_ROAD_SWAMP_RATIO:5,CONSTRUCTION_COST_ROAD_WALL_RATIO:150,CONTROLLER_LEVELS:{1:200,2:45e3,3:135e3,4:405e3,5:1215e3,6:3645e3,7:10935e3},CONTROLLER_STRUCTURES:{spawn:{0:0,1:1,2:1,3:1,4:1,5:1,6:1,7:2,8:3},extension:{0:0,1:0,2:5,3:10,4:20,5:30,6:40,7:50,8:60},link:{1:0,2:0,3:0,4:0,5:2,6:3,7:4,8:6},road:{0:2500,1:2500,2:2500,3:2500,4:2500,5:2500,6:2500,7:2500,8:2500},constructedWall:{1:0,2:2500,3:2500,4:2500,5:2500,6:2500,7:2500,8:2500},rampart:{1:0,2:2500,3:2500,4:2500,5:2500,6:2500,7:2500,8:2500},storage:{1:0,2:0,3:0,4:1,5:1,6:1,7:1,8:1},tower:{1:0,2:0,3:1,4:1,5:2,6:2,7:3,8:6},observer:{1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:1},powerSpawn:{1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:1},extractor:{1:0,2:0,3:0,4:0,5:0,6:1,7:1,8:1},terminal:{1:0,2:0,3:0,4:0,5:0,6:1,7:1,8:1},lab:{1:0,2:0,3:0,4:0,5:0,6:3,7:6,8:10},container:{0:5,1:5,2:5,3:5,4:5,5:5,6:5,7:5,8:5},nuker:{1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:1},factory:{1:0,2:0,3:0,4:0,5:0,6:0,7:1,8:1}},CONTROLLER_DOWNGRADE:{1:2e4,2:1e4,3:2e4,4:4e4,5:8e4,6:12e4,7:15e4,8:2e5},CONTROLLER_DOWNGRADE_RESTORE:100,CONTROLLER_DOWNGRADE_SAFEMODE_THRESHOLD:5e3,CONTROLLER_CLAIM_DOWNGRADE:300,CONTROLLER_RESERVE:1,CONTROLLER_RESERVE_MAX:5e3,CONTROLLER_MAX_UPGRADE_PER_TICK:15,CONTROLLER_ATTACK_BLOCKED_UPGRADE:1e3,CONTROLLER_NUKE_BLOCKED_UPGRADE:200,SAFE_MODE_DURATION:2e4,SAFE_MODE_COOLDOWN:5e4,SAFE_MODE_COST:1e3,TOWER_HITS:3e3,TOWER_CAPACITY:1e3,TOWER_ENERGY_COST:10,TOWER_POWER_ATTACK:600,TOWER_POWER_HEAL:400,TOWER_POWER_REPAIR:800,TOWER_OPTIMAL_RANGE:5,TOWER_FALLOFF_RANGE:20,TOWER_FALLOFF:.75,OBSERVER_HITS:500,OBSERVER_RANGE:10,POWER_BANK_HITS:2e6,POWER_BANK_CAPACITY_MAX:5e3,POWER_BANK_CAPACITY_MIN:500,POWER_BANK_CAPACITY_CRIT:.3,POWER_BANK_DECAY:5e3,POWER_BANK_HIT_BACK:.5,POWER_SPAWN_HITS:5e3,POWER_SPAWN_ENERGY_CAPACITY:5e3,POWER_SPAWN_POWER_CAPACITY:100,POWER_SPAWN_ENERGY_RATIO:50,EXTRACTOR_HITS:500,EXTRACTOR_COOLDOWN:5,LAB_HITS:500,LAB_MINERAL_CAPACITY:3e3,LAB_ENERGY_CAPACITY:2e3,LAB_BOOST_ENERGY:20,LAB_BOOST_MINERAL:30,LAB_COOLDOWN:10,LAB_REACTION_AMOUNT:5,LAB_UNBOOST_ENERGY:0,LAB_UNBOOST_MINERAL:15,GCL_POW:2.4,GCL_MULTIPLY:1e6,GCL_NOVICE:3,MODE_SIMULATION:null,MODE_WORLD:null,TERRAIN_MASK_WALL:1,TERRAIN_MASK_SWAMP:2,TERRAIN_MASK_LAVA:4,MAX_CONSTRUCTION_SITES:100,MAX_CREEP_SIZE:50,MINERAL_REGEN_TIME:5e4,MINERAL_MIN_AMOUNT:{H:35e3,O:35e3,L:35e3,K:35e3,Z:35e3,U:35e3,X:35e3},MINERAL_RANDOM_FACTOR:2,MINERAL_DENSITY:{1:15e3,2:35e3,3:7e4,4:1e5},MINERAL_DENSITY_PROBABILITY:{1:.1,2:.5,3:.9,4:1},MINERAL_DENSITY_CHANGE:.05,DENSITY_LOW:1,DENSITY_MODERATE:2,DENSITY_HIGH:3,DENSITY_ULTRA:4,DEPOSIT_EXHAUST_MULTIPLY:.001,DEPOSIT_EXHAUST_POW:1.2,DEPOSIT_DECAY_TIME:5e4,TERMINAL_CAPACITY:3e5,TERMINAL_HITS:3e3,TERMINAL_SEND_COST:.1,TERMINAL_MIN_SEND:100,TERMINAL_COOLDOWN:10,CONTAINER_HITS:25e4,CONTAINER_CAPACITY:2e3,CONTAINER_DECAY:5e3,CONTAINER_DECAY_TIME:100,CONTAINER_DECAY_TIME_OWNED:500,NUKER_HITS:1e3,NUKER_COOLDOWN:1e5,NUKER_ENERGY_CAPACITY:3e5,NUKER_GHODIUM_CAPACITY:5e3,NUKE_LAND_TIME:5e4,NUKE_RANGE:10,NUKE_DAMAGE:{0:1e7,2:5e6},FACTORY_HITS:1e3,FACTORY_CAPACITY:5e4,TOMBSTONE_DECAY_PER_PART:5,TOMBSTONE_DECAY_POWER_CREEP:500,RUIN_DECAY:500,RUIN_DECAY_STRUCTURES:{powerBank:10},PORTAL_DECAY:3e4,ORDER_SELL:"sell",ORDER_BUY:"buy",MARKET_FEE:.05,MARKET_MAX_ORDERS:300,MARKET_ORDER_LIFE_TIME:2592e6,FLAGS_LIMIT:1e4,SUBSCRIPTION_TOKEN:"token",CPU_UNLOCK:"cpuUnlock",PIXEL:"pixel",ACCESS_KEY:"accessKey",PIXEL_CPU_COST:1e4,RESOURCE_ENERGY:"energy",RESOURCE_POWER:"power",RESOURCE_HYDROGEN:"H",RESOURCE_OXYGEN:"O",RESOURCE_UTRIUM:"U",RESOURCE_LEMERGIUM:"L",RESOURCE_KEANIUM:"K",RESOURCE_ZYNTHIUM:"Z",RESOURCE_CATALYST:"X",RESOURCE_GHODIUM:"G",RESOURCE_SILICON:"silicon",RESOURCE_METAL:"metal",RESOURCE_BIOMASS:"biomass",RESOURCE_MIST:"mist",RESOURCE_HYDROXIDE:"OH",RESOURCE_ZYNTHIUM_KEANITE:"ZK",RESOURCE_UTRIUM_LEMERGITE:"UL",RESOURCE_UTRIUM_HYDRIDE:"UH",RESOURCE_UTRIUM_OXIDE:"UO",RESOURCE_KEANIUM_HYDRIDE:"KH",RESOURCE_KEANIUM_OXIDE:"KO",RESOURCE_LEMERGIUM_HYDRIDE:"LH",RESOURCE_LEMERGIUM_OXIDE:"LO",RESOURCE_ZYNTHIUM_HYDRIDE:"ZH",RESOURCE_ZYNTHIUM_OXIDE:"ZO",RESOURCE_GHODIUM_HYDRIDE:"GH",RESOURCE_GHODIUM_OXIDE:"GO",RESOURCE_UTRIUM_ACID:"UH2O",RESOURCE_UTRIUM_ALKALIDE:"UHO2",RESOURCE_KEANIUM_ACID:"KH2O",RESOURCE_KEANIUM_ALKALIDE:"KHO2",RESOURCE_LEMERGIUM_ACID:"LH2O",RESOURCE_LEMERGIUM_ALKALIDE:"LHO2",RESOURCE_ZYNTHIUM_ACID:"ZH2O",RESOURCE_ZYNTHIUM_ALKALIDE:"ZHO2",RESOURCE_GHODIUM_ACID:"GH2O",RESOURCE_GHODIUM_ALKALIDE:"GHO2",RESOURCE_CATALYZED_UTRIUM_ACID:"XUH2O",RESOURCE_CATALYZED_UTRIUM_ALKALIDE:"XUHO2",RESOURCE_CATALYZED_KEANIUM_ACID:"XKH2O",RESOURCE_CATALYZED_KEANIUM_ALKALIDE:"XKHO2",RESOURCE_CATALYZED_LEMERGIUM_ACID:"XLH2O",RESOURCE_CATALYZED_LEMERGIUM_ALKALIDE:"XLHO2",RESOURCE_CATALYZED_ZYNTHIUM_ACID:"XZH2O",RESOURCE_CATALYZED_ZYNTHIUM_ALKALIDE:"XZHO2",RESOURCE_CATALYZED_GHODIUM_ACID:"XGH2O",RESOURCE_CATALYZED_GHODIUM_ALKALIDE:"XGHO2",RESOURCE_OPS:"ops",RESOURCE_UTRIUM_BAR:"utrium_bar",RESOURCE_LEMERGIUM_BAR:"lemergium_bar",RESOURCE_ZYNTHIUM_BAR:"zynthium_bar",RESOURCE_KEANIUM_BAR:"keanium_bar",RESOURCE_GHODIUM_MELT:"ghodium_melt",RESOURCE_OXIDANT:"oxidant",RESOURCE_REDUCTANT:"reductant",RESOURCE_PURIFIER:"purifier",RESOURCE_BATTERY:"battery",RESOURCE_COMPOSITE:"composite",RESOURCE_CRYSTAL:"crystal",RESOURCE_LIQUID:"liquid",RESOURCE_WIRE:"wire",RESOURCE_SWITCH:"switch",RESOURCE_TRANSISTOR:"transistor",RESOURCE_MICROCHIP:"microchip",RESOURCE_CIRCUIT:"circuit",RESOURCE_DEVICE:"device",RESOURCE_CELL:"cell",RESOURCE_PHLEGM:"phlegm",RESOURCE_TISSUE:"tissue",RESOURCE_MUSCLE:"muscle",RESOURCE_ORGANOID:"organoid",RESOURCE_ORGANISM:"organism",RESOURCE_ALLOY:"alloy",RESOURCE_TUBE:"tube",RESOURCE_FIXTURES:"fixtures",RESOURCE_FRAME:"frame",RESOURCE_HYDRAULICS:"hydraulics",RESOURCE_MACHINE:"machine",RESOURCE_CONDENSATE:"condensate",RESOURCE_CONCENTRATE:"concentrate",RESOURCE_EXTRACT:"extract",RESOURCE_SPIRIT:"spirit",RESOURCE_EMANATION:"emanation",RESOURCE_ESSENCE:"essence",REACTIONS:{H:{O:"OH",L:"LH",K:"KH",U:"UH",Z:"ZH",G:"GH"},O:{H:"OH",L:"LO",K:"KO",U:"UO",Z:"ZO",G:"GO"},Z:{K:"ZK",H:"ZH",O:"ZO"},L:{U:"UL",H:"LH",O:"LO"},K:{Z:"ZK",H:"KH",O:"KO"},G:{H:"GH",O:"GO"},U:{L:"UL",H:"UH",O:"UO"},OH:{UH:"UH2O",UO:"UHO2",ZH:"ZH2O",ZO:"ZHO2",KH:"KH2O",KO:"KHO2",LH:"LH2O",LO:"LHO2",GH:"GH2O",GO:"GHO2"},X:{UH2O:"XUH2O",UHO2:"XUHO2",LH2O:"XLH2O",LHO2:"XLHO2",KH2O:"XKH2O",KHO2:"XKHO2",ZH2O:"XZH2O",ZHO2:"XZHO2",GH2O:"XGH2O",GHO2:"XGHO2"},ZK:{UL:"G"},UL:{ZK:"G"},LH:{OH:"LH2O"},ZH:{OH:"ZH2O"},GH:{OH:"GH2O"},KH:{OH:"KH2O"},UH:{OH:"UH2O"},LO:{OH:"LHO2"},ZO:{OH:"ZHO2"},KO:{OH:"KHO2"},UO:{OH:"UHO2"},GO:{OH:"GHO2"},LH2O:{X:"XLH2O"},KH2O:{X:"XKH2O"},ZH2O:{X:"XZH2O"},UH2O:{X:"XUH2O"},GH2O:{X:"XGH2O"},LHO2:{X:"XLHO2"},UHO2:{X:"XUHO2"},KHO2:{X:"XKHO2"},ZHO2:{X:"XZHO2"},GHO2:{X:"XGHO2"}},BOOSTS:{work:{UO:{harvest:3},UHO2:{harvest:5},XUHO2:{harvest:7},LH:{build:1.5,repair:1.5},LH2O:{build:1.8,repair:1.8},XLH2O:{build:2,repair:2},ZH:{dismantle:2},ZH2O:{dismantle:3},XZH2O:{dismantle:4},GH:{upgradeController:1.5},GH2O:{upgradeController:1.8},XGH2O:{upgradeController:2}},attack:{UH:{attack:2},UH2O:{attack:3},XUH2O:{attack:4}},ranged_attack:{KO:{rangedAttack:2,rangedMassAttack:2},KHO2:{rangedAttack:3,rangedMassAttack:3},XKHO2:{rangedAttack:4,rangedMassAttack:4}},heal:{LO:{heal:2,rangedHeal:2},LHO2:{heal:3,rangedHeal:3},XLHO2:{heal:4,rangedHeal:4}},carry:{KH:{capacity:2},KH2O:{capacity:3},XKH2O:{capacity:4}},move:{ZO:{fatigue:2},ZHO2:{fatigue:3},XZHO2:{fatigue:4}},tough:{GO:{damage:.7},GHO2:{damage:.5},XGHO2:{damage:.3}}},REACTION_TIME:{OH:20,ZK:5,UL:5,G:5,UH:10,UH2O:5,XUH2O:60,UO:10,UHO2:5,XUHO2:60,KH:10,KH2O:5,XKH2O:60,KO:10,KHO2:5,XKHO2:60,LH:15,LH2O:10,XLH2O:65,LO:10,LHO2:5,XLHO2:60,ZH:20,ZH2O:40,XZH2O:160,ZO:10,ZHO2:5,XZHO2:60,GH:10,GH2O:15,XGH2O:80,GO:10,GHO2:30,XGHO2:150},PORTAL_UNSTABLE:864e6,PORTAL_MIN_TIMEOUT:10368e5,PORTAL_MAX_TIMEOUT:19008e5,POWER_BANK_RESPAWN_TIME:5e4,INVADERS_ENERGY_GOAL:1e5,SYSTEM_USERNAME:"Screeps",SIGN_NOVICE_AREA:"A new Novice or Respawn Area is being planned somewhere in this sector. Please make sure all important rooms are reserved.",SIGN_RESPAWN_AREA:"A new Novice or Respawn Area is being planned somewhere in this sector. Please make sure all important rooms are reserved.",SIGN_PLANNED_AREA:"A new Novice or Respawn Area is being planned somewhere in this sector. Please make sure all important rooms are reserved.",EVENT_ATTACK:1,EVENT_OBJECT_DESTROYED:2,EVENT_ATTACK_CONTROLLER:3,EVENT_BUILD:4,EVENT_HARVEST:5,EVENT_HEAL:6,EVENT_REPAIR:7,EVENT_RESERVE_CONTROLLER:8,EVENT_UPGRADE_CONTROLLER:9,EVENT_EXIT:10,EVENT_POWER:11,EVENT_TRANSFER:12,EVENT_ATTACK_TYPE_MELEE:1,EVENT_ATTACK_TYPE_RANGED:2,EVENT_ATTACK_TYPE_RANGED_MASS:3,EVENT_ATTACK_TYPE_DISMANTLE:4,EVENT_ATTACK_TYPE_HIT_BACK:5,EVENT_ATTACK_TYPE_NUKE:6,EVENT_HEAL_TYPE_MELEE:1,EVENT_HEAL_TYPE_RANGED:2,POWER_LEVEL_MULTIPLY:1e3,POWER_LEVEL_POW:2,POWER_CREEP_SPAWN_COOLDOWN:288e5,POWER_CREEP_DELETE_COOLDOWN:864e5,POWER_CREEP_MAX_LEVEL:25,POWER_CREEP_LIFE_TIME:5e3,POWER_CLASS:{OPERATOR:"operator"},PWR_GENERATE_OPS:1,PWR_OPERATE_SPAWN:2,PWR_OPERATE_TOWER:3,PWR_OPERATE_STORAGE:4,PWR_OPERATE_LAB:5,PWR_OPERATE_EXTENSION:6,PWR_OPERATE_OBSERVER:7,PWR_OPERATE_TERMINAL:8,PWR_DISRUPT_SPAWN:9,PWR_DISRUPT_TOWER:10,PWR_DISRUPT_SOURCE:11,PWR_SHIELD:12,PWR_REGEN_SOURCE:13,PWR_REGEN_MINERAL:14,PWR_DISRUPT_TERMINAL:15,PWR_OPERATE_POWER:16,PWR_FORTIFY:17,PWR_OPERATE_CONTROLLER:18,PWR_OPERATE_FACTORY:19,EFFECT_INVULNERABILITY:1001,EFFECT_COLLAPSE_TIMER:1002,INVADER_CORE_HITS:1e5,INVADER_CORE_CREEP_SPAWN_TIME:{0:0,1:0,2:6,3:3,4:2,5:1},INVADER_CORE_EXPAND_TIME:{1:4e3,2:3500,3:3e3,4:2500,5:2e3},INVADER_CORE_CONTROLLER_POWER:2,INVADER_CORE_CONTROLLER_DOWNGRADE:5e3,STRONGHOLD_RAMPART_HITS:{0:0,1:1e5,2:2e5,3:5e5,4:1e6,5:2e6},STRONGHOLD_DECAY_TICKS:75e3}),Object.assign(e,{POWER_INFO:{[e.PWR_GENERATE_OPS]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:50,effect:[1,2,4,6,8]},[e.PWR_OPERATE_SPAWN]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:300,duration:1e3,range:3,ops:100,effect:[.9,.7,.5,.35,.2]},[e.PWR_OPERATE_TOWER]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:10,duration:100,range:3,ops:10,effect:[1.1,1.2,1.3,1.4,1.5]},[e.PWR_OPERATE_STORAGE]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:800,duration:1e3,range:3,ops:100,effect:[5e5,1e6,2e6,4e6,7e6]},[e.PWR_OPERATE_LAB]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:50,duration:1e3,range:3,ops:10,effect:[2,4,6,8,10]},[e.PWR_OPERATE_EXTENSION]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:50,range:3,ops:2,effect:[.2,.4,.6,.8,1]},[e.PWR_OPERATE_OBSERVER]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:400,duration:[200,400,600,800,1e3],range:3,ops:10},[e.PWR_OPERATE_TERMINAL]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:500,duration:1e3,range:3,ops:100,effect:[.9,.8,.7,.6,.5]},[e.PWR_DISRUPT_SPAWN]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:5,range:20,ops:10,duration:[1,2,3,4,5]},[e.PWR_DISRUPT_TOWER]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:0,duration:5,range:50,ops:10,effect:[.9,.8,.7,.6,.5]},[e.PWR_DISRUPT_SOURCE]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:100,range:3,ops:100,duration:[100,200,300,400,500]},[e.PWR_SHIELD]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],effect:[5e3,1e4,15e3,2e4,25e3],duration:50,cooldown:20,energy:100},[e.PWR_REGEN_SOURCE]:{className:e.POWER_CLASS.OPERATOR,level:[10,11,12,14,22],cooldown:100,duration:300,range:3,effect:[50,100,150,200,250],period:15},[e.PWR_REGEN_MINERAL]:{className:e.POWER_CLASS.OPERATOR,level:[10,11,12,14,22],cooldown:100,duration:100,range:3,effect:[2,4,6,8,10],period:10},[e.PWR_DISRUPT_TERMINAL]:{className:e.POWER_CLASS.OPERATOR,level:[20,21,22,23,24],cooldown:8,duration:10,range:50,ops:[50,40,30,20,10]},[e.PWR_FORTIFY]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:5,range:3,ops:5,duration:[1,2,3,4,5]},[e.PWR_OPERATE_POWER]:{className:e.POWER_CLASS.OPERATOR,level:[10,11,12,14,22],cooldown:800,range:3,duration:1e3,ops:200,effect:[1,2,3,4,5]},[e.PWR_OPERATE_CONTROLLER]:{className:e.POWER_CLASS.OPERATOR,level:[20,21,22,23,24],cooldown:800,range:3,duration:1e3,ops:200,effect:[10,20,30,40,50]},[e.PWR_OPERATE_FACTORY]:{className:e.POWER_CLASS.OPERATOR,level:[0,2,7,14,22],cooldown:800,range:3,duration:1e3,ops:100}},BODYPARTS_ALL:[e.MOVE,e.WORK,e.CARRY,e.ATTACK,e.RANGED_ATTACK,e.TOUGH,e.HEAL,e.CLAIM],RESOURCES_ALL:[e.RESOURCE_ENERGY,e.RESOURCE_POWER,e.RESOURCE_HYDROGEN,e.RESOURCE_OXYGEN,e.RESOURCE_UTRIUM,e.RESOURCE_KEANIUM,e.RESOURCE_LEMERGIUM,e.RESOURCE_ZYNTHIUM,e.RESOURCE_CATALYST,e.RESOURCE_GHODIUM,e.RESOURCE_HYDROXIDE,e.RESOURCE_ZYNTHIUM_KEANITE,e.RESOURCE_UTRIUM_LEMERGITE,e.RESOURCE_UTRIUM_HYDRIDE,e.RESOURCE_UTRIUM_OXIDE,e.RESOURCE_KEANIUM_HYDRIDE,e.RESOURCE_KEANIUM_OXIDE,e.RESOURCE_LEMERGIUM_HYDRIDE,e.RESOURCE_LEMERGIUM_OXIDE,e.RESOURCE_ZYNTHIUM_HYDRIDE,e.RESOURCE_ZYNTHIUM_OXIDE,e.RESOURCE_GHODIUM_HYDRIDE,e.RESOURCE_GHODIUM_OXIDE,e.RESOURCE_UTRIUM_ACID,e.RESOURCE_UTRIUM_ALKALIDE,e.RESOURCE_KEANIUM_ACID,e.RESOURCE_KEANIUM_ALKALIDE,e.RESOURCE_LEMERGIUM_ACID,e.RESOURCE_LEMERGIUM_ALKALIDE,e.RESOURCE_ZYNTHIUM_ACID,e.RESOURCE_ZYNTHIUM_ALKALIDE,e.RESOURCE_GHODIUM_ACID,e.RESOURCE_GHODIUM_ALKALIDE,e.RESOURCE_CATALYZED_UTRIUM_ACID,e.RESOURCE_CATALYZED_UTRIUM_ALKALIDE,e.RESOURCE_CATALYZED_KEANIUM_ACID,e.RESOURCE_CATALYZED_KEANIUM_ALKALIDE,e.RESOURCE_CATALYZED_LEMERGIUM_ACID,e.RESOURCE_CATALYZED_LEMERGIUM_ALKALIDE,e.RESOURCE_CATALYZED_ZYNTHIUM_ACID,e.RESOURCE_CATALYZED_ZYNTHIUM_ALKALIDE,e.RESOURCE_CATALYZED_GHODIUM_ACID,e.RESOURCE_CATALYZED_GHODIUM_ALKALIDE,e.RESOURCE_OPS,e.RESOURCE_SILICON,e.RESOURCE_METAL,e.RESOURCE_BIOMASS,e.RESOURCE_MIST,e.RESOURCE_UTRIUM_BAR,e.RESOURCE_LEMERGIUM_BAR,e.RESOURCE_ZYNTHIUM_BAR,e.RESOURCE_KEANIUM_BAR,e.RESOURCE_GHODIUM_MELT,e.RESOURCE_OXIDANT,e.RESOURCE_REDUCTANT,e.RESOURCE_PURIFIER,e.RESOURCE_BATTERY,e.RESOURCE_COMPOSITE,e.RESOURCE_CRYSTAL,e.RESOURCE_LIQUID,e.RESOURCE_WIRE,e.RESOURCE_SWITCH,e.RESOURCE_TRANSISTOR,e.RESOURCE_MICROCHIP,e.RESOURCE_CIRCUIT,e.RESOURCE_DEVICE,e.RESOURCE_CELL,e.RESOURCE_PHLEGM,e.RESOURCE_TISSUE,e.RESOURCE_MUSCLE,e.RESOURCE_ORGANOID,e.RESOURCE_ORGANISM,e.RESOURCE_ALLOY,e.RESOURCE_TUBE,e.RESOURCE_FIXTURES,e.RESOURCE_FRAME,e.RESOURCE_HYDRAULICS,e.RESOURCE_MACHINE,e.RESOURCE_CONDENSATE,e.RESOURCE_CONCENTRATE,e.RESOURCE_EXTRACT,e.RESOURCE_SPIRIT,e.RESOURCE_EMANATION,e.RESOURCE_ESSENCE],COLORS_ALL:[e.COLOR_RED,e.COLOR_PURPLE,e.COLOR_BLUE,e.COLOR_CYAN,e.COLOR_GREEN,e.COLOR_YELLOW,e.COLOR_ORANGE,e.COLOR_BROWN,e.COLOR_GREY,e.COLOR_WHITE],INTERSHARD_RESOURCES:[e.SUBSCRIPTION_TOKEN,e.CPU_UNLOCK,e.PIXEL,e.ACCESS_KEY],COMMODITIES:{[e.RESOURCE_UTRIUM_BAR]:{amount:100,cooldown:20,components:{[e.RESOURCE_UTRIUM]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_UTRIUM]:{amount:500,cooldown:20,components:{[e.RESOURCE_UTRIUM_BAR]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_LEMERGIUM_BAR]:{amount:100,cooldown:20,components:{[e.RESOURCE_LEMERGIUM]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_LEMERGIUM]:{amount:500,cooldown:20,components:{[e.RESOURCE_LEMERGIUM_BAR]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_ZYNTHIUM_BAR]:{amount:100,cooldown:20,components:{[e.RESOURCE_ZYNTHIUM]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_ZYNTHIUM]:{amount:500,cooldown:20,components:{[e.RESOURCE_ZYNTHIUM_BAR]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_KEANIUM_BAR]:{amount:100,cooldown:20,components:{[e.RESOURCE_KEANIUM]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_KEANIUM]:{amount:500,cooldown:20,components:{[e.RESOURCE_KEANIUM_BAR]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_GHODIUM_MELT]:{amount:100,cooldown:20,components:{[e.RESOURCE_GHODIUM]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_GHODIUM]:{amount:500,cooldown:20,components:{[e.RESOURCE_GHODIUM_MELT]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_OXIDANT]:{amount:100,cooldown:20,components:{[e.RESOURCE_OXYGEN]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_OXYGEN]:{amount:500,cooldown:20,components:{[e.RESOURCE_OXIDANT]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_REDUCTANT]:{amount:100,cooldown:20,components:{[e.RESOURCE_HYDROGEN]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_HYDROGEN]:{amount:500,cooldown:20,components:{[e.RESOURCE_REDUCTANT]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_PURIFIER]:{amount:100,cooldown:20,components:{[e.RESOURCE_CATALYST]:500,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_CATALYST]:{amount:500,cooldown:20,components:{[e.RESOURCE_PURIFIER]:100,[e.RESOURCE_ENERGY]:200}},[e.RESOURCE_BATTERY]:{amount:50,cooldown:10,components:{[e.RESOURCE_ENERGY]:600}},[e.RESOURCE_ENERGY]:{amount:500,cooldown:10,components:{[e.RESOURCE_BATTERY]:50}},[e.RESOURCE_COMPOSITE]:{level:1,amount:20,cooldown:50,components:{[e.RESOURCE_UTRIUM_BAR]:20,[e.RESOURCE_ZYNTHIUM_BAR]:20,[e.RESOURCE_ENERGY]:20}},[e.RESOURCE_CRYSTAL]:{level:2,amount:6,cooldown:21,components:{[e.RESOURCE_LEMERGIUM_BAR]:6,[e.RESOURCE_KEANIUM_BAR]:6,[e.RESOURCE_PURIFIER]:6,[e.RESOURCE_ENERGY]:45}},[e.RESOURCE_LIQUID]:{level:3,amount:12,cooldown:60,components:{[e.RESOURCE_OXIDANT]:12,[e.RESOURCE_REDUCTANT]:12,[e.RESOURCE_GHODIUM_MELT]:12,[e.RESOURCE_ENERGY]:90}},[e.RESOURCE_WIRE]:{amount:20,cooldown:8,components:{[e.RESOURCE_UTRIUM_BAR]:20,[e.RESOURCE_SILICON]:100,[e.RESOURCE_ENERGY]:40}},[e.RESOURCE_SWITCH]:{level:1,amount:5,cooldown:70,components:{[e.RESOURCE_WIRE]:40,[e.RESOURCE_OXIDANT]:95,[e.RESOURCE_UTRIUM_BAR]:35,[e.RESOURCE_ENERGY]:20}},[e.RESOURCE_TRANSISTOR]:{level:2,amount:1,cooldown:59,components:{[e.RESOURCE_SWITCH]:4,[e.RESOURCE_WIRE]:15,[e.RESOURCE_REDUCTANT]:85,[e.RESOURCE_ENERGY]:8}},[e.RESOURCE_MICROCHIP]:{level:3,amount:1,cooldown:250,components:{[e.RESOURCE_TRANSISTOR]:2,[e.RESOURCE_COMPOSITE]:50,[e.RESOURCE_WIRE]:117,[e.RESOURCE_PURIFIER]:25,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_CIRCUIT]:{level:4,amount:1,cooldown:800,components:{[e.RESOURCE_MICROCHIP]:1,[e.RESOURCE_TRANSISTOR]:5,[e.RESOURCE_SWITCH]:4,[e.RESOURCE_OXIDANT]:115,[e.RESOURCE_ENERGY]:32}},[e.RESOURCE_DEVICE]:{level:5,amount:1,cooldown:600,components:{[e.RESOURCE_CIRCUIT]:1,[e.RESOURCE_MICROCHIP]:3,[e.RESOURCE_CRYSTAL]:110,[e.RESOURCE_GHODIUM_MELT]:150,[e.RESOURCE_ENERGY]:64}},[e.RESOURCE_CELL]:{amount:20,cooldown:8,components:{[e.RESOURCE_LEMERGIUM_BAR]:20,[e.RESOURCE_BIOMASS]:100,[e.RESOURCE_ENERGY]:40}},[e.RESOURCE_PHLEGM]:{level:1,amount:2,cooldown:35,components:{[e.RESOURCE_CELL]:20,[e.RESOURCE_OXIDANT]:36,[e.RESOURCE_LEMERGIUM_BAR]:16,[e.RESOURCE_ENERGY]:8}},[e.RESOURCE_TISSUE]:{level:2,amount:2,cooldown:164,components:{[e.RESOURCE_PHLEGM]:10,[e.RESOURCE_CELL]:10,[e.RESOURCE_REDUCTANT]:110,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_MUSCLE]:{level:3,amount:1,cooldown:250,components:{[e.RESOURCE_TISSUE]:3,[e.RESOURCE_PHLEGM]:3,[e.RESOURCE_ZYNTHIUM_BAR]:50,[e.RESOURCE_REDUCTANT]:50,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_ORGANOID]:{level:4,amount:1,cooldown:800,components:{[e.RESOURCE_MUSCLE]:1,[e.RESOURCE_TISSUE]:5,[e.RESOURCE_PURIFIER]:208,[e.RESOURCE_OXIDANT]:256,[e.RESOURCE_ENERGY]:32}},[e.RESOURCE_ORGANISM]:{level:5,amount:1,cooldown:600,components:{[e.RESOURCE_ORGANOID]:1,[e.RESOURCE_LIQUID]:150,[e.RESOURCE_TISSUE]:6,[e.RESOURCE_CELL]:310,[e.RESOURCE_ENERGY]:64}},[e.RESOURCE_ALLOY]:{amount:20,cooldown:8,components:{[e.RESOURCE_ZYNTHIUM_BAR]:20,[e.RESOURCE_METAL]:100,[e.RESOURCE_ENERGY]:40}},[e.RESOURCE_TUBE]:{level:1,amount:2,cooldown:45,components:{[e.RESOURCE_ALLOY]:40,[e.RESOURCE_ZYNTHIUM_BAR]:16,[e.RESOURCE_ENERGY]:8}},[e.RESOURCE_FIXTURES]:{level:2,amount:1,cooldown:115,components:{[e.RESOURCE_COMPOSITE]:20,[e.RESOURCE_ALLOY]:41,[e.RESOURCE_OXIDANT]:161,[e.RESOURCE_ENERGY]:8}},[e.RESOURCE_FRAME]:{level:3,amount:1,cooldown:125,components:{[e.RESOURCE_FIXTURES]:2,[e.RESOURCE_TUBE]:4,[e.RESOURCE_REDUCTANT]:330,[e.RESOURCE_ZYNTHIUM_BAR]:31,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_HYDRAULICS]:{level:4,amount:1,cooldown:800,components:{[e.RESOURCE_LIQUID]:150,[e.RESOURCE_FIXTURES]:3,[e.RESOURCE_TUBE]:15,[e.RESOURCE_PURIFIER]:208,[e.RESOURCE_ENERGY]:32}},[e.RESOURCE_MACHINE]:{level:5,amount:1,cooldown:600,components:{[e.RESOURCE_HYDRAULICS]:1,[e.RESOURCE_FRAME]:2,[e.RESOURCE_FIXTURES]:3,[e.RESOURCE_TUBE]:12,[e.RESOURCE_ENERGY]:64}},[e.RESOURCE_CONDENSATE]:{amount:20,cooldown:8,components:{[e.RESOURCE_KEANIUM_BAR]:20,[e.RESOURCE_MIST]:100,[e.RESOURCE_ENERGY]:40}},[e.RESOURCE_CONCENTRATE]:{level:1,amount:3,cooldown:41,components:{[e.RESOURCE_CONDENSATE]:30,[e.RESOURCE_KEANIUM_BAR]:15,[e.RESOURCE_REDUCTANT]:54,[e.RESOURCE_ENERGY]:12}},[e.RESOURCE_EXTRACT]:{level:2,amount:2,cooldown:128,components:{[e.RESOURCE_CONCENTRATE]:10,[e.RESOURCE_CONDENSATE]:30,[e.RESOURCE_OXIDANT]:60,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_SPIRIT]:{level:3,amount:1,cooldown:200,components:{[e.RESOURCE_EXTRACT]:2,[e.RESOURCE_CONCENTRATE]:6,[e.RESOURCE_REDUCTANT]:90,[e.RESOURCE_PURIFIER]:20,[e.RESOURCE_ENERGY]:16}},[e.RESOURCE_EMANATION]:{level:4,amount:1,cooldown:800,components:{[e.RESOURCE_SPIRIT]:2,[e.RESOURCE_EXTRACT]:2,[e.RESOURCE_CONCENTRATE]:3,[e.RESOURCE_KEANIUM_BAR]:112,[e.RESOURCE_ENERGY]:32}},[e.RESOURCE_ESSENCE]:{level:5,amount:1,cooldown:600,components:{[e.RESOURCE_EMANATION]:1,[e.RESOURCE_SPIRIT]:3,[e.RESOURCE_CRYSTAL]:110,[e.RESOURCE_GHODIUM_MELT]:150,[e.RESOURCE_ENERGY]:64}}}})},function(t,e,r){"use strict";e.__esModule=!0;e.VERSION="4.8.9",e.PI_2=2*Math.PI,e.RAD_TO_DEG=180/Math.PI,e.DEG_TO_RAD=Math.PI/180,e.RENDERER_TYPE={UNKNOWN:0,WEBGL:1,CANVAS:2},e.BLEND_MODES={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,NORMAL_NPM:17,ADD_NPM:18,SCREEN_NPM:19},e.DRAW_MODES={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},e.SCALE_MODES={LINEAR:0,NEAREST:1},e.WRAP_MODES={CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},e.GC_MODES={AUTO:0,MANUAL:1},e.URL_FILE_EXTENSION=/\.(\w{3,4})(?:$|\?|#)/i,e.DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i,e.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},e.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},e.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},e.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},e.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},function(t,e,r){"use strict";e.__esModule=!0,e.autoDetectRenderer=e.Application=e.Filter=e.SpriteMaskFilter=e.Quad=e.RenderTarget=e.ObjectRenderer=e.WebGLManager=e.Shader=e.CanvasRenderTarget=e.TextureUvs=e.VideoBaseTexture=e.BaseRenderTexture=e.RenderTexture=e.BaseTexture=e.TextureMatrix=e.Texture=e.Spritesheet=e.CanvasGraphicsRenderer=e.GraphicsRenderer=e.GraphicsData=e.Graphics=e.TextMetrics=e.TextStyle=e.Text=e.SpriteRenderer=e.CanvasTinter=e.CanvasSpriteRenderer=e.Sprite=e.TransformBase=e.TransformStatic=e.Transform=e.Container=e.DisplayObject=e.Bounds=e.glCore=e.WebGLRenderer=e.CanvasRenderer=e.ticker=e.utils=e.settings=void 0;var n=r(2);Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})}));var i=r(6);Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})}));var o=r(7);Object.defineProperty(e,"glCore",{enumerable:!0,get:function(){return V(o).default}});var a=r(29);Object.defineProperty(e,"Bounds",{enumerable:!0,get:function(){return V(a).default}});var s=r(51);Object.defineProperty(e,"DisplayObject",{enumerable:!0,get:function(){return V(s).default}});var u=r(13);Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return V(u).default}});var l=r(53);Object.defineProperty(e,"Transform",{enumerable:!0,get:function(){return V(l).default}});var c=r(52);Object.defineProperty(e,"TransformStatic",{enumerable:!0,get:function(){return V(c).default}});var h=r(31);Object.defineProperty(e,"TransformBase",{enumerable:!0,get:function(){return V(h).default}});var f=r(33);Object.defineProperty(e,"Sprite",{enumerable:!0,get:function(){return V(f).default}});var d=r(123);Object.defineProperty(e,"CanvasSpriteRenderer",{enumerable:!0,get:function(){return V(d).default}});var p=r(20);Object.defineProperty(e,"CanvasTinter",{enumerable:!0,get:function(){return V(p).default}});var v=r(126);Object.defineProperty(e,"SpriteRenderer",{enumerable:!0,get:function(){return V(v).default}});var _=r(142);Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return V(_).default}});var g=r(67);Object.defineProperty(e,"TextStyle",{enumerable:!0,get:function(){return V(g).default}});var y=r(68);Object.defineProperty(e,"TextMetrics",{enumerable:!0,get:function(){return V(y).default}});var m=r(144);Object.defineProperty(e,"Graphics",{enumerable:!0,get:function(){return V(m).default}});var x=r(69);Object.defineProperty(e,"GraphicsData",{enumerable:!0,get:function(){return V(x).default}});var E=r(146);Object.defineProperty(e,"GraphicsRenderer",{enumerable:!0,get:function(){return V(E).default}});var b=r(153);Object.defineProperty(e,"CanvasGraphicsRenderer",{enumerable:!0,get:function(){return V(b).default}});var T=r(154);Object.defineProperty(e,"Spritesheet",{enumerable:!0,get:function(){return V(T).default}});var R=r(10);Object.defineProperty(e,"Texture",{enumerable:!0,get:function(){return V(R).default}});var O=r(65);Object.defineProperty(e,"TextureMatrix",{enumerable:!0,get:function(){return V(O).default}});var S=r(12);Object.defineProperty(e,"BaseTexture",{enumerable:!0,get:function(){return V(S).default}});var C=r(36);Object.defineProperty(e,"RenderTexture",{enumerable:!0,get:function(){return V(C).default}});var w=r(60);Object.defineProperty(e,"BaseRenderTexture",{enumerable:!0,get:function(){return V(w).default}});var A=r(57);Object.defineProperty(e,"VideoBaseTexture",{enumerable:!0,get:function(){return V(A).default}});var P=r(58);Object.defineProperty(e,"TextureUvs",{enumerable:!0,get:function(){return V(P).default}});var M=r(61);Object.defineProperty(e,"CanvasRenderTarget",{enumerable:!0,get:function(){return V(M).default}});var I=r(16);Object.defineProperty(e,"Shader",{enumerable:!0,get:function(){return V(I).default}});var D=r(15);Object.defineProperty(e,"WebGLManager",{enumerable:!0,get:function(){return V(D).default}});var L=r(21);Object.defineProperty(e,"ObjectRenderer",{enumerable:!0,get:function(){return V(L).default}});var U=r(23);Object.defineProperty(e,"RenderTarget",{enumerable:!0,get:function(){return V(U).default}});var N=r(66);Object.defineProperty(e,"Quad",{enumerable:!0,get:function(){return V(N).default}});var F=r(63);Object.defineProperty(e,"SpriteMaskFilter",{enumerable:!0,get:function(){return V(F).default}});var j=r(64);Object.defineProperty(e,"Filter",{enumerable:!0,get:function(){return V(j).default}});var k=r(70);Object.defineProperty(e,"Application",{enumerable:!0,get:function(){return V(k).default}});var B=r(71);Object.defineProperty(e,"autoDetectRenderer",{enumerable:!0,get:function(){return B.autoDetectRenderer}});var H=Y(r(4)),W=Y(r(35)),G=V(r(5)),X=V(r(14)),z=V(r(22));function Y(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function V(t){return t&&t.__esModule?t:{default:t}}e.settings=G.default,e.utils=H,e.ticker=W,e.CanvasRenderer=X.default,e.WebGLRenderer=z.default},function(t,e,r){"use strict";e.__esModule=!0,e.premultiplyBlendMode=e.BaseTextureCache=e.TextureCache=e.earcut=e.mixins=e.pluginTarget=e.EventEmitter=e.removeItems=e.isMobile=void 0,e.uid=function(){return++p},e.hex2rgb=function(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},e.hex2string=function(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)},e.rgb2hex=function(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},e.getResolutionOfUrl=function(t,e){var r=i.default.RETINA_PREFIX.exec(t);if(r)return parseFloat(r[1]);return void 0!==e?e:1},e.decomposeDataUri=function(t){var e=n.DATA_URI.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]};return},e.getUrlFileExtension=function(t){var e=n.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase();return},e.getSvgSize=function(t){var e=n.SVG_SIZE.exec(t),r={};e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7])));return r},e.skipHello=function(){v=!0},e.sayHello=function(t){if(v)return;if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c PixiJS "+n.VERSION+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("PixiJS "+n.VERSION+" - "+t+" - http://www.pixijs.com/");v=!0},e.isWebGLSupported=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),n=!(!r||!r.getContextAttributes().stencil);if(r){var i=r.getExtension("WEBGL_lose_context");i&&i.loseContext()}return r=null,n}catch(t){return!1}},e.sign=function(t){return 0===t?0:t<0?-1:1},e.destroyTextureCache=function(){var t=void 0;for(t in _)_[t].destroy();for(t in g)g[t].destroy()},e.clearTextureCache=function(){var t=void 0;for(t in _)delete _[t];for(t in g)delete g[t]},e.correctBlendMode=function(t,e){return y[e?1:0][t]},e.premultiplyTint=function(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,n=t>>8&255,i=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((n=n*e+.5|0)<<8)+(i=i*e+.5|0)},e.premultiplyRgba=function(t,e,r,n){r=r||new Float32Array(4),n||void 0===n?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]);return r[3]=e,r},e.premultiplyTintToRgba=function(t,e,r,n){(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(n||void 0===n)&&(r[0]*=e,r[1]*=e,r[2]*=e);return r[3]=e,r};var n=r(2),i=d(r(5)),o=d(r(11)),a=d(r(112)),s=f(r(113)),u=f(r(30)),l=d(r(114)),c=d(r(115)),h=d(r(32));function f(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function d(t){return t&&t.__esModule?t:{default:t}}var p=0,v=!1;e.isMobile=u,e.removeItems=l.default,e.EventEmitter=o.default,e.pluginTarget=a.default,e.mixins=s,e.earcut=h.default;var _=e.TextureCache=Object.create(null),g=e.BaseTextureCache=Object.create(null);var y=e.premultiplyBlendMode=(0,c.default)()},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(110)),i=o(r(111));function o(t){return t&&t.__esModule?t:{default:t}}e.default={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:(0,n.default)(32),SPRITE_BATCH_SIZE:4096,RETINA_PREFIX:/@([0-9\.]+)x/,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1,width:800,height:600,legacy:!1},TRANSFORM_MODE:0,GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:0,SCALE_MODE:0,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:"mediump",CAN_UPLOAD_SAME_BUFFER:(0,i.default)(),MESH_CANVAS_PADDING:0}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(25);Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return f(n).default}});var i=r(40);Object.defineProperty(e,"ObservablePoint",{enumerable:!0,get:function(){return f(i).default}});var o=r(26);Object.defineProperty(e,"Matrix",{enumerable:!0,get:function(){return f(o).default}});var a=r(41);Object.defineProperty(e,"GroupD8",{enumerable:!0,get:function(){return f(a).default}});var s=r(100);Object.defineProperty(e,"Circle",{enumerable:!0,get:function(){return f(s).default}});var u=r(101);Object.defineProperty(e,"Ellipse",{enumerable:!0,get:function(){return f(u).default}});var l=r(102);Object.defineProperty(e,"Polygon",{enumerable:!0,get:function(){return f(l).default}});var c=r(27);Object.defineProperty(e,"Rectangle",{enumerable:!0,get:function(){return f(c).default}});var h=r(103);function f(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"RoundedRectangle",{enumerable:!0,get:function(){return f(h).default}})},function(t,e,r){var n={createContext:r(104),setVertexAttribArrays:r(42),GLBuffer:r(105),GLFramebuffer:r(106),GLShader:r(107),GLTexture:r(43),VertexArrayObject:r(108),shader:r(109)};t.exports&&(t.exports=n),"undefined"!=typeof window&&(window.PIXI=window.PIXI||{},window.PIXI.glCore=n)},function(t,e,r){(function(t,n){var i;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Lodash <https://lodash.com/>
|
|
5
|
-
* Copyright
|
|
5
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
6
6
|
* Released under MIT license <https://lodash.com/license>
|
|
7
7
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
8
8
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
9
|
-
*/(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="__lodash_hash_undefined__",c=500,h="__lodash_placeholder__",f=1,d=2,p=4,_=1,v=2,g=1,y=2,m=4,E=8,x=16,b=32,T=64,R=128,O=256,S=512,w=30,C="...",A=800,I=16,P=1,M=2,D=1/0,L=9007199254740991,U=1.7976931348623157e308,N=NaN,F=4294967295,j=F-1,k=F>>>1,B=[["ary",R],["bind",g],["bindKey",y],["curry",E],["curryRight",x],["flip",S],["partial",b],["partialRight",T],["rearg",O]],H="[object Arguments]",X="[object Array]",W="[object AsyncFunction]",G="[object Boolean]",Y="[object Date]",z="[object DOMException]",V="[object Error]",K="[object Function]",q="[object GeneratorFunction]",Z="[object Map]",$="[object Number]",J="[object Null]",Q="[object Object]",tt="[object Proxy]",et="[object RegExp]",rt="[object Set]",nt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ut="[object ArrayBuffer]",lt="[object DataView]",ct="[object Float32Array]",ht="[object Float64Array]",ft="[object Int8Array]",dt="[object Int16Array]",pt="[object Int32Array]",_t="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",mt=/\b__p \+= '';/g,Et=/\b(__p \+=) '' \+/g,xt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bt=/&(?:amp|lt|gt|quot|#39);/g,Tt=/[&<>"']/g,Rt=RegExp(bt.source),Ot=RegExp(Tt.source),St=/<%-([\s\S]+?)%>/g,wt=/<%([\s\S]+?)%>/g,Ct=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,It=/^\w*$/,Pt=/^\./,Mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dt=/[\\^$.*+?()[\]{}|]/g,Lt=RegExp(Dt.source),Ut=/^\s+|\s+$/g,Nt=/^\s+/,Ft=/\s+$/,jt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,kt=/\{\n\/\* \[wrapped with (.+)\] \*/,Bt=/,? & /,Ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Xt=/\\(\\)?/g,Wt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Gt=/\w*$/,Yt=/^[-+]0x[0-9a-f]+$/i,zt=/^0b[01]+$/i,Vt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$t=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Qt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ee="[\\ud800-\\udfff]",re="["+te+"]",ne="["+Qt+"]",ie="\\d+",oe="[\\u2700-\\u27bf]",ae="[a-z\\xdf-\\xf6\\xf8-\\xff]",se="[^\\ud800-\\udfff"+te+ie+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ue="\\ud83c[\\udffb-\\udfff]",le="[^\\ud800-\\udfff]",ce="(?:\\ud83c[\\udde6-\\uddff]){2}",he="[\\ud800-\\udbff][\\udc00-\\udfff]",fe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",de="(?:"+ae+"|"+se+")",pe="(?:"+fe+"|"+se+")",_e="(?:"+ne+"|"+ue+")"+"?",ve="[\\ufe0e\\ufe0f]?"+_e+("(?:\\u200d(?:"+[le,ce,he].join("|")+")[\\ufe0e\\ufe0f]?"+_e+")*"),ge="(?:"+[oe,ce,he].join("|")+")"+ve,ye="(?:"+[le+ne+"?",ne,ce,he,ee].join("|")+")",me=RegExp("['’]","g"),Ee=RegExp(ne,"g"),xe=RegExp(ue+"(?="+ue+")|"+ye+ve,"g"),be=RegExp([fe+"?"+ae+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[re,fe,"$"].join("|")+")",pe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[re,fe+de,"$"].join("|")+")",fe+"?"+de+"+(?:['’](?:d|ll|m|re|s|t|ve))?",fe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",ie,ge].join("|"),"g"),Te=RegExp("[\\u200d\\ud800-\\udfff"+Qt+"\\ufe0e\\ufe0f]"),Re=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Oe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Se=-1,we={};we[ct]=we[ht]=we[ft]=we[dt]=we[pt]=we[_t]=we[vt]=we[gt]=we[yt]=!0,we[H]=we[X]=we[ut]=we[G]=we[lt]=we[Y]=we[V]=we[K]=we[Z]=we[$]=we[Q]=we[et]=we[rt]=we[nt]=we[at]=!1;var Ce={};Ce[H]=Ce[X]=Ce[ut]=Ce[lt]=Ce[G]=Ce[Y]=Ce[ct]=Ce[ht]=Ce[ft]=Ce[dt]=Ce[pt]=Ce[Z]=Ce[$]=Ce[Q]=Ce[et]=Ce[rt]=Ce[nt]=Ce[it]=Ce[_t]=Ce[vt]=Ce[gt]=Ce[yt]=!0,Ce[V]=Ce[K]=Ce[at]=!1;var Ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ie=parseFloat,Pe=parseInt,Me="object"==typeof t&&t&&t.Object===Object&&t,De="object"==typeof self&&self&&self.Object===Object&&self,Le=Me||De||Function("return this")(),Ue="object"==typeof e&&e&&!e.nodeType&&e,Ne=Ue&&"object"==typeof n&&n&&!n.nodeType&&n,Fe=Ne&&Ne.exports===Ue,je=Fe&&Me.process,ke=function(){try{return je&&je.binding&&je.binding("util")}catch(t){}}(),Be=ke&&ke.isArrayBuffer,He=ke&&ke.isDate,Xe=ke&&ke.isMap,We=ke&&ke.isRegExp,Ge=ke&&ke.isSet,Ye=ke&&ke.isTypedArray;function ze(t,e){return t.set(e[0],e[1]),t}function Ve(t,e){return t.add(e),t}function Ke(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function qe(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(n,a,r(a),t)}return n}function Ze(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function $e(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function Je(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Qe(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}function tr(t,e){return!!(null==t?0:t.length)&&cr(t,e,0)>-1}function er(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function rr(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function nr(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function ir(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function or(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function ar(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var sr=pr("length");function ur(t,e,r){var n;return r(t,function(t,r,i){if(e(t,r,i))return n=r,!1}),n}function lr(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function cr(t,e,r){return e==e?function(t,e,r){var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):lr(t,fr,r)}function hr(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function fr(t){return t!=t}function dr(t,e){var r=null==t?0:t.length;return r?gr(t,e)/r:N}function pr(t){return function(e){return null==e?o:e[t]}}function _r(t){return function(e){return null==t?o:t[e]}}function vr(t,e,r,n,i){return i(t,function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)}),r}function gr(t,e){for(var r,n=-1,i=t.length;++n<i;){var a=e(t[n]);a!==o&&(r=r===o?a:r+a)}return r}function yr(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function mr(t){return function(e){return t(e)}}function Er(t,e){return rr(e,function(e){return t[e]})}function xr(t,e){return t.has(e)}function br(t,e){for(var r=-1,n=t.length;++r<n&&cr(e,t[r],0)>-1;);return r}function Tr(t,e){for(var r=t.length;r--&&cr(e,t[r],0)>-1;);return r}var Rr=_r({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Or=_r({"&":"&","<":"<",">":">",'"':""","'":"'"});function Sr(t){return"\\"+Ae[t]}function wr(t){return Te.test(t)}function Cr(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function Ar(t,e){return function(r){return t(e(r))}}function Ir(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r];a!==e&&a!==h||(t[r]=h,o[i++]=r)}return o}function Pr(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}function Mr(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=[t,t]}),r}function Dr(t){return wr(t)?function(t){var e=xe.lastIndex=0;for(;xe.test(t);)++e;return e}(t):sr(t)}function Lr(t){return wr(t)?function(t){return t.match(xe)||[]}(t):function(t){return t.split("")}(t)}var Ur=_r({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Nr=function t(e){var r=(e=null==e?Le:Nr.defaults(Le.Object(),e,Nr.pick(Le,Oe))).Array,n=e.Date,i=e.Error,Qt=e.Function,te=e.Math,ee=e.Object,re=e.RegExp,ne=e.String,ie=e.TypeError,oe=r.prototype,ae=Qt.prototype,se=ee.prototype,ue=e["__core-js_shared__"],le=ae.toString,ce=se.hasOwnProperty,he=0,fe=function(){var t=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),de=se.toString,pe=le.call(ee),_e=Le._,ve=re("^"+le.call(ce).replace(Dt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ge=Fe?e.Buffer:o,ye=e.Symbol,xe=e.Uint8Array,Te=ge?ge.allocUnsafe:o,Ae=Ar(ee.getPrototypeOf,ee),Me=ee.create,De=se.propertyIsEnumerable,Ue=oe.splice,Ne=ye?ye.isConcatSpreadable:o,je=ye?ye.iterator:o,ke=ye?ye.toStringTag:o,sr=function(){try{var t=Ho(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),_r=e.clearTimeout!==Le.clearTimeout&&e.clearTimeout,Fr=n&&n.now!==Le.Date.now&&n.now,jr=e.setTimeout!==Le.setTimeout&&e.setTimeout,kr=te.ceil,Br=te.floor,Hr=ee.getOwnPropertySymbols,Xr=ge?ge.isBuffer:o,Wr=e.isFinite,Gr=oe.join,Yr=Ar(ee.keys,ee),zr=te.max,Vr=te.min,Kr=n.now,qr=e.parseInt,Zr=te.random,$r=oe.reverse,Jr=Ho(e,"DataView"),Qr=Ho(e,"Map"),tn=Ho(e,"Promise"),en=Ho(e,"Set"),rn=Ho(e,"WeakMap"),nn=Ho(ee,"create"),on=rn&&new rn,an={},sn=fa(Jr),un=fa(Qr),ln=fa(tn),cn=fa(en),hn=fa(rn),fn=ye?ye.prototype:o,dn=fn?fn.valueOf:o,pn=fn?fn.toString:o;function _n(t){if(As(t)&&!ys(t)&&!(t instanceof mn)){if(t instanceof yn)return t;if(ce.call(t,"__wrapped__"))return da(t)}return new yn(t)}var vn=function(){function t(){}return function(e){if(!Cs(e))return{};if(Me)return Me(e);t.prototype=e;var r=new t;return t.prototype=o,r}}();function gn(){}function yn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function mn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=F,this.__views__=[]}function En(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function xn(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function bn(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Tn(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new bn;++e<r;)this.add(t[e])}function Rn(t){var e=this.__data__=new xn(t);this.size=e.size}function On(t,e){var r=ys(t),n=!r&&gs(t),i=!r&&!n&&bs(t),o=!r&&!n&&!i&&Fs(t),a=r||n||i||o,s=a?yr(t.length,ne):[],u=s.length;for(var l in t)!e&&!ce.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ko(l,u))||s.push(l);return s}function Sn(t){var e=t.length;return e?t[Ti(0,e-1)]:o}function wn(t,e){return la(io(t),Nn(e,0,t.length))}function Cn(t){return la(io(t))}function An(t,e,r){(r===o||ps(t[e],r))&&(r!==o||e in t)||Ln(t,e,r)}function In(t,e,r){var n=t[e];ce.call(t,e)&&ps(n,r)&&(r!==o||e in t)||Ln(t,e,r)}function Pn(t,e){for(var r=t.length;r--;)if(ps(t[r][0],e))return r;return-1}function Mn(t,e,r,n){return Hn(t,function(t,i,o){e(n,t,r(t),o)}),n}function Dn(t,e){return t&&oo(e,ou(e),t)}function Ln(t,e,r){"__proto__"==e&&sr?sr(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Un(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:tu(t,e[n]);return a}function Nn(t,e,r){return t==t&&(r!==o&&(t=t<=r?t:r),e!==o&&(t=t>=e?t:e)),t}function Fn(t,e,r,n,i,a){var s,u=e&f,l=e&d,c=e&p;if(r&&(s=i?r(t,n,i,a):r(t)),s!==o)return s;if(!Cs(t))return t;var h=ys(t);if(h){if(s=function(t){var e=t.length,r=t.constructor(e);return e&&"string"==typeof t[0]&&ce.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!u)return io(t,s)}else{var _=Go(t),v=_==K||_==q;if(bs(t))return Ji(t,u);if(_==Q||_==H||v&&!i){if(s=l||v?{}:zo(t),!u)return l?function(t,e){return oo(t,Wo(t),e)}(t,function(t,e){return t&&oo(e,au(e),t)}(s,t)):function(t,e){return oo(t,Xo(t),e)}(t,Dn(s,t))}else{if(!Ce[_])return i?t:{};s=function(t,e,r,n){var i=t.constructor;switch(e){case ut:return Qi(t);case G:case Y:return new i(+t);case lt:return function(t,e){var r=e?Qi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,n);case ct:case ht:case ft:case dt:case pt:case _t:case vt:case gt:case yt:return to(t,n);case Z:return function(t,e,r){return ir(e?r(Cr(t),f):Cr(t),ze,new t.constructor)}(t,n,r);case $:case nt:return new i(t);case et:return function(t){var e=new t.constructor(t.source,Gt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case rt:return function(t,e,r){return ir(e?r(Pr(t),f):Pr(t),Ve,new t.constructor)}(t,n,r);case it:return function(t){return dn?ee(dn.call(t)):{}}(t)}}(t,_,Fn,u)}}a||(a=new Rn);var g=a.get(t);if(g)return g;a.set(t,s);var y=h?o:(c?l?Lo:Do:l?au:ou)(t);return Ze(y||t,function(n,i){y&&(n=t[i=n]),In(s,i,Fn(n,e,r,i,t,a))}),s}function jn(t,e,r){var n=r.length;if(null==t)return!n;for(t=ee(t);n--;){var i=r[n],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function kn(t,e,r){if("function"!=typeof t)throw new ie(u);return oa(function(){t.apply(o,r)},e)}function Bn(t,e,r,n){var i=-1,o=tr,s=!0,u=t.length,l=[],c=e.length;if(!u)return l;r&&(e=rr(e,mr(r))),n?(o=er,s=!1):e.length>=a&&(o=xr,s=!1,e=new Tn(e));t:for(;++i<u;){var h=t[i],f=null==r?h:r(h);if(h=n||0!==h?h:0,s&&f==f){for(var d=c;d--;)if(e[d]===f)continue t;l.push(h)}else o(e,f,n)||l.push(h)}return l}_n.templateSettings={escape:St,evaluate:wt,interpolate:Ct,variable:"",imports:{_:_n}},_n.prototype=gn.prototype,_n.prototype.constructor=_n,yn.prototype=vn(gn.prototype),yn.prototype.constructor=yn,mn.prototype=vn(gn.prototype),mn.prototype.constructor=mn,En.prototype.clear=function(){this.__data__=nn?nn(null):{},this.size=0},En.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},En.prototype.get=function(t){var e=this.__data__;if(nn){var r=e[t];return r===l?o:r}return ce.call(e,t)?e[t]:o},En.prototype.has=function(t){var e=this.__data__;return nn?e[t]!==o:ce.call(e,t)},En.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nn&&e===o?l:e,this},xn.prototype.clear=function(){this.__data__=[],this.size=0},xn.prototype.delete=function(t){var e=this.__data__,r=Pn(e,t);return!(r<0||(r==e.length-1?e.pop():Ue.call(e,r,1),--this.size,0))},xn.prototype.get=function(t){var e=this.__data__,r=Pn(e,t);return r<0?o:e[r][1]},xn.prototype.has=function(t){return Pn(this.__data__,t)>-1},xn.prototype.set=function(t,e){var r=this.__data__,n=Pn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},bn.prototype.clear=function(){this.size=0,this.__data__={hash:new En,map:new(Qr||xn),string:new En}},bn.prototype.delete=function(t){var e=ko(this,t).delete(t);return this.size-=e?1:0,e},bn.prototype.get=function(t){return ko(this,t).get(t)},bn.prototype.has=function(t){return ko(this,t).has(t)},bn.prototype.set=function(t,e){var r=ko(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Tn.prototype.add=Tn.prototype.push=function(t){return this.__data__.set(t,l),this},Tn.prototype.has=function(t){return this.__data__.has(t)},Rn.prototype.clear=function(){this.__data__=new xn,this.size=0},Rn.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Rn.prototype.get=function(t){return this.__data__.get(t)},Rn.prototype.has=function(t){return this.__data__.has(t)},Rn.prototype.set=function(t,e){var r=this.__data__;if(r instanceof xn){var n=r.__data__;if(!Qr||n.length<a-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new bn(n)}return r.set(t,e),this.size=r.size,this};var Hn=uo(qn),Xn=uo(Zn,!0);function Wn(t,e){var r=!0;return Hn(t,function(t,n,i){return r=!!e(t,n,i)}),r}function Gn(t,e,r){for(var n=-1,i=t.length;++n<i;){var a=t[n],s=e(a);if(null!=s&&(u===o?s==s&&!Ns(s):r(s,u)))var u=s,l=a}return l}function Yn(t,e){var r=[];return Hn(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r}function zn(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=Vo),i||(i=[]);++o<a;){var s=t[o];e>0&&r(s)?e>1?zn(s,e-1,r,n,i):nr(i,s):n||(i[i.length]=s)}return i}var Vn=lo(),Kn=lo(!0);function qn(t,e){return t&&Vn(t,e,ou)}function Zn(t,e){return t&&Kn(t,e,ou)}function $n(t,e){return Qe(e,function(e){return Os(t[e])})}function Jn(t,e){for(var r=0,n=(e=Ki(e,t)).length;null!=t&&r<n;)t=t[ha(e[r++])];return r&&r==n?t:o}function Qn(t,e,r){var n=e(t);return ys(t)?n:nr(n,r(t))}function ti(t){return null==t?t===o?ot:J:ke&&ke in ee(t)?function(t){var e=ce.call(t,ke),r=t[ke];try{t[ke]=o;var n=!0}catch(t){}var i=de.call(t);return n&&(e?t[ke]=r:delete t[ke]),i}(t):function(t){return de.call(t)}(t)}function ei(t,e){return t>e}function ri(t,e){return null!=t&&ce.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ii(t,e,n){for(var i=n?er:tr,a=t[0].length,s=t.length,u=s,l=r(s),c=1/0,h=[];u--;){var f=t[u];u&&e&&(f=rr(f,mr(e))),c=Vr(f.length,c),l[u]=!n&&(e||a>=120&&f.length>=120)?new Tn(u&&f):o}f=t[0];var d=-1,p=l[0];t:for(;++d<a&&h.length<c;){var _=f[d],v=e?e(_):_;if(_=n||0!==_?_:0,!(p?xr(p,v):i(h,v,n))){for(u=s;--u;){var g=l[u];if(!(g?xr(g,v):i(t[u],v,n)))continue t}p&&p.push(v),h.push(_)}}return h}function oi(t,e,r){var n=null==(t=na(t,e=Ki(e,t)))?t:t[ha(Ra(e))];return null==n?o:Ke(n,t,r)}function ai(t){return As(t)&&ti(t)==H}function si(t,e,r,n,i){return t===e||(null==t||null==e||!As(t)&&!As(e)?t!=t&&e!=e:function(t,e,r,n,i,a){var s=ys(t),u=ys(e),l=s?X:Go(t),c=u?X:Go(e),h=(l=l==H?Q:l)==Q,f=(c=c==H?Q:c)==Q,d=l==c;if(d&&bs(t)){if(!bs(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Rn),s||Fs(t)?Po(t,e,r,n,i,a):function(t,e,r,n,i,o,a){switch(r){case lt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ut:return!(t.byteLength!=e.byteLength||!o(new xe(t),new xe(e)));case G:case Y:case $:return ps(+t,+e);case V:return t.name==e.name&&t.message==e.message;case et:case nt:return t==e+"";case Z:var s=Cr;case rt:var u=n&_;if(s||(s=Pr),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;n|=v,a.set(t,e);var c=Po(s(t),s(e),n,i,o,a);return a.delete(t),c;case it:if(dn)return dn.call(t)==dn.call(e)}return!1}(t,e,l,r,n,i,a);if(!(r&_)){var p=h&&ce.call(t,"__wrapped__"),g=f&&ce.call(e,"__wrapped__");if(p||g){var y=p?t.value():t,m=g?e.value():e;return a||(a=new Rn),i(y,m,r,n,a)}}return!!d&&(a||(a=new Rn),function(t,e,r,n,i,a){var s=r&_,u=Do(t),l=u.length,c=Do(e).length;if(l!=c&&!s)return!1;for(var h=l;h--;){var f=u[h];if(!(s?f in e:ce.call(e,f)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var p=!0;a.set(t,e),a.set(e,t);for(var v=s;++h<l;){f=u[h];var g=t[f],y=e[f];if(n)var m=s?n(y,g,f,e,t,a):n(g,y,f,t,e,a);if(!(m===o?g===y||i(g,y,r,n,a):m)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var E=t.constructor,x=e.constructor;E!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof E&&E instanceof E&&"function"==typeof x&&x instanceof x)&&(p=!1)}return a.delete(t),a.delete(e),p}(t,e,r,n,i,a))}(t,e,r,n,si,i))}function ui(t,e,r,n){var i=r.length,a=i,s=!n;if(null==t)return!a;for(t=ee(t);i--;){var u=r[i];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<a;){var l=(u=r[i])[0],c=t[l],h=u[1];if(s&&u[2]){if(c===o&&!(l in t))return!1}else{var f=new Rn;if(n)var d=n(c,h,l,t,e,f);if(!(d===o?si(h,c,_|v,n,f):d))return!1}}return!0}function li(t){return!(!Cs(t)||function(t){return!!fe&&fe in t}(t))&&(Os(t)?ve:Vt).test(fa(t))}function ci(t){return"function"==typeof t?t:null==t?Pu:"object"==typeof t?ys(t)?vi(t[0],t[1]):_i(t):Bu(t)}function hi(t){if(!Qo(t))return Yr(t);var e=[];for(var r in ee(t))ce.call(t,r)&&"constructor"!=r&&e.push(r);return e}function fi(t){if(!Cs(t))return function(t){var e=[];if(null!=t)for(var r in ee(t))e.push(r);return e}(t);var e=Qo(t),r=[];for(var n in t)("constructor"!=n||!e&&ce.call(t,n))&&r.push(n);return r}function di(t,e){return t<e}function pi(t,e){var n=-1,i=Es(t)?r(t.length):[];return Hn(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function _i(t){var e=Bo(t);return 1==e.length&&e[0][2]?ea(e[0][0],e[0][1]):function(r){return r===t||ui(r,t,e)}}function vi(t,e){return Zo(t)&&ta(e)?ea(ha(t),e):function(r){var n=tu(r,t);return n===o&&n===e?eu(r,t):si(e,n,_|v)}}function gi(t,e,r,n,i){t!==e&&Vn(e,function(a,s){if(Cs(a))i||(i=new Rn),function(t,e,r,n,i,a,s){var u=t[r],l=e[r],c=s.get(l);if(c)An(t,r,c);else{var h=a?a(u,l,r+"",t,e,s):o,f=h===o;if(f){var d=ys(l),p=!d&&bs(l),_=!d&&!p&&Fs(l);h=l,d||p||_?ys(u)?h=u:xs(u)?h=io(u):p?(f=!1,h=Ji(l,!0)):_?(f=!1,h=to(l,!0)):h=[]:Ms(l)||gs(l)?(h=u,gs(u)?h=Ys(u):(!Cs(u)||n&&Os(u))&&(h=zo(l))):f=!1}f&&(s.set(l,h),i(h,l,n,a,s),s.delete(l)),An(t,r,h)}}(t,e,s,r,gi,n,i);else{var u=n?n(t[s],a,s+"",t,e,i):o;u===o&&(u=a),An(t,s,u)}},au)}function yi(t,e){var r=t.length;if(r)return Ko(e+=e<0?r:0,r)?t[e]:o}function mi(t,e,r){var n=-1;return e=rr(e.length?e:[Pu],mr(jo())),function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}(pi(t,function(t,r,i){return{criteria:rr(e,function(e){return e(t)}),index:++n,value:t}}),function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,a=i.length,s=r.length;++n<a;){var u=eo(i[n],o[n]);if(u){if(n>=s)return u;var l=r[n];return u*("desc"==l?-1:1)}}return t.index-e.index}(t,e,r)})}function Ei(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var a=e[n],s=Jn(t,a);r(s,a)&&Ci(o,Ki(a,t),s)}return o}function xi(t,e,r,n){var i=n?hr:cr,o=-1,a=e.length,s=t;for(t===e&&(e=io(e)),r&&(s=rr(t,mr(r)));++o<a;)for(var u=0,l=e[o],c=r?r(l):l;(u=i(s,c,u,n))>-1;)s!==t&&Ue.call(s,u,1),Ue.call(t,u,1);return t}function bi(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;Ko(i)?Ue.call(t,i,1):Bi(t,i)}}return t}function Ti(t,e){return t+Br(Zr()*(e-t+1))}function Ri(t,e){var r="";if(!t||e<1||e>L)return r;do{e%2&&(r+=t),(e=Br(e/2))&&(t+=t)}while(e);return r}function Oi(t,e){return aa(ra(t,e,Pu),t+"")}function Si(t){return Sn(pu(t))}function wi(t,e){var r=pu(t);return la(r,Nn(e,0,r.length))}function Ci(t,e,r,n){if(!Cs(t))return t;for(var i=-1,a=(e=Ki(e,t)).length,s=a-1,u=t;null!=u&&++i<a;){var l=ha(e[i]),c=r;if(i!=s){var h=u[l];(c=n?n(h,l,u):o)===o&&(c=Cs(h)?h:Ko(e[i+1])?[]:{})}In(u,l,c),u=u[l]}return t}var Ai=on?function(t,e){return on.set(t,e),t}:Pu,Ii=sr?function(t,e){return sr(t,"toString",{configurable:!0,enumerable:!1,value:Cu(e),writable:!0})}:Pu;function Pi(t){return la(pu(t))}function Mi(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function Di(t,e){var r;return Hn(t,function(t,n,i){return!(r=e(t,n,i))}),!!r}function Li(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=k){for(;n<i;){var o=n+i>>>1,a=t[o];null!==a&&!Ns(a)&&(r?a<=e:a<e)?n=o+1:i=o}return i}return Ui(t,e,Pu,r)}function Ui(t,e,r,n){e=r(e);for(var i=0,a=null==t?0:t.length,s=e!=e,u=null===e,l=Ns(e),c=e===o;i<a;){var h=Br((i+a)/2),f=r(t[h]),d=f!==o,p=null===f,_=f==f,v=Ns(f);if(s)var g=n||_;else g=c?_&&(n||d):u?_&&d&&(n||!p):l?_&&d&&!p&&(n||!v):!p&&!v&&(n?f<=e:f<e);g?i=h+1:a=h}return Vr(a,j)}function Ni(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r],s=e?e(a):a;if(!r||!ps(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function Fi(t){return"number"==typeof t?t:Ns(t)?N:+t}function ji(t){if("string"==typeof t)return t;if(ys(t))return rr(t,ji)+"";if(Ns(t))return pn?pn.call(t):"";var e=t+"";return"0"==e&&1/t==-D?"-0":e}function ki(t,e,r){var n=-1,i=tr,o=t.length,s=!0,u=[],l=u;if(r)s=!1,i=er;else if(o>=a){var c=e?null:Oo(t);if(c)return Pr(c);s=!1,i=xr,l=new Tn}else l=e?[]:u;t:for(;++n<o;){var h=t[n],f=e?e(h):h;if(h=r||0!==h?h:0,s&&f==f){for(var d=l.length;d--;)if(l[d]===f)continue t;e&&l.push(f),u.push(h)}else i(l,f,r)||(l!==u&&l.push(f),u.push(h))}return u}function Bi(t,e){return null==(t=na(t,e=Ki(e,t)))||delete t[ha(Ra(e))]}function Hi(t,e,r,n){return Ci(t,e,r(Jn(t,e)),n)}function Xi(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?Mi(t,n?0:o,n?o+1:i):Mi(t,n?o+1:0,n?i:o)}function Wi(t,e){var r=t;return r instanceof mn&&(r=r.value()),ir(e,function(t,e){return e.func.apply(e.thisArg,nr([t],e.args))},r)}function Gi(t,e,n){var i=t.length;if(i<2)return i?ki(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=Bn(a[o]||s,t[u],e,n));return ki(zn(a,1),e,n)}function Yi(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n<i;){var u=n<a?e[n]:o;r(s,t[n],u)}return s}function zi(t){return xs(t)?t:[]}function Vi(t){return"function"==typeof t?t:Pu}function Ki(t,e){return ys(t)?t:Zo(t,e)?[t]:ca(zs(t))}var qi=Oi;function Zi(t,e,r){var n=t.length;return r=r===o?n:r,!e&&r>=n?t:Mi(t,e,r)}var $i=_r||function(t){return Le.clearTimeout(t)};function Ji(t,e){if(e)return t.slice();var r=t.length,n=Te?Te(r):new t.constructor(r);return t.copy(n),n}function Qi(t){var e=new t.constructor(t.byteLength);return new xe(e).set(new xe(t)),e}function to(t,e){var r=e?Qi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function eo(t,e){if(t!==e){var r=t!==o,n=null===t,i=t==t,a=Ns(t),s=e!==o,u=null===e,l=e==e,c=Ns(e);if(!u&&!c&&!a&&t>e||a&&s&&l&&!u&&!c||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!c&&t<e||c&&r&&i&&!n&&!a||u&&r&&i||!s&&i||!l)return-1}return 0}function ro(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,l=e.length,c=zr(a-s,0),h=r(l+c),f=!i;++u<l;)h[u]=e[u];for(;++o<s;)(f||o<a)&&(h[n[o]]=t[o]);for(;c--;)h[u++]=t[o++];return h}function no(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,l=-1,c=e.length,h=zr(a-u,0),f=r(h+c),d=!i;++o<h;)f[o]=t[o];for(var p=o;++l<c;)f[p+l]=e[l];for(;++s<u;)(d||o<a)&&(f[p+n[s]]=t[o++]);return f}function io(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function oo(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var u=e[a],l=n?n(r[u],t[u],u,r,t):o;l===o&&(l=t[u]),i?Ln(r,u,l):In(r,u,l)}return r}function ao(t,e){return function(r,n){var i=ys(r)?qe:Mn,o=e?e():{};return i(r,t,jo(n,2),o)}}function so(t){return Oi(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:o,s=i>2?r[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&qo(r[0],r[1],s)&&(a=i<3?o:a,i=1),e=ee(e);++n<i;){var u=r[n];u&&t(e,u,n,a)}return e})}function uo(t,e){return function(r,n){if(null==r)return r;if(!Es(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=ee(r);(e?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function lo(t){return function(e,r,n){for(var i=-1,o=ee(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}function co(t){return function(e){var r=wr(e=zs(e))?Lr(e):o,n=r?r[0]:e.charAt(0),i=r?Zi(r,1).join(""):e.slice(1);return n[t]()+i}}function ho(t){return function(e){return ir(Ou(gu(e).replace(me,"")),t,"")}}function fo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=vn(t.prototype),n=t.apply(r,e);return Cs(n)?n:r}}function po(t){return function(e,r,n){var i=ee(e);if(!Es(e)){var a=jo(r,3);e=ou(e),r=function(t){return a(i[t],t,i)}}var s=t(e,r,n);return s>-1?i[a?e[s]:s]:o}}function _o(t){return Mo(function(e){var r=e.length,n=r,i=yn.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new ie(u);if(i&&!s&&"wrapper"==No(a))var s=new yn([],!0)}for(n=s?n:r;++n<r;){var l=No(a=e[n]),c="wrapper"==l?Uo(a):o;s=c&&$o(c[0])&&c[1]==(R|E|b|O)&&!c[4].length&&1==c[9]?s[No(c[0])].apply(s,c[3]):1==a.length&&$o(a)?s[l]():s.thru(a)}return function(){var t=arguments,n=t[0];if(s&&1==t.length&&ys(n))return s.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}})}function vo(t,e,n,i,a,s,u,l,c,h){var f=e&R,d=e&g,p=e&y,_=e&(E|x),v=e&S,m=p?o:fo(t);return function g(){for(var y=arguments.length,E=r(y),x=y;x--;)E[x]=arguments[x];if(_)var b=Fo(g),T=function(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}(E,b);if(i&&(E=ro(E,i,a,_)),s&&(E=no(E,s,u,_)),y-=T,_&&y<h){var R=Ir(E,b);return To(t,e,vo,g.placeholder,n,E,R,l,c,h-y)}var O=d?n:this,S=p?O[t]:t;return y=E.length,l?E=function(t,e){for(var r=t.length,n=Vr(e.length,r),i=io(t);n--;){var a=e[n];t[n]=Ko(a,r)?i[a]:o}return t}(E,l):v&&y>1&&E.reverse(),f&&c<y&&(E.length=c),this&&this!==Le&&this instanceof g&&(S=m||fo(S)),S.apply(O,E)}}function go(t,e){return function(r,n){return function(t,e,r,n){return qn(t,function(t,i,o){e(n,r(t),i,o)}),n}(r,t,e(n),{})}}function yo(t,e){return function(r,n){var i;if(r===o&&n===o)return e;if(r!==o&&(i=r),n!==o){if(i===o)return n;"string"==typeof r||"string"==typeof n?(r=ji(r),n=ji(n)):(r=Fi(r),n=Fi(n)),i=t(r,n)}return i}}function mo(t){return Mo(function(e){return e=rr(e,mr(jo())),Oi(function(r){var n=this;return t(e,function(t){return Ke(t,n,r)})})})}function Eo(t,e){var r=(e=e===o?" ":ji(e)).length;if(r<2)return r?Ri(e,t):e;var n=Ri(e,kr(t/Dr(e)));return wr(e)?Zi(Lr(n),0,t).join(""):n.slice(0,t)}function xo(t){return function(e,n,i){return i&&"number"!=typeof i&&qo(e,n,i)&&(n=i=o),e=Hs(e),n===o?(n=e,e=0):n=Hs(n),function(t,e,n,i){for(var o=-1,a=zr(kr((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:Hs(i),t)}}function bo(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=Gs(e),r=Gs(r)),t(e,r)}}function To(t,e,r,n,i,a,s,u,l,c){var h=e&E;e|=h?b:T,(e&=~(h?T:b))&m||(e&=~(g|y));var f=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,u,l,c],d=r.apply(o,f);return $o(t)&&ia(d,f),d.placeholder=n,sa(d,t,e)}function Ro(t){var e=te[t];return function(t,r){if(t=Gs(t),r=null==r?0:Vr(Xs(r),292)){var n=(zs(t)+"e").split("e");return+((n=(zs(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Oo=en&&1/Pr(new en([,-0]))[1]==D?function(t){return new en(t)}:Nu;function So(t){return function(e){var r=Go(e);return r==Z?Cr(e):r==rt?Mr(e):function(t,e){return rr(e,function(e){return[e,t[e]]})}(e,t(e))}}function wo(t,e,n,i,a,s,l,c){var f=e&y;if(!f&&"function"!=typeof t)throw new ie(u);var d=i?i.length:0;if(d||(e&=~(b|T),i=a=o),l=l===o?l:zr(Xs(l),0),c=c===o?c:Xs(c),d-=a?a.length:0,e&T){var p=i,_=a;i=a=o}var v=f?o:Uo(t),S=[t,e,n,i,a,p,_,s,l,c];if(v&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<(g|y|R),a=n==R&&r==E||n==R&&r==O&&t[7].length<=e[8]||n==(R|O)&&e[7].length<=e[8]&&r==E;if(!o&&!a)return t;n&g&&(t[2]=e[2],i|=r&g?0:m);var s=e[3];if(s){var u=t[3];t[3]=u?ro(u,s,e[4]):s,t[4]=u?Ir(t[3],h):e[4]}(s=e[5])&&(u=t[5],t[5]=u?no(u,s,e[6]):s,t[6]=u?Ir(t[5],h):e[6]),(s=e[7])&&(t[7]=s),n&R&&(t[8]=null==t[8]?e[8]:Vr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,v),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(c=S[9]=S[9]===o?f?0:t.length:zr(S[9]-d,0))&&e&(E|x)&&(e&=~(E|x)),e&&e!=g)w=e==E||e==x?function(t,e,n){var i=fo(t);return function a(){for(var s=arguments.length,u=r(s),l=s,c=Fo(a);l--;)u[l]=arguments[l];var h=s<3&&u[0]!==c&&u[s-1]!==c?[]:Ir(u,c);return(s-=h.length)<n?To(t,e,vo,a.placeholder,o,u,h,o,o,n-s):Ke(this&&this!==Le&&this instanceof a?i:t,this,u)}}(t,e,c):e!=b&&e!=(g|b)||a.length?vo.apply(o,S):function(t,e,n,i){var o=e&g,a=fo(t);return function e(){for(var s=-1,u=arguments.length,l=-1,c=i.length,h=r(c+u),f=this&&this!==Le&&this instanceof e?a:t;++l<c;)h[l]=i[l];for(;u--;)h[l++]=arguments[++s];return Ke(f,o?n:this,h)}}(t,e,n,i);else var w=function(t,e,r){var n=e&g,i=fo(t);return function e(){return(this&&this!==Le&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,n);return sa((v?Ai:ia)(w,S),t,e)}function Co(t,e,r,n){return t===o||ps(t,se[r])&&!ce.call(n,r)?e:t}function Ao(t,e,r,n,i,a){return Cs(t)&&Cs(e)&&(a.set(e,t),gi(t,e,o,Ao,a),a.delete(e)),t}function Io(t){return Ms(t)?o:t}function Po(t,e,r,n,i,a){var s=r&_,u=t.length,l=e.length;if(u!=l&&!(s&&l>u))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var h=-1,f=!0,d=r&v?new Tn:o;for(a.set(t,e),a.set(e,t);++h<u;){var p=t[h],g=e[h];if(n)var y=s?n(g,p,h,e,t,a):n(p,g,h,t,e,a);if(y!==o){if(y)continue;f=!1;break}if(d){if(!ar(e,function(t,e){if(!xr(d,e)&&(p===t||i(p,t,r,n,a)))return d.push(e)})){f=!1;break}}else if(p!==g&&!i(p,g,r,n,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function Mo(t){return aa(ra(t,o,ma),t+"")}function Do(t){return Qn(t,ou,Xo)}function Lo(t){return Qn(t,au,Wo)}var Uo=on?function(t){return on.get(t)}:Nu;function No(t){for(var e=t.name+"",r=an[e],n=ce.call(an,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function Fo(t){return(ce.call(_n,"placeholder")?_n:t).placeholder}function jo(){var t=_n.iteratee||Mu;return t=t===Mu?ci:t,arguments.length?t(arguments[0],arguments[1]):t}function ko(t,e){var r=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?r["string"==typeof e?"string":"hash"]:r.map}function Bo(t){for(var e=ou(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,ta(i)]}return e}function Ho(t,e){var r=function(t,e){return null==t?o:t[e]}(t,e);return li(r)?r:o}var Xo=Hr?function(t){return null==t?[]:(t=ee(t),Qe(Hr(t),function(e){return De.call(t,e)}))}:Wu,Wo=Hr?function(t){for(var e=[];t;)nr(e,Xo(t)),t=Ae(t);return e}:Wu,Go=ti;function Yo(t,e,r){for(var n=-1,i=(e=Ki(e,t)).length,o=!1;++n<i;){var a=ha(e[n]);if(!(o=null!=t&&r(t,a)))break;t=t[a]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&ws(i)&&Ko(a,i)&&(ys(t)||gs(t))}function zo(t){return"function"!=typeof t.constructor||Qo(t)?{}:vn(Ae(t))}function Vo(t){return ys(t)||gs(t)||!!(Ne&&t&&t[Ne])}function Ko(t,e){return!!(e=null==e?L:e)&&("number"==typeof t||qt.test(t))&&t>-1&&t%1==0&&t<e}function qo(t,e,r){if(!Cs(r))return!1;var n=typeof e;return!!("number"==n?Es(r)&&Ko(e,r.length):"string"==n&&e in r)&&ps(r[e],t)}function Zo(t,e){if(ys(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Ns(t))||It.test(t)||!At.test(t)||null!=e&&t in ee(e)}function $o(t){var e=No(t),r=_n[e];if("function"!=typeof r||!(e in mn.prototype))return!1;if(t===r)return!0;var n=Uo(r);return!!n&&t===n[0]}(Jr&&Go(new Jr(new ArrayBuffer(1)))!=lt||Qr&&Go(new Qr)!=Z||tn&&"[object Promise]"!=Go(tn.resolve())||en&&Go(new en)!=rt||rn&&Go(new rn)!=at)&&(Go=function(t){var e=ti(t),r=e==Q?t.constructor:o,n=r?fa(r):"";if(n)switch(n){case sn:return lt;case un:return Z;case ln:return"[object Promise]";case cn:return rt;case hn:return at}return e});var Jo=ue?Os:Gu;function Qo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function ta(t){return t==t&&!Cs(t)}function ea(t,e){return function(r){return null!=r&&r[t]===e&&(e!==o||t in ee(r))}}function ra(t,e,n){return e=zr(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=zr(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),Ke(t,this,u)}}function na(t,e){return e.length<2?t:Jn(t,Mi(e,0,-1))}var ia=ua(Ai),oa=jr||function(t,e){return Le.setTimeout(t,e)},aa=ua(Ii);function sa(t,e,r){var n=e+"";return aa(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(jt,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return Ze(B,function(r){var n="_."+r[0];e&r[1]&&!tr(t,n)&&t.push(n)}),t.sort()}(function(t){var e=t.match(kt);return e?e[1].split(Bt):[]}(n),r)))}function ua(t){var e=0,r=0;return function(){var n=Kr(),i=I-(n-r);if(r=n,i>0){if(++e>=A)return arguments[0]}else e=0;return t.apply(o,arguments)}}function la(t,e){var r=-1,n=t.length,i=n-1;for(e=e===o?n:e;++r<e;){var a=Ti(r,i),s=t[a];t[a]=t[r],t[r]=s}return t.length=e,t}var ca=function(t){var e=us(t,function(t){return r.size===c&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return Pt.test(t)&&e.push(""),t.replace(Mt,function(t,r,n,i){e.push(n?i.replace(Xt,"$1"):r||t)}),e});function ha(t){if("string"==typeof t||Ns(t))return t;var e=t+"";return"0"==e&&1/t==-D?"-0":e}function fa(t){if(null!=t){try{return le.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function da(t){if(t instanceof mn)return t.clone();var e=new yn(t.__wrapped__,t.__chain__);return e.__actions__=io(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var pa=Oi(function(t,e){return xs(t)?Bn(t,zn(e,1,xs,!0)):[]}),_a=Oi(function(t,e){var r=Ra(e);return xs(r)&&(r=o),xs(t)?Bn(t,zn(e,1,xs,!0),jo(r,2)):[]}),va=Oi(function(t,e){var r=Ra(e);return xs(r)&&(r=o),xs(t)?Bn(t,zn(e,1,xs,!0),o,r):[]});function ga(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:Xs(r);return i<0&&(i=zr(n+i,0)),lr(t,jo(e,3),i)}function ya(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n-1;return r!==o&&(i=Xs(r),i=r<0?zr(n+i,0):Vr(i,n-1)),lr(t,jo(e,3),i,!0)}function ma(t){return null!=t&&t.length?zn(t,1):[]}function Ea(t){return t&&t.length?t[0]:o}var xa=Oi(function(t){var e=rr(t,zi);return e.length&&e[0]===t[0]?ii(e):[]}),ba=Oi(function(t){var e=Ra(t),r=rr(t,zi);return e===Ra(r)?e=o:r.pop(),r.length&&r[0]===t[0]?ii(r,jo(e,2)):[]}),Ta=Oi(function(t){var e=Ra(t),r=rr(t,zi);return(e="function"==typeof e?e:o)&&r.pop(),r.length&&r[0]===t[0]?ii(r,o,e):[]});function Ra(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Oa=Oi(Sa);function Sa(t,e){return t&&t.length&&e&&e.length?xi(t,e):t}var wa=Mo(function(t,e){var r=null==t?0:t.length,n=Un(t,e);return bi(t,rr(e,function(t){return Ko(t,r)?+t:t}).sort(eo)),n});function Ca(t){return null==t?t:$r.call(t)}var Aa=Oi(function(t){return ki(zn(t,1,xs,!0))}),Ia=Oi(function(t){var e=Ra(t);return xs(e)&&(e=o),ki(zn(t,1,xs,!0),jo(e,2))}),Pa=Oi(function(t){var e=Ra(t);return e="function"==typeof e?e:o,ki(zn(t,1,xs,!0),o,e)});function Ma(t){if(!t||!t.length)return[];var e=0;return t=Qe(t,function(t){if(xs(t))return e=zr(t.length,e),!0}),yr(e,function(e){return rr(t,pr(e))})}function Da(t,e){if(!t||!t.length)return[];var r=Ma(t);return null==e?r:rr(r,function(t){return Ke(e,o,t)})}var La=Oi(function(t,e){return xs(t)?Bn(t,e):[]}),Ua=Oi(function(t){return Gi(Qe(t,xs))}),Na=Oi(function(t){var e=Ra(t);return xs(e)&&(e=o),Gi(Qe(t,xs),jo(e,2))}),Fa=Oi(function(t){var e=Ra(t);return e="function"==typeof e?e:o,Gi(Qe(t,xs),o,e)}),ja=Oi(Ma);var ka=Oi(function(t){var e=t.length,r=e>1?t[e-1]:o;return Da(t,r="function"==typeof r?(t.pop(),r):o)});function Ba(t){var e=_n(t);return e.__chain__=!0,e}function Ha(t,e){return e(t)}var Xa=Mo(function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,i=function(e){return Un(e,t)};return!(e>1||this.__actions__.length)&&n instanceof mn&&Ko(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:Ha,args:[i],thisArg:o}),new yn(n,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Wa=ao(function(t,e,r){ce.call(t,r)?++t[r]:Ln(t,r,1)});var Ga=po(ga),Ya=po(ya);function za(t,e){return(ys(t)?Ze:Hn)(t,jo(e,3))}function Va(t,e){return(ys(t)?$e:Xn)(t,jo(e,3))}var Ka=ao(function(t,e,r){ce.call(t,r)?t[r].push(e):Ln(t,r,[e])});var qa=Oi(function(t,e,n){var i=-1,o="function"==typeof e,a=Es(t)?r(t.length):[];return Hn(t,function(t){a[++i]=o?Ke(e,t,n):oi(t,e,n)}),a}),Za=ao(function(t,e,r){Ln(t,r,e)});function $a(t,e){return(ys(t)?rr:pi)(t,jo(e,3))}var Ja=ao(function(t,e,r){t[r?0:1].push(e)},function(){return[[],[]]});var Qa=Oi(function(t,e){if(null==t)return[];var r=e.length;return r>1&&qo(t,e[0],e[1])?e=[]:r>2&&qo(e[0],e[1],e[2])&&(e=[e[0]]),mi(t,zn(e,1),[])}),ts=Fr||function(){return Le.Date.now()};function es(t,e,r){return e=r?o:e,e=t&&null==e?t.length:e,wo(t,R,o,o,o,o,e)}function rs(t,e){var r;if("function"!=typeof e)throw new ie(u);return t=Xs(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=o),r}}var ns=Oi(function(t,e,r){var n=g;if(r.length){var i=Ir(r,Fo(ns));n|=b}return wo(t,n,e,r,i)}),is=Oi(function(t,e,r){var n=g|y;if(r.length){var i=Ir(r,Fo(is));n|=b}return wo(e,n,t,r,i)});function os(t,e,r){var n,i,a,s,l,c,h=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new ie(u);function _(e){var r=n,a=i;return n=i=o,h=e,s=t.apply(a,r)}function v(t){var r=t-c;return c===o||r>=e||r<0||d&&t-h>=a}function g(){var t=ts();if(v(t))return y(t);l=oa(g,function(t){var r=e-(t-c);return d?Vr(r,a-(t-h)):r}(t))}function y(t){return l=o,p&&n?_(t):(n=i=o,s)}function m(){var t=ts(),r=v(t);if(n=arguments,i=this,c=t,r){if(l===o)return function(t){return h=t,l=oa(g,e),f?_(t):s}(c);if(d)return l=oa(g,e),_(c)}return l===o&&(l=oa(g,e)),s}return e=Gs(e)||0,Cs(r)&&(f=!!r.leading,a=(d="maxWait"in r)?zr(Gs(r.maxWait)||0,e):a,p="trailing"in r?!!r.trailing:p),m.cancel=function(){l!==o&&$i(l),h=0,n=c=i=l=o},m.flush=function(){return l===o?s:y(ts())},m}var as=Oi(function(t,e){return kn(t,1,e)}),ss=Oi(function(t,e,r){return kn(t,Gs(e)||0,r)});function us(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(u);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(us.Cache||bn),r}function ls(t){if("function"!=typeof t)throw new ie(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}us.Cache=bn;var cs=qi(function(t,e){var r=(e=1==e.length&&ys(e[0])?rr(e[0],mr(jo())):rr(zn(e,1),mr(jo()))).length;return Oi(function(n){for(var i=-1,o=Vr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return Ke(t,this,n)})}),hs=Oi(function(t,e){var r=Ir(e,Fo(hs));return wo(t,b,o,e,r)}),fs=Oi(function(t,e){var r=Ir(e,Fo(fs));return wo(t,T,o,e,r)}),ds=Mo(function(t,e){return wo(t,O,o,o,o,e)});function ps(t,e){return t===e||t!=t&&e!=e}var _s=bo(ei),vs=bo(function(t,e){return t>=e}),gs=ai(function(){return arguments}())?ai:function(t){return As(t)&&ce.call(t,"callee")&&!De.call(t,"callee")},ys=r.isArray,ms=Be?mr(Be):function(t){return As(t)&&ti(t)==ut};function Es(t){return null!=t&&ws(t.length)&&!Os(t)}function xs(t){return As(t)&&Es(t)}var bs=Xr||Gu,Ts=He?mr(He):function(t){return As(t)&&ti(t)==Y};function Rs(t){if(!As(t))return!1;var e=ti(t);return e==V||e==z||"string"==typeof t.message&&"string"==typeof t.name&&!Ms(t)}function Os(t){if(!Cs(t))return!1;var e=ti(t);return e==K||e==q||e==W||e==tt}function Ss(t){return"number"==typeof t&&t==Xs(t)}function ws(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=L}function Cs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function As(t){return null!=t&&"object"==typeof t}var Is=Xe?mr(Xe):function(t){return As(t)&&Go(t)==Z};function Ps(t){return"number"==typeof t||As(t)&&ti(t)==$}function Ms(t){if(!As(t)||ti(t)!=Q)return!1;var e=Ae(t);if(null===e)return!0;var r=ce.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&le.call(r)==pe}var Ds=We?mr(We):function(t){return As(t)&&ti(t)==et};var Ls=Ge?mr(Ge):function(t){return As(t)&&Go(t)==rt};function Us(t){return"string"==typeof t||!ys(t)&&As(t)&&ti(t)==nt}function Ns(t){return"symbol"==typeof t||As(t)&&ti(t)==it}var Fs=Ye?mr(Ye):function(t){return As(t)&&ws(t.length)&&!!we[ti(t)]};var js=bo(di),ks=bo(function(t,e){return t<=e});function Bs(t){if(!t)return[];if(Es(t))return Us(t)?Lr(t):io(t);if(je&&t[je])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[je]());var e=Go(t);return(e==Z?Cr:e==rt?Pr:pu)(t)}function Hs(t){return t?(t=Gs(t))===D||t===-D?(t<0?-1:1)*U:t==t?t:0:0===t?t:0}function Xs(t){var e=Hs(t),r=e%1;return e==e?r?e-r:e:0}function Ws(t){return t?Nn(Xs(t),0,F):0}function Gs(t){if("number"==typeof t)return t;if(Ns(t))return N;if(Cs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Cs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Ut,"");var r=zt.test(t);return r||Kt.test(t)?Pe(t.slice(2),r?2:8):Yt.test(t)?N:+t}function Ys(t){return oo(t,au(t))}function zs(t){return null==t?"":ji(t)}var Vs=so(function(t,e){if(Qo(e)||Es(e))oo(e,ou(e),t);else for(var r in e)ce.call(e,r)&&In(t,r,e[r])}),Ks=so(function(t,e){oo(e,au(e),t)}),qs=so(function(t,e,r,n){oo(e,au(e),t,n)}),Zs=so(function(t,e,r,n){oo(e,ou(e),t,n)}),$s=Mo(Un);var Js=Oi(function(t){return t.push(o,Co),Ke(qs,o,t)}),Qs=Oi(function(t){return t.push(o,Ao),Ke(uu,o,t)});function tu(t,e,r){var n=null==t?o:Jn(t,e);return n===o?r:n}function eu(t,e){return null!=t&&Yo(t,e,ni)}var ru=go(function(t,e,r){t[e]=r},Cu(Pu)),nu=go(function(t,e,r){ce.call(t,e)?t[e].push(r):t[e]=[r]},jo),iu=Oi(oi);function ou(t){return Es(t)?On(t):hi(t)}function au(t){return Es(t)?On(t,!0):fi(t)}var su=so(function(t,e,r){gi(t,e,r)}),uu=so(function(t,e,r,n){gi(t,e,r,n)}),lu=Mo(function(t,e){var r={};if(null==t)return r;var n=!1;e=rr(e,function(e){return e=Ki(e,t),n||(n=e.length>1),e}),oo(t,Lo(t),r),n&&(r=Fn(r,f|d|p,Io));for(var i=e.length;i--;)Bi(r,e[i]);return r});var cu=Mo(function(t,e){return null==t?{}:function(t,e){return Ei(t,e,function(e,r){return eu(t,r)})}(t,e)});function hu(t,e){if(null==t)return{};var r=rr(Lo(t),function(t){return[t]});return e=jo(e),Ei(t,r,function(t,r){return e(t,r[0])})}var fu=So(ou),du=So(au);function pu(t){return null==t?[]:Er(t,ou(t))}var _u=ho(function(t,e,r){return e=e.toLowerCase(),t+(r?vu(e):e)});function vu(t){return Ru(zs(t).toLowerCase())}function gu(t){return(t=zs(t))&&t.replace(Zt,Rr).replace(Ee,"")}var yu=ho(function(t,e,r){return t+(r?"-":"")+e.toLowerCase()}),mu=ho(function(t,e,r){return t+(r?" ":"")+e.toLowerCase()}),Eu=co("toLowerCase");var xu=ho(function(t,e,r){return t+(r?"_":"")+e.toLowerCase()});var bu=ho(function(t,e,r){return t+(r?" ":"")+Ru(e)});var Tu=ho(function(t,e,r){return t+(r?" ":"")+e.toUpperCase()}),Ru=co("toUpperCase");function Ou(t,e,r){return t=zs(t),(e=r?o:e)===o?function(t){return Re.test(t)}(t)?function(t){return t.match(be)||[]}(t):function(t){return t.match(Ht)||[]}(t):t.match(e)||[]}var Su=Oi(function(t,e){try{return Ke(t,o,e)}catch(t){return Rs(t)?t:new i(t)}}),wu=Mo(function(t,e){return Ze(e,function(e){e=ha(e),Ln(t,e,ns(t[e],t))}),t});function Cu(t){return function(){return t}}var Au=_o(),Iu=_o(!0);function Pu(t){return t}function Mu(t){return ci("function"==typeof t?t:Fn(t,f))}var Du=Oi(function(t,e){return function(r){return oi(r,t,e)}}),Lu=Oi(function(t,e){return function(r){return oi(t,r,e)}});function Uu(t,e,r){var n=ou(e),i=$n(e,n);null!=r||Cs(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=$n(e,ou(e)));var o=!(Cs(r)&&"chain"in r&&!r.chain),a=Os(t);return Ze(i,function(r){var n=e[r];t[r]=n,a&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__);return(r.__actions__=io(this.__actions__)).push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,nr([this.value()],arguments))})}),t}function Nu(){}var Fu=mo(rr),ju=mo(Je),ku=mo(ar);function Bu(t){return Zo(t)?pr(ha(t)):function(t){return function(e){return Jn(e,t)}}(t)}var Hu=xo(),Xu=xo(!0);function Wu(){return[]}function Gu(){return!1}var Yu=yo(function(t,e){return t+e},0),zu=Ro("ceil"),Vu=yo(function(t,e){return t/e},1),Ku=Ro("floor");var qu=yo(function(t,e){return t*e},1),Zu=Ro("round"),$u=yo(function(t,e){return t-e},0);return _n.after=function(t,e){if("function"!=typeof e)throw new ie(u);return t=Xs(t),function(){if(--t<1)return e.apply(this,arguments)}},_n.ary=es,_n.assign=Vs,_n.assignIn=Ks,_n.assignInWith=qs,_n.assignWith=Zs,_n.at=$s,_n.before=rs,_n.bind=ns,_n.bindAll=wu,_n.bindKey=is,_n.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ys(t)?t:[t]},_n.chain=Ba,_n.chunk=function(t,e,n){e=(n?qo(t,e,n):e===o)?1:zr(Xs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,u=r(kr(i/e));a<i;)u[s++]=Mi(t,a,a+=e);return u},_n.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},_n.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return nr(ys(n)?io(n):[n],zn(e,1))},_n.cond=function(t){var e=null==t?0:t.length,r=jo();return t=e?rr(t,function(t){if("function"!=typeof t[1])throw new ie(u);return[r(t[0]),t[1]]}):[],Oi(function(r){for(var n=-1;++n<e;){var i=t[n];if(Ke(i[0],this,r))return Ke(i[1],this,r)}})},_n.conforms=function(t){return function(t){var e=ou(t);return function(r){return jn(r,t,e)}}(Fn(t,f))},_n.constant=Cu,_n.countBy=Wa,_n.create=function(t,e){var r=vn(t);return null==e?r:Dn(r,e)},_n.curry=function t(e,r,n){var i=wo(e,E,o,o,o,o,o,r=n?o:r);return i.placeholder=t.placeholder,i},_n.curryRight=function t(e,r,n){var i=wo(e,x,o,o,o,o,o,r=n?o:r);return i.placeholder=t.placeholder,i},_n.debounce=os,_n.defaults=Js,_n.defaultsDeep=Qs,_n.defer=as,_n.delay=ss,_n.difference=pa,_n.differenceBy=_a,_n.differenceWith=va,_n.drop=function(t,e,r){var n=null==t?0:t.length;return n?Mi(t,(e=r||e===o?1:Xs(e))<0?0:e,n):[]},_n.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?Mi(t,0,(e=n-(e=r||e===o?1:Xs(e)))<0?0:e):[]},_n.dropRightWhile=function(t,e){return t&&t.length?Xi(t,jo(e,3),!0,!0):[]},_n.dropWhile=function(t,e){return t&&t.length?Xi(t,jo(e,3),!0):[]},_n.fill=function(t,e,r,n){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&qo(t,e,r)&&(r=0,n=i),function(t,e,r,n){var i=t.length;for((r=Xs(r))<0&&(r=-r>i?0:i+r),(n=n===o||n>i?i:Xs(n))<0&&(n+=i),n=r>n?0:Ws(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},_n.filter=function(t,e){return(ys(t)?Qe:Yn)(t,jo(e,3))},_n.flatMap=function(t,e){return zn($a(t,e),1)},_n.flatMapDeep=function(t,e){return zn($a(t,e),D)},_n.flatMapDepth=function(t,e,r){return r=r===o?1:Xs(r),zn($a(t,e),r)},_n.flatten=ma,_n.flattenDeep=function(t){return null!=t&&t.length?zn(t,D):[]},_n.flattenDepth=function(t,e){return null!=t&&t.length?zn(t,e=e===o?1:Xs(e)):[]},_n.flip=function(t){return wo(t,S)},_n.flow=Au,_n.flowRight=Iu,_n.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},_n.functions=function(t){return null==t?[]:$n(t,ou(t))},_n.functionsIn=function(t){return null==t?[]:$n(t,au(t))},_n.groupBy=Ka,_n.initial=function(t){return null!=t&&t.length?Mi(t,0,-1):[]},_n.intersection=xa,_n.intersectionBy=ba,_n.intersectionWith=Ta,_n.invert=ru,_n.invertBy=nu,_n.invokeMap=qa,_n.iteratee=Mu,_n.keyBy=Za,_n.keys=ou,_n.keysIn=au,_n.map=$a,_n.mapKeys=function(t,e){var r={};return e=jo(e,3),qn(t,function(t,n,i){Ln(r,e(t,n,i),t)}),r},_n.mapValues=function(t,e){var r={};return e=jo(e,3),qn(t,function(t,n,i){Ln(r,n,e(t,n,i))}),r},_n.matches=function(t){return _i(Fn(t,f))},_n.matchesProperty=function(t,e){return vi(t,Fn(e,f))},_n.memoize=us,_n.merge=su,_n.mergeWith=uu,_n.method=Du,_n.methodOf=Lu,_n.mixin=Uu,_n.negate=ls,_n.nthArg=function(t){return t=Xs(t),Oi(function(e){return yi(e,t)})},_n.omit=lu,_n.omitBy=function(t,e){return hu(t,ls(jo(e)))},_n.once=function(t){return rs(2,t)},_n.orderBy=function(t,e,r,n){return null==t?[]:(ys(e)||(e=null==e?[]:[e]),ys(r=n?o:r)||(r=null==r?[]:[r]),mi(t,e,r))},_n.over=Fu,_n.overArgs=cs,_n.overEvery=ju,_n.overSome=ku,_n.partial=hs,_n.partialRight=fs,_n.partition=Ja,_n.pick=cu,_n.pickBy=hu,_n.property=Bu,_n.propertyOf=function(t){return function(e){return null==t?o:Jn(t,e)}},_n.pull=Oa,_n.pullAll=Sa,_n.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?xi(t,e,jo(r,2)):t},_n.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?xi(t,e,o,r):t},_n.pullAt=wa,_n.range=Hu,_n.rangeRight=Xu,_n.rearg=ds,_n.reject=function(t,e){return(ys(t)?Qe:Yn)(t,ls(jo(e,3)))},_n.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=jo(e,3);++n<o;){var a=t[n];e(a,n,t)&&(r.push(a),i.push(n))}return bi(t,i),r},_n.rest=function(t,e){if("function"!=typeof t)throw new ie(u);return Oi(t,e=e===o?e:Xs(e))},_n.reverse=Ca,_n.sampleSize=function(t,e,r){return e=(r?qo(t,e,r):e===o)?1:Xs(e),(ys(t)?wn:wi)(t,e)},_n.set=function(t,e,r){return null==t?t:Ci(t,e,r)},_n.setWith=function(t,e,r,n){return n="function"==typeof n?n:o,null==t?t:Ci(t,e,r,n)},_n.shuffle=function(t){return(ys(t)?Cn:Pi)(t)},_n.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&qo(t,e,r)?(e=0,r=n):(e=null==e?0:Xs(e),r=r===o?n:Xs(r)),Mi(t,e,r)):[]},_n.sortBy=Qa,_n.sortedUniq=function(t){return t&&t.length?Ni(t):[]},_n.sortedUniqBy=function(t,e){return t&&t.length?Ni(t,jo(e,2)):[]},_n.split=function(t,e,r){return r&&"number"!=typeof r&&qo(t,e,r)&&(e=r=o),(r=r===o?F:r>>>0)?(t=zs(t))&&("string"==typeof e||null!=e&&!Ds(e))&&!(e=ji(e))&&wr(t)?Zi(Lr(t),0,r):t.split(e,r):[]},_n.spread=function(t,e){if("function"!=typeof t)throw new ie(u);return e=null==e?0:zr(Xs(e),0),Oi(function(r){var n=r[e],i=Zi(r,0,e);return n&&nr(i,n),Ke(t,this,i)})},_n.tail=function(t){var e=null==t?0:t.length;return e?Mi(t,1,e):[]},_n.take=function(t,e,r){return t&&t.length?Mi(t,0,(e=r||e===o?1:Xs(e))<0?0:e):[]},_n.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?Mi(t,(e=n-(e=r||e===o?1:Xs(e)))<0?0:e,n):[]},_n.takeRightWhile=function(t,e){return t&&t.length?Xi(t,jo(e,3),!1,!0):[]},_n.takeWhile=function(t,e){return t&&t.length?Xi(t,jo(e,3)):[]},_n.tap=function(t,e){return e(t),t},_n.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new ie(u);return Cs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),os(t,e,{leading:n,maxWait:e,trailing:i})},_n.thru=Ha,_n.toArray=Bs,_n.toPairs=fu,_n.toPairsIn=du,_n.toPath=function(t){return ys(t)?rr(t,ha):Ns(t)?[t]:io(ca(zs(t)))},_n.toPlainObject=Ys,_n.transform=function(t,e,r){var n=ys(t),i=n||bs(t)||Fs(t);if(e=jo(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:Cs(t)&&Os(o)?vn(Ae(t)):{}}return(i?Ze:qn)(t,function(t,n,i){return e(r,t,n,i)}),r},_n.unary=function(t){return es(t,1)},_n.union=Aa,_n.unionBy=Ia,_n.unionWith=Pa,_n.uniq=function(t){return t&&t.length?ki(t):[]},_n.uniqBy=function(t,e){return t&&t.length?ki(t,jo(e,2)):[]},_n.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?ki(t,o,e):[]},_n.unset=function(t,e){return null==t||Bi(t,e)},_n.unzip=Ma,_n.unzipWith=Da,_n.update=function(t,e,r){return null==t?t:Hi(t,e,Vi(r))},_n.updateWith=function(t,e,r,n){return n="function"==typeof n?n:o,null==t?t:Hi(t,e,Vi(r),n)},_n.values=pu,_n.valuesIn=function(t){return null==t?[]:Er(t,au(t))},_n.without=La,_n.words=Ou,_n.wrap=function(t,e){return hs(Vi(e),t)},_n.xor=Ua,_n.xorBy=Na,_n.xorWith=Fa,_n.zip=ja,_n.zipObject=function(t,e){return Yi(t||[],e||[],In)},_n.zipObjectDeep=function(t,e){return Yi(t||[],e||[],Ci)},_n.zipWith=ka,_n.entries=fu,_n.entriesIn=du,_n.extend=Ks,_n.extendWith=qs,Uu(_n,_n),_n.add=Yu,_n.attempt=Su,_n.camelCase=_u,_n.capitalize=vu,_n.ceil=zu,_n.clamp=function(t,e,r){return r===o&&(r=e,e=o),r!==o&&(r=(r=Gs(r))==r?r:0),e!==o&&(e=(e=Gs(e))==e?e:0),Nn(Gs(t),e,r)},_n.clone=function(t){return Fn(t,p)},_n.cloneDeep=function(t){return Fn(t,f|p)},_n.cloneDeepWith=function(t,e){return Fn(t,f|p,e="function"==typeof e?e:o)},_n.cloneWith=function(t,e){return Fn(t,p,e="function"==typeof e?e:o)},_n.conformsTo=function(t,e){return null==e||jn(t,e,ou(e))},_n.deburr=gu,_n.defaultTo=function(t,e){return null==t||t!=t?e:t},_n.divide=Vu,_n.endsWith=function(t,e,r){t=zs(t),e=ji(e);var n=t.length,i=r=r===o?n:Nn(Xs(r),0,n);return(r-=e.length)>=0&&t.slice(r,i)==e},_n.eq=ps,_n.escape=function(t){return(t=zs(t))&&Ot.test(t)?t.replace(Tt,Or):t},_n.escapeRegExp=function(t){return(t=zs(t))&&Lt.test(t)?t.replace(Dt,"\\$&"):t},_n.every=function(t,e,r){var n=ys(t)?Je:Wn;return r&&qo(t,e,r)&&(e=o),n(t,jo(e,3))},_n.find=Ga,_n.findIndex=ga,_n.findKey=function(t,e){return ur(t,jo(e,3),qn)},_n.findLast=Ya,_n.findLastIndex=ya,_n.findLastKey=function(t,e){return ur(t,jo(e,3),Zn)},_n.floor=Ku,_n.forEach=za,_n.forEachRight=Va,_n.forIn=function(t,e){return null==t?t:Vn(t,jo(e,3),au)},_n.forInRight=function(t,e){return null==t?t:Kn(t,jo(e,3),au)},_n.forOwn=function(t,e){return t&&qn(t,jo(e,3))},_n.forOwnRight=function(t,e){return t&&Zn(t,jo(e,3))},_n.get=tu,_n.gt=_s,_n.gte=vs,_n.has=function(t,e){return null!=t&&Yo(t,e,ri)},_n.hasIn=eu,_n.head=Ea,_n.identity=Pu,_n.includes=function(t,e,r,n){t=Es(t)?t:pu(t),r=r&&!n?Xs(r):0;var i=t.length;return r<0&&(r=zr(i+r,0)),Us(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&cr(t,e,r)>-1},_n.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:Xs(r);return i<0&&(i=zr(n+i,0)),cr(t,e,i)},_n.inRange=function(t,e,r){return e=Hs(e),r===o?(r=e,e=0):r=Hs(r),function(t,e,r){return t>=Vr(e,r)&&t<zr(e,r)}(t=Gs(t),e,r)},_n.invoke=iu,_n.isArguments=gs,_n.isArray=ys,_n.isArrayBuffer=ms,_n.isArrayLike=Es,_n.isArrayLikeObject=xs,_n.isBoolean=function(t){return!0===t||!1===t||As(t)&&ti(t)==G},_n.isBuffer=bs,_n.isDate=Ts,_n.isElement=function(t){return As(t)&&1===t.nodeType&&!Ms(t)},_n.isEmpty=function(t){if(null==t)return!0;if(Es(t)&&(ys(t)||"string"==typeof t||"function"==typeof t.splice||bs(t)||Fs(t)||gs(t)))return!t.length;var e=Go(t);if(e==Z||e==rt)return!t.size;if(Qo(t))return!hi(t).length;for(var r in t)if(ce.call(t,r))return!1;return!0},_n.isEqual=function(t,e){return si(t,e)},_n.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:o)?r(t,e):o;return n===o?si(t,e,o,r):!!n},_n.isError=Rs,_n.isFinite=function(t){return"number"==typeof t&&Wr(t)},_n.isFunction=Os,_n.isInteger=Ss,_n.isLength=ws,_n.isMap=Is,_n.isMatch=function(t,e){return t===e||ui(t,e,Bo(e))},_n.isMatchWith=function(t,e,r){return r="function"==typeof r?r:o,ui(t,e,Bo(e),r)},_n.isNaN=function(t){return Ps(t)&&t!=+t},_n.isNative=function(t){if(Jo(t))throw new i(s);return li(t)},_n.isNil=function(t){return null==t},_n.isNull=function(t){return null===t},_n.isNumber=Ps,_n.isObject=Cs,_n.isObjectLike=As,_n.isPlainObject=Ms,_n.isRegExp=Ds,_n.isSafeInteger=function(t){return Ss(t)&&t>=-L&&t<=L},_n.isSet=Ls,_n.isString=Us,_n.isSymbol=Ns,_n.isTypedArray=Fs,_n.isUndefined=function(t){return t===o},_n.isWeakMap=function(t){return As(t)&&Go(t)==at},_n.isWeakSet=function(t){return As(t)&&ti(t)==st},_n.join=function(t,e){return null==t?"":Gr.call(t,e)},_n.kebabCase=yu,_n.last=Ra,_n.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=Xs(r))<0?zr(n+i,0):Vr(i,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,i):lr(t,fr,i,!0)},_n.lowerCase=mu,_n.lowerFirst=Eu,_n.lt=js,_n.lte=ks,_n.max=function(t){return t&&t.length?Gn(t,Pu,ei):o},_n.maxBy=function(t,e){return t&&t.length?Gn(t,jo(e,2),ei):o},_n.mean=function(t){return dr(t,Pu)},_n.meanBy=function(t,e){return dr(t,jo(e,2))},_n.min=function(t){return t&&t.length?Gn(t,Pu,di):o},_n.minBy=function(t,e){return t&&t.length?Gn(t,jo(e,2),di):o},_n.stubArray=Wu,_n.stubFalse=Gu,_n.stubObject=function(){return{}},_n.stubString=function(){return""},_n.stubTrue=function(){return!0},_n.multiply=qu,_n.nth=function(t,e){return t&&t.length?yi(t,Xs(e)):o},_n.noConflict=function(){return Le._===this&&(Le._=_e),this},_n.noop=Nu,_n.now=ts,_n.pad=function(t,e,r){t=zs(t);var n=(e=Xs(e))?Dr(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Eo(Br(i),r)+t+Eo(kr(i),r)},_n.padEnd=function(t,e,r){t=zs(t);var n=(e=Xs(e))?Dr(t):0;return e&&n<e?t+Eo(e-n,r):t},_n.padStart=function(t,e,r){t=zs(t);var n=(e=Xs(e))?Dr(t):0;return e&&n<e?Eo(e-n,r)+t:t},_n.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),qr(zs(t).replace(Nt,""),e||0)},_n.random=function(t,e,r){if(r&&"boolean"!=typeof r&&qo(t,e,r)&&(e=r=o),r===o&&("boolean"==typeof e?(r=e,e=o):"boolean"==typeof t&&(r=t,t=o)),t===o&&e===o?(t=0,e=1):(t=Hs(t),e===o?(e=t,t=0):e=Hs(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var i=Zr();return Vr(t+i*(e-t+Ie("1e-"+((i+"").length-1))),e)}return Ti(t,e)},_n.reduce=function(t,e,r){var n=ys(t)?ir:vr,i=arguments.length<3;return n(t,jo(e,4),r,i,Hn)},_n.reduceRight=function(t,e,r){var n=ys(t)?or:vr,i=arguments.length<3;return n(t,jo(e,4),r,i,Xn)},_n.repeat=function(t,e,r){return e=(r?qo(t,e,r):e===o)?1:Xs(e),Ri(zs(t),e)},_n.replace=function(){var t=arguments,e=zs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},_n.result=function(t,e,r){var n=-1,i=(e=Ki(e,t)).length;for(i||(i=1,t=o);++n<i;){var a=null==t?o:t[ha(e[n])];a===o&&(n=i,a=r),t=Os(a)?a.call(t):a}return t},_n.round=Zu,_n.runInContext=t,_n.sample=function(t){return(ys(t)?Sn:Si)(t)},_n.size=function(t){if(null==t)return 0;if(Es(t))return Us(t)?Dr(t):t.length;var e=Go(t);return e==Z||e==rt?t.size:hi(t).length},_n.snakeCase=xu,_n.some=function(t,e,r){var n=ys(t)?ar:Di;return r&&qo(t,e,r)&&(e=o),n(t,jo(e,3))},_n.sortedIndex=function(t,e){return Li(t,e)},_n.sortedIndexBy=function(t,e,r){return Ui(t,e,jo(r,2))},_n.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=Li(t,e);if(n<r&&ps(t[n],e))return n}return-1},_n.sortedLastIndex=function(t,e){return Li(t,e,!0)},_n.sortedLastIndexBy=function(t,e,r){return Ui(t,e,jo(r,2),!0)},_n.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=Li(t,e,!0)-1;if(ps(t[r],e))return r}return-1},_n.startCase=bu,_n.startsWith=function(t,e,r){return t=zs(t),r=null==r?0:Nn(Xs(r),0,t.length),e=ji(e),t.slice(r,r+e.length)==e},_n.subtract=$u,_n.sum=function(t){return t&&t.length?gr(t,Pu):0},_n.sumBy=function(t,e){return t&&t.length?gr(t,jo(e,2)):0},_n.template=function(t,e,r){var n=_n.templateSettings;r&&qo(t,e,r)&&(e=o),t=zs(t),e=qs({},e,n,Co);var i,a,s=qs({},e.imports,n.imports,Co),u=ou(s),l=Er(s,u),c=0,h=e.interpolate||$t,f="__p += '",d=re((e.escape||$t).source+"|"+h.source+"|"+(h===Ct?Wt:$t).source+"|"+(e.evaluate||$t).source+"|$","g"),p="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Se+"]")+"\n";t.replace(d,function(e,r,n,o,s,u){return n||(n=o),f+=t.slice(c,u).replace(Jt,Sr),r&&(i=!0,f+="' +\n__e("+r+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=u+e.length,e}),f+="';\n";var _=e.variable;_||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(mt,""):f).replace(Et,"$1").replace(xt,"$1;"),f="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Su(function(){return Qt(u,p+"return "+f).apply(o,l)});if(v.source=f,Rs(v))throw v;return v},_n.times=function(t,e){if((t=Xs(t))<1||t>L)return[];var r=F,n=Vr(t,F);e=jo(e),t-=F;for(var i=yr(n,e);++r<t;)e(r);return i},_n.toFinite=Hs,_n.toInteger=Xs,_n.toLength=Ws,_n.toLower=function(t){return zs(t).toLowerCase()},_n.toNumber=Gs,_n.toSafeInteger=function(t){return t?Nn(Xs(t),-L,L):0===t?t:0},_n.toString=zs,_n.toUpper=function(t){return zs(t).toUpperCase()},_n.trim=function(t,e,r){if((t=zs(t))&&(r||e===o))return t.replace(Ut,"");if(!t||!(e=ji(e)))return t;var n=Lr(t),i=Lr(e);return Zi(n,br(n,i),Tr(n,i)+1).join("")},_n.trimEnd=function(t,e,r){if((t=zs(t))&&(r||e===o))return t.replace(Ft,"");if(!t||!(e=ji(e)))return t;var n=Lr(t);return Zi(n,0,Tr(n,Lr(e))+1).join("")},_n.trimStart=function(t,e,r){if((t=zs(t))&&(r||e===o))return t.replace(Nt,"");if(!t||!(e=ji(e)))return t;var n=Lr(t);return Zi(n,br(n,Lr(e))).join("")},_n.truncate=function(t,e){var r=w,n=C;if(Cs(e)){var i="separator"in e?e.separator:i;r="length"in e?Xs(e.length):r,n="omission"in e?ji(e.omission):n}var a=(t=zs(t)).length;if(wr(t)){var s=Lr(t);a=s.length}if(r>=a)return t;var u=r-Dr(n);if(u<1)return n;var l=s?Zi(s,0,u).join(""):t.slice(0,u);if(i===o)return l+n;if(s&&(u+=l.length-u),Ds(i)){if(t.slice(u).search(i)){var c,h=l;for(i.global||(i=re(i.source,zs(Gt.exec(i))+"g")),i.lastIndex=0;c=i.exec(h);)var f=c.index;l=l.slice(0,f===o?u:f)}}else if(t.indexOf(ji(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+n},_n.unescape=function(t){return(t=zs(t))&&Rt.test(t)?t.replace(bt,Ur):t},_n.uniqueId=function(t){var e=++he;return zs(t)+e},_n.upperCase=Tu,_n.upperFirst=Ru,_n.each=za,_n.eachRight=Va,_n.first=Ea,Uu(_n,function(){var t={};return qn(_n,function(e,r){ce.call(_n.prototype,r)||(t[r]=e)}),t}(),{chain:!1}),_n.VERSION="4.17.4",Ze(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){_n[t].placeholder=_n}),Ze(["drop","take"],function(t,e){mn.prototype[t]=function(r){r=r===o?1:zr(Xs(r),0);var n=this.__filtered__&&!e?new mn(this):this.clone();return n.__filtered__?n.__takeCount__=Vr(r,n.__takeCount__):n.__views__.push({size:Vr(r,F),type:t+(n.__dir__<0?"Right":"")}),n},mn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ze(["filter","map","takeWhile"],function(t,e){var r=e+1,n=r==P||3==r;mn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:jo(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}}),Ze(["head","last"],function(t,e){var r="take"+(e?"Right":"");mn.prototype[t]=function(){return this[r](1).value()[0]}}),Ze(["initial","tail"],function(t,e){var r="drop"+(e?"":"Right");mn.prototype[t]=function(){return this.__filtered__?new mn(this):this[r](1)}}),mn.prototype.compact=function(){return this.filter(Pu)},mn.prototype.find=function(t){return this.filter(t).head()},mn.prototype.findLast=function(t){return this.reverse().find(t)},mn.prototype.invokeMap=Oi(function(t,e){return"function"==typeof t?new mn(this):this.map(function(r){return oi(r,t,e)})}),mn.prototype.reject=function(t){return this.filter(ls(jo(t)))},mn.prototype.slice=function(t,e){t=Xs(t);var r=this;return r.__filtered__&&(t>0||e<0)?new mn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==o&&(r=(e=Xs(e))<0?r.dropRight(-e):r.take(e-t)),r)},mn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},mn.prototype.toArray=function(){return this.take(F)},qn(mn.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),i=_n[n?"take"+("last"==e?"Right":""):e],a=n||/^find/.test(e);i&&(_n.prototype[e]=function(){var e=this.__wrapped__,s=n?[1]:arguments,u=e instanceof mn,l=s[0],c=u||ys(e),h=function(t){var e=i.apply(_n,nr([t],s));return n&&f?e[0]:e};c&&r&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,d=!!this.__actions__.length,p=a&&!f,_=u&&!d;if(!a&&c){e=_?e:new mn(this);var v=t.apply(e,s);return v.__actions__.push({func:Ha,args:[h],thisArg:o}),new yn(v,f)}return p&&_?t.apply(this,s):(v=this.thru(h),p?n?v.value()[0]:v.value():v)})}),Ze(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);_n.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(ys(i)?i:[],t)}return this[r](function(r){return e.apply(ys(r)?r:[],t)})}}),qn(mn.prototype,function(t,e){var r=_n[e];if(r){var n=r.name+"";(an[n]||(an[n]=[])).push({name:e,func:r})}}),an[vo(o,y).name]=[{name:"wrapper",func:o}],mn.prototype.clone=function(){var t=new mn(this.__wrapped__);return t.__actions__=io(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=io(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=io(this.__views__),t},mn.prototype.reverse=function(){if(this.__filtered__){var t=new mn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},mn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=ys(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Vr(e,t+a);break;case"takeRight":t=zr(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=n?s:a-1,c=this.__iteratees__,h=c.length,f=0,d=Vr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return Wi(t,this.__actions__);var p=[];t:for(;u--&&f<d;){for(var _=-1,v=t[l+=e];++_<h;){var g=c[_],y=g.iteratee,m=g.type,E=y(v);if(m==M)v=E;else if(!E){if(m==P)continue t;break t}}p[f++]=v}return p},_n.prototype.at=Xa,_n.prototype.chain=function(){return Ba(this)},_n.prototype.commit=function(){return new yn(this.value(),this.__chain__)},_n.prototype.next=function(){this.__values__===o&&(this.__values__=Bs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},_n.prototype.plant=function(t){for(var e,r=this;r instanceof gn;){var n=da(r);n.__index__=0,n.__values__=o,e?i.__wrapped__=n:e=n;var i=n;r=r.__wrapped__}return i.__wrapped__=t,e},_n.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof mn){var e=t;return this.__actions__.length&&(e=new mn(this)),(e=e.reverse()).__actions__.push({func:Ha,args:[Ca],thisArg:o}),new yn(e,this.__chain__)}return this.thru(Ca)},_n.prototype.toJSON=_n.prototype.valueOf=_n.prototype.value=function(){return Wi(this.__wrapped__,this.__actions__)},_n.prototype.first=_n.prototype.head,je&&(_n.prototype[je]=function(){return this}),_n}();Le._=Nr,(i=function(){return Nr}.call(e,r,e,n))===o||(n.exports=i)}).call(this)}).call(this,r(19),r(56)(t))},function(t,e,r){(function(t){function r(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(t){return n.exec(t).slice(1)};function o(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}e.resolve=function(){for(var e="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var a=i>=0?arguments[i]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,n="/"===a.charAt(0))}return e=r(o(e.split("/"),function(t){return!!t}),!n).join("/"),(n?"/":"")+e||"."},e.normalize=function(t){var n=e.isAbsolute(t),i="/"===a(t,-1);return(t=r(o(t.split("/"),function(t){return!!t}),!n).join("/"))||n||(t="."),t&&i&&(t+="/"),(n?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(o(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},e.relative=function(t,r){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var i=n(t.split("/")),o=n(r.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u<a;u++)if(i[u]!==o[u]){s=u;break}var l=[];for(u=s;u<i.length;u++)l.push("..");return(l=l.concat(o.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){var e=i(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},e.basename=function(t,e){var r=i(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){return i(t)[3]};var a="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,r(129))},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=h(r(12)),o=h(r(57)),a=h(r(58)),s=h(r(11)),u=r(6),l=r(4),c=h(r(5));function h(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(r,n,i,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));if(s.noFrame=!1,n||(s.noFrame=!0,n=new u.Rectangle(0,0,1,1)),r instanceof e&&(r=r.baseTexture),s.baseTexture=r,s._frame=n,s.trim=o,s.valid=!1,s.requiresUpdate=!1,s._uvs=null,s.orig=i||n,s._rotate=Number(a||0),!0===a)s._rotate=2;else if(s._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return r.hasLoaded?(s.noFrame&&(n=new u.Rectangle(0,0,r.width,r.height),r.on("update",s.onBaseTextureUpdated,s)),s.frame=n):r.once("loaded",s.onBaseTextureLoaded,s),s._updateID=0,s.transform=null,s.textureCacheIds=[],s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.update=function(){this.baseTexture.update()},e.prototype.onBaseTextureLoaded=function(t){this._updateID++,this.noFrame?this.frame=new u.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},e.prototype.onBaseTextureUpdated=function(t){this._updateID++,this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},e.prototype.destroy=function(t){this.baseTexture&&(t&&(l.TextureCache[this.baseTexture.imageUrl]&&e.removeFromCache(this.baseTexture.imageUrl),this.baseTexture.destroy()),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){return new e(this.baseTexture,this.frame,this.orig,this.trim,this.rotate)},e.prototype._updateUvs=function(){this._uvs||(this._uvs=new a.default),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.fromImage=function(t,r,n,o){var a=l.TextureCache[t];return a||(a=new e(i.default.fromImage(t,r,n,o)),e.addToCache(a,t)),a},e.fromFrame=function(t){var e=l.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},e.fromCanvas=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";return new e(i.default.fromCanvas(t,r,n))},e.fromVideo=function(t,r){return"string"==typeof t?e.fromVideoUrl(t,r):new e(o.default.fromVideo(t,r))},e.fromVideoUrl=function(t,r){return new e(o.default.fromUrl(t,r))},e.from=function(t){if("string"==typeof t){var r=l.TextureCache[t];return r||(null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/)?e.fromVideoUrl(t):e.fromImage(t))}return t instanceof HTMLImageElement?new e(i.default.from(t)):t instanceof HTMLCanvasElement?e.fromCanvas(t,c.default.SCALE_MODE,"HTMLCanvasElement"):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof i.default?new e(t):t},e.fromLoader=function(t,r,n){var o=new i.default(t,void 0,(0,l.getResolutionOfUrl)(r)),a=new e(o);return o.imageUrl=r,n||(n=r),i.default.addToCache(a.baseTexture,n),e.addToCache(a,n),n!==r&&(i.default.addToCache(a.baseTexture,r),e.addToCache(a,r)),a},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),l.TextureCache[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),l.TextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=l.TextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete l.TextureCache[t],e}}else if(t&&t.textureCacheIds){for(var n=0;n<t.textureCacheIds.length;++n)l.TextureCache[t.textureCacheIds[n]]===t&&delete l.TextureCache[t.textureCacheIds[n]];return t.textureCacheIds.length=0,t}return null},n(e,[{key:"frame",get:function(){return this._frame},set:function(t){this._frame=t,this.noFrame=!1;var e=t.x,r=t.y,n=t.width,i=t.height,o=e+n>this.baseTexture.width,a=r+i>this.baseTexture.height;if(o||a){var s=o&&a?"and":"or",u="X: "+e+" + "+n+" = "+(e+n)+" > "+this.baseTexture.width,l="Y: "+r+" + "+i+" = "+(r+i)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+u+" "+s+" "+l)}this.valid=n&&i&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs()}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig.width}},{key:"height",get:function(){return this.orig.height}}]),e}(s.default);function d(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}e.default=f,f.EMPTY=new f(new i.default),d(f.EMPTY),d(f.EMPTY.baseTexture),f.WHITE=function(){var t=document.createElement("canvas");t.width=10,t.height=10;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,10,10),new f(new i.default(t))}(),d(f.WHITE),d(f.WHITE.baseTexture)},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function s(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),s.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},s.prototype.listeners=function(t,e){var r=i?i+t:t,n=this._events[r];if(e)return!!n;if(!n)return[];if(n.fn)return[n.fn];for(var o=0,a=n.length,s=new Array(a);o<a;o++)s[o]=n[o].fn;return s},s.prototype.emit=function(t,e,r,n,o,a){var s=i?i+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,n),!0;case 5:return c.fn.call(c.context,e,r,n,o),!0;case 6:return c.fn.call(c.context,e,r,n,o,a),!0}for(l=1,u=new Array(h-1);l<h;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,r);break;case 4:c[l].fn.call(c[l].context,e,r,n);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(t,e,r){var n=new a(e,r||this),o=i?i+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],n]:this._events[o].push(n):(this._events[o]=n,this._eventsCount++),this},s.prototype.once=function(t,e,r){var n=new a(e,r||this,!0),o=i?i+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],n]:this._events[o].push(n):(this._events[o]=n,this._eventsCount++),this},s.prototype.removeListener=function(t,e,r,n){var a=i?i+t:t;if(!this._events[a])return this;if(!e)return 0==--this._eventsCount?this._events=new o:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==e||n&&!s.once||r&&s.context!==r||(0==--this._eventsCount?this._events=new o:delete this._events[a]);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==e||n&&!s[u].once||r&&s[u].context!==r)&&l.push(s[u]);l.length?this._events[a]=1===l.length?l[0]:l:0==--this._eventsCount?this._events=new o:delete this._events[a]}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new o:delete this._events[e])):(this._events=new o,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=i,s.EventEmitter=s,t.exports=s},function(t,e,r){"use strict";e.__esModule=!0;var n=r(4),i=u(r(5)),o=u(r(11)),a=u(r(54)),s=u(r(33));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(r,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return s.uid=(0,n.uid)(),s.touched=0,s.resolution=a||i.default.RESOLUTION,s.width=100,s.height=100,s.realWidth=100,s.realHeight=100,s.scaleMode=void 0!==o?o:i.default.SCALE_MODE,s.hasLoaded=!1,s.isLoading=!1,s.source=null,s.origSource=null,s.imageType=null,s.sourceScale=1,s.premultipliedAlpha=!0,s.imageUrl=null,s.isPowerOfTwo=!1,s.mipmap=i.default.MIPMAP_TEXTURES,s.wrapMode=i.default.WRAP_MODE,s._glTextures={},s._enabled=0,s._virtalBoundId=-1,s._destroyed=!1,s.textureCacheIds=[],r&&s.loadSource(r),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.update=function(){"svg"!==this.imageType&&(this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this._updateDimensions()),this.emit("update",this)},e.prototype._updateDimensions=function(){this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=s.default.isPow2(this.realWidth)&&s.default.isPow2(this.realHeight)},e.prototype.loadSource=function(t){var e=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null);var r=!this.source;if(this.source=t,(t.src&&t.complete||t.getContext)&&t.width&&t.height)this._updateImageType(),"svg"===this.imageType?this._loadSvgSource():this._sourceLoaded(),r&&this.emit("loaded",this);else if(!t.getContext){this.isLoading=!0;var n=this;if(t.onload=function(){n._updateImageType(),t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n._sourceLoaded(),"svg"!==n.imageType?n.emit("loaded",n):n._loadSvgSource())},t.onerror=function(){t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n.emit("error",n))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===n.imageType)return void n._loadSvgSource();this.isLoading=!1,t.width&&t.height?(this._sourceLoaded(),e&&this.emit("loaded",this)):e&&this.emit("error",this)}}},e.prototype._updateImageType=function(){if(this.imageUrl){var t=(0,n.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var r=t.subType.split("+")[0];if(!(e=(0,n.getUrlFileExtension)("."+r)))throw new Error("Invalid image type in data URI.")}else(e=(0,n.getUrlFileExtension)(this.imageUrl))||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function(){if("svg"===this.imageType){var t=(0,n.decomposeDataUri)(this.imageUrl);t?this._loadSvgSourceUsingDataUri(t):this._loadSvgSourceUsingXhr()}},e.prototype._loadSvgSourceUsingDataUri=function(t){var e=void 0;if("base64"===t.encoding){if(!atob)throw new Error("Your browser doesn't support base64 conversions.");e=atob(t.data)}else e=t.data;this._loadSvgSourceUsingString(e)},e.prototype._loadSvgSourceUsingXhr=function(){var t=this,e=new XMLHttpRequest;e.onload=function(){if(e.readyState!==e.DONE||200!==e.status)throw new Error("Failed to load SVG using XHR.");t._loadSvgSourceUsingString(e.response)},e.onerror=function(){return t.emit("error",t)},e.open("GET",this.imageUrl,!0),e.send()},e.prototype._loadSvgSourceUsingString=function(t){var r=(0,n.getSvgSize)(t),i=r.width,o=r.height;if(!i||!o)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(i*this.sourceScale),this.realHeight=Math.round(o*this.sourceScale),this._updateDimensions();var a=document.createElement("canvas");a.width=this.realWidth,a.height=this.realHeight,a._pixiId="canvas_"+(0,n.uid)(),a.getContext("2d").drawImage(this.source,0,0,i,o,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=a,e.addToCache(this,a._pixiId),this.isLoading=!1,this._sourceLoaded(),this.emit("loaded",this)},e.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},e.prototype.destroy=function(){this.imageUrl&&(delete n.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source=null,this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this._destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},e.fromImage=function(t,r,i,o){var s=n.BaseTextureCache[t];if(!s){var u=new Image;void 0===r&&0!==t.indexOf("data:")?u.crossOrigin=(0,a.default)(t):r&&(u.crossOrigin="string"==typeof r?r:"anonymous"),(s=new e(u,i)).imageUrl=t,o&&(s.sourceScale=o),s.resolution=(0,n.getResolutionOfUrl)(t),u.src=t,e.addToCache(s,t)}return s},e.fromCanvas=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";t._pixiId||(t._pixiId=i+"_"+(0,n.uid)());var o=n.BaseTextureCache[t._pixiId];return o||(o=new e(t,r),e.addToCache(o,t._pixiId)),o},e.from=function(t,r,i){if("string"==typeof t)return e.fromImage(t,void 0,r,i);if(t instanceof HTMLImageElement){var o=t.src,a=n.BaseTextureCache[o];return a||((a=new e(t,r)).imageUrl=o,i&&(a.sourceScale=i),a.resolution=(0,n.getResolutionOfUrl)(o),e.addToCache(a,o)),a}return t instanceof HTMLCanvasElement?e.fromCanvas(t,r):t},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),n.BaseTextureCache[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),n.BaseTextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=n.BaseTextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete n.BaseTextureCache[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)delete n.BaseTextureCache[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},e}(o.default);e.default=l},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(4);var o=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.children=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onChildrenChange=function(){},e.prototype.addChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r<e;r++)this.addChild(arguments[r]);else t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),t.emit("added",this);return t},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),t},e.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),n=this.getChildIndex(e);this.children[r]=e,this.children[n]=t,this.onChildrenChange(r<n?r:n)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(t);(0,i.removeItems)(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r<e;r++)this.removeChild(arguments[r]);else{var n=this.children.indexOf(t);if(-1===n)return null;t.parent=null,t.transform._parentID=-1,(0,i.removeItems)(this.children,n,1),this._boundsID++,this.onChildrenChange(n),t.emit("removed",this)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,(0,i.removeItems)(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),e},e.prototype.removeChildren=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],r=t,n="number"==typeof e?e:this.children.length,i=n-r,o=void 0;if(i>0&&i<=n){o=this.children.splice(r,i);for(var a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(var s=0;s<o.length;++s)o[s].emit("removed",this);return o}if(0===i&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var r=this.children[t];r.visible&&r.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];e.visible&&e.renderable&&(e.calculateBounds(),e._mask?(e._mask.calculateBounds(),this._bounds.addBoundsMask(e._bounds,e._mask._bounds)):e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds))}this._lastBoundsID=this._boundsID},e.prototype._calculateBounds=function(){},e.prototype.renderWebGL=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this._filters)this.renderAdvancedWebGL(t);else{this._renderWebGL(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderWebGL(t)}},e.prototype.renderAdvancedWebGL=function(t){t.flush();var e=this._filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var n=0;n<e.length;n++)e[n].enabled&&this._enabledFilters.push(e[n]);this._enabledFilters.length&&t.filterManager.pushFilter(this,this._enabledFilters)}r&&t.maskManager.pushMask(this,this._mask),this._renderWebGL(t);for(var i=0,o=this.children.length;i<o;i++)this.children[i].renderWebGL(t);t.flush(),r&&t.maskManager.popMask(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filterManager.popFilter()},e.prototype._renderWebGL=function(t){},e.prototype._renderCanvas=function(t){},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable){this._mask&&t.maskManager.pushMask(this._mask),this._renderCanvas(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderCanvas(t);this._mask&&t.maskManager.popMask(t)}},e.prototype.destroy=function(e){t.prototype.destroy.call(this);var r="boolean"==typeof e?e:e&&e.children,n=this.removeChildren(0,this.children.length);if(r)for(var i=0;i<n.length;++i)n[i].destroy(e)},n(e,[{key:"width",get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t}},{key:"height",get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(r(51)).default);e.default=o,o.prototype.containerUpdateTransform=o.prototype.updateTransform},function(t,e,r){"use strict";e.__esModule=!0;var n=c(r(59)),i=c(r(124)),o=c(r(61)),a=c(r(125)),s=r(4),u=r(2),l=c(r(5));function c(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(r,n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"Canvas",r,n,o));return s.type=u.RENDERER_TYPE.CANVAS,s.rootContext=s.view.getContext("2d",{alpha:s.transparent}),s.context=s.rootContext,s.refresh=!0,s.maskManager=new i.default(s),s.smoothProperty="imageSmoothingEnabled",s.rootContext.imageSmoothingEnabled||(s.rootContext.webkitImageSmoothingEnabled?s.smoothProperty="webkitImageSmoothingEnabled":s.rootContext.mozImageSmoothingEnabled?s.smoothProperty="mozImageSmoothingEnabled":s.rootContext.oImageSmoothingEnabled?s.smoothProperty="oImageSmoothingEnabled":s.rootContext.msImageSmoothingEnabled&&(s.smoothProperty="msImageSmoothingEnabled")),s.initPlugins(),s.blendModes=(0,a.default)(),s._activeBlendMode=null,s.renderingToScreen=!1,s.resize(s.options.width,s.options.height),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.render=function(t,e,r,n,i){if(this.view){this.renderingToScreen=!e,this.emit("prerender");var a=this.resolution;e?((e=e.baseTexture||e)._canvasRenderTarget||(e._canvasRenderTarget=new o.default(e.width,e.height,e.resolution),e.source=e._canvasRenderTarget.canvas,e.valid=!0),this.context=e._canvasRenderTarget.context,this.resolution=e._canvasRenderTarget.resolution):this.context=this.rootContext;var s=this.context;if(e||(this._lastObjectRendered=t),!i){var l=t.parent,c=this._tempDisplayObjectParent.transform.worldTransform;n?(n.copy(c),this._tempDisplayObjectParent.transform._worldID=-1):c.identity(),t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=l}s.save(),s.setTransform(1,0,0,1,0,0),s.globalAlpha=1,this._activeBlendMode=u.BLEND_MODES.NORMAL,s.globalCompositeOperation=this.blendModes[u.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(s.fillStyle="black",s.clear()),(void 0!==r?r:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?s.clearRect(0,0,this.width,this.height):(s.fillStyle=this._backgroundColorString,s.fillRect(0,0,this.width,this.height)));var h=this.context;this.context=s,t.renderCanvas(this),this.context=h,s.restore(),this.resolution=a,this.emit("postrender")}},e.prototype.clear=function(t){var e=this.context;t=t||this._backgroundColorString,!this.transparent&&t?(e.fillStyle=t,e.fillRect(0,0,this.width,this.height)):e.clearRect(0,0,this.width,this.height)},e.prototype.setBlendMode=function(t){this._activeBlendMode!==t&&(this._activeBlendMode=t,this.context.globalCompositeOperation=this.blendModes[t])},e.prototype.destroy=function(e){this.destroyPlugins(),t.prototype.destroy.call(this,e),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this.smoothProperty&&(this.rootContext[this.smoothProperty]=l.default.SCALE_MODE===u.SCALE_MODES.LINEAR)},e.prototype.invalidateBlendMode=function(){this._activeBlendMode=this.blendModes.indexOf(this.context.globalCompositeOperation)},e}(n.default);e.default=h,s.pluginTarget.mixin(h)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.renderer.on("context",this.onContextChange,this)}return t.prototype.onContextChange=function(){},t.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null},t}();e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=r(7),i=function(t){return t&&t.__esModule?t:{default:t}}(r(5));function o(t,e){if(t instanceof Array){if("precision"!==t[0].substring(0,9)){var r=t.slice(0);return r.unshift("precision "+e+" float;"),r}}else if("precision"!==t.trim().substring(0,9))return"precision "+e+" float;\n"+t;return t}var a=function(t){function e(r,n,a,s,u){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o(n,u||i.default.PRECISION_VERTEX),o(a,u||i.default.PRECISION_FRAGMENT),void 0,s))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.GLShader);e.default=a},function(t,e,r){"use strict";var n=r(178).Loader,i=r(38).Resource,o=r(86),a=r(87);n.Resource=i,n.async=o,n.encodeBinary=a,n.base64=a,t.exports=n,t.exports.Loader=n,t.exports.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=function(t){return t&&t.__esModule?t:{default:t}}(r(10));var a=new i.Point,s=new i.Polygon,u=function(t){function e(r,n,a,s,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var l=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return l._texture=r||o.default.EMPTY,l.uvs=a||new Float32Array([0,0,1,0,1,1,0,1]),l.vertices=n||new Float32Array([0,0,100,0,100,100,0,100]),l.indices=s||new Uint16Array([0,1,3,2]),l.dirty=0,l.indexDirty=0,l.vertexDirty=0,l.autoUpdate=!0,l.blendMode=i.BLEND_MODES.NORMAL,l.canvasPadding=i.settings.MESH_CANVAS_PADDING,l.drawMode=u||e.DRAW_MODES.TRIANGLE_MESH,l.shader=null,l.tintRgb=new Float32Array([1,1,1]),l._glDatas={},l._uvTransform=new i.TextureMatrix(l._texture),l.uploadUvTransform=!1,l.pluginName="mesh",l}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._renderWebGL=function(t){this.refresh(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){this.refresh(),t.plugins[this.pluginName].render(this)},e.prototype._onTextureUpdate=function(){this._uvTransform.texture=this._texture,this.refresh()},e.prototype.multiplyUvs=function(){this.uploadUvTransform||this._uvTransform.multiplyUvs(this.uvs)},e.prototype.refresh=function(t){this.autoUpdate&&this.vertexDirty++,this._uvTransform.update(t)&&this._refresh()},e.prototype._refresh=function(){},e.prototype._calculateBounds=function(){this._bounds.addVertices(this.transform,this.vertices,0,this.vertices.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,a);for(var r=this.vertices,n=s.points,i=this.indices,o=this.indices.length,u=this.drawMode===e.DRAW_MODES.TRIANGLES?3:1,l=0;l+2<o;l+=u){var c=2*i[l],h=2*i[l+1],f=2*i[l+2];if(n[0]=r[c],n[1]=r[c+1],n[2]=r[h],n[3]=r[h+1],n[4]=r[f],n[5]=r[f+1],s.contains(a.x,a.y))return!0}return!1},e.prototype.destroy=function(e){for(var r in this._glDatas){var n=this._glDatas[r];n.destroy?n.destroy():(n.vertexBuffer&&(n.vertexBuffer.destroy(),n.vertexBuffer=null),n.indexBuffer&&(n.indexBuffer.destroy(),n.indexBuffer=null),n.uvBuffer&&(n.uvBuffer.destroy(),n.uvBuffer=null),n.vao&&(n.vao.destroy(),n.vao=null))}this._glDatas=null,t.prototype.destroy.call(this,e)},n(e,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}},{key:"tint",get:function(){return i.utils.rgb2hex(this.tintRgb)},set:function(t){this.tintRgb=i.utils.hex2rgb(t,this.tintRgb)}}]),e}(i.Container);e.default=u,u.DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.flush=function(){},e.prototype.render=function(t){},e}(function(t){return t&&t.__esModule?t:{default:t}}(r(15)).default);e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=y(r(59)),i=y(r(127)),o=y(r(130)),a=y(r(131)),s=y(r(22)),u=y(r(20)),l=y(r(133)),c=y(r(12)),h=y(r(134)),f=y(r(135)),d=y(r(137)),p=y(r(138)),_=r(4),v=y(r(7)),g=r(2);function y(t){return t&&t.__esModule?t:{default:t}}var m=0,E=function(t){function e(r,n,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"WebGL",r,n,a));return s.legacy=s.options.legacy,s.legacy&&(v.default.VertexArrayObject.FORCE_NATIVE=!0),s.type=g.RENDERER_TYPE.WEBGL,s.handleContextLost=s.handleContextLost.bind(s),s.handleContextRestored=s.handleContextRestored.bind(s),s.view.addEventListener("webglcontextlost",s.handleContextLost,!1),s.view.addEventListener("webglcontextrestored",s.handleContextRestored,!1),s._contextOptions={alpha:s.transparent,antialias:s.options.antialias,premultipliedAlpha:s.transparent&&"notMultiplied"!==s.transparent,stencil:!0,preserveDrawingBuffer:s.options.preserveDrawingBuffer,powerPreference:s.options.powerPreference},s._backgroundColorRgba[3]=s.transparent?0:1,s.maskManager=new i.default(s),s.stencilManager=new o.default(s),s.emptyRenderer=new u.default(s),s.currentRenderer=s.emptyRenderer,s.textureManager=null,s.filterManager=null,s.initPlugins(),s.options.context&&(0,p.default)(s.options.context),s.gl=s.options.context||v.default.createContext(s.view,s._contextOptions),s.CONTEXT_UID=m++,s.state=new f.default(s.gl),s.renderingToScreen=!0,s.boundTextures=null,s._activeShader=null,s._activeVao=null,s._activeRenderTarget=null,s._initContext(),s.drawModes=(0,d.default)(s.gl),s._nextTextureLocation=0,s.setBlendMode(0),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._initContext=function(){var t=this.gl;t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext();var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this._activeShader=null,this._activeVao=null,this.boundTextures=new Array(e),this.emptyTextures=new Array(e),this.textureManager=new l.default(this),this.filterManager=new a.default(this),this.textureGC=new h.default(this),this.state.resetToDefault(),this.rootRenderTarget=new s.default(t,this.width,this.height,null,this.resolution,!0),this.rootRenderTarget.clearColor=this._backgroundColorRgba,this.bindRenderTarget(this.rootRenderTarget);var r=new v.default.GLTexture.fromData(t,null,1,1),n={_glTextures:{}};n._glTextures[this.CONTEXT_UID]={};for(var i=0;i<e;i++){var o=new c.default;o._glTextures[this.CONTEXT_UID]=r,this.boundTextures[i]=n,this.emptyTextures[i]=o,this.bindTexture(null,i)}this.emit("context",t),this.resize(this.screen.width,this.screen.height)},e.prototype.render=function(t,e,r,n,i){if(this.renderingToScreen=!e,this.emit("prerender"),this.gl&&!this.gl.isContextLost()){if(this._nextTextureLocation=0,e||(this._lastObjectRendered=t),!i){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}this.bindRenderTexture(e,n),this.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this._activeRenderTarget.clear(),t.renderWebGL(this),this.currentRenderer.flush(),this.textureGC.update(),this.emit("postrender")}},e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.resize=function(t,e){n.default.prototype.resize.call(this,t,e),this.rootRenderTarget.resize(t,e),this._activeRenderTarget===this.rootRenderTarget&&(this.rootRenderTarget.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=this.rootRenderTarget.projectionMatrix.toArray(!0)))},e.prototype.setBlendMode=function(t){this.state.setBlendMode(t)},e.prototype.clear=function(t){this._activeRenderTarget.clear(t)},e.prototype.setTransform=function(t){this._activeRenderTarget.transform=t},e.prototype.clearRenderTexture=function(t,e){var r=t.baseTexture._glRenderTargets[this.CONTEXT_UID];return r&&r.clear(e),this},e.prototype.bindRenderTexture=function(t,e){var r=void 0;if(t){var n=t.baseTexture;n._glRenderTargets[this.CONTEXT_UID]||this.textureManager.updateTexture(n,0),this.unbindTexture(n),(r=n._glRenderTargets[this.CONTEXT_UID]).setFrame(t.frame)}else r=this.rootRenderTarget;return r.transform=e,this.bindRenderTarget(r),this},e.prototype.bindRenderTarget=function(t){return t!==this._activeRenderTarget&&(this._activeRenderTarget=t,t.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=t.projectionMatrix.toArray(!0)),this.stencilManager.setMaskStack(t.stencilMaskStack)),this},e.prototype.bindShader=function(t,e){return this._activeShader!==t&&(this._activeShader=t,t.bind(),!1!==e&&(t.uniforms.projectionMatrix=this._activeRenderTarget.projectionMatrix.toArray(!0))),this},e.prototype.bindTexture=function(t,e,r){if((t=(t=t||this.emptyTextures[e]).baseTexture||t).touched=this.textureGC.count,r)e=e||0;else{for(var n=0;n<this.boundTextures.length;n++)if(this.boundTextures[n]===t)return n;void 0===e&&(this._nextTextureLocation++,this._nextTextureLocation%=this.boundTextures.length,e=this.boundTextures.length-this._nextTextureLocation-1)}var i=this.gl,o=t._glTextures[this.CONTEXT_UID];return o?(this.boundTextures[e]=t,i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,o.texture)):this.textureManager.updateTexture(t,e),e},e.prototype.unbindTexture=function(t){var e=this.gl;t=t.baseTexture||t;for(var r=0;r<this.boundTextures.length;r++)this.boundTextures[r]===t&&(this.boundTextures[r]=this.emptyTextures[r],e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,this.emptyTextures[r]._glTextures[this.CONTEXT_UID].texture));return this},e.prototype.createVao=function(){return new v.default.VertexArrayObject(this.gl,this.state.attribState)},e.prototype.bindVao=function(t){return this._activeVao===t?this:(t?t.bind():this._activeVao&&this._activeVao.unbind(),this._activeVao=t,this)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer),this.bindVao(null),this._activeShader=null,this._activeRenderTarget=this.rootRenderTarget;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.emptyTextures[t];return this.rootRenderTarget.activate(),this.state.resetToDefault(),this},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.textureManager.removeAll(),this.filterManager.destroy(!0),this._initContext()},e.prototype.destroy=function(e){this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),this.textureManager.destroy(),t.prototype.destroy.call(this,e),this.uid=0,this.maskManager.destroy(),this.stencilManager.destroy(),this.filterManager.destroy(),this.maskManager=null,this.filterManager=null,this.textureManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.gl.useProgram(null),this.gl.getExtension("WEBGL_lose_context")&&this.gl.getExtension("WEBGL_lose_context").loseContext(),this.gl=null},e}(n.default);e.default=E,_.pluginTarget.mixin(E)},function(t,e,r){"use strict";e.__esModule=!0;var n=r(6),i=r(2),o=function(t){return t&&t.__esModule?t:{default:t}}(r(5)),a=r(7);var s=function(){function t(e,r,s,u,l,c){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.frameBuffer=null,this.texture=null,this.clearColor=[0,0,0,0],this.size=new n.Rectangle(0,0,1,1),this.resolution=l||o.default.RESOLUTION,this.projectionMatrix=new n.Matrix,this.transform=null,this.frame=null,this.defaultFrame=new n.Rectangle,this.destinationFrame=null,this.sourceFrame=null,this.stencilBuffer=null,this.stencilMaskStack=[],this.filterData=null,this.filterPoolKey="",this.scaleMode=void 0!==u?u:o.default.SCALE_MODE,this.root=c,this.root?(this.frameBuffer=new a.GLFramebuffer(e,100,100),this.frameBuffer.framebuffer=null):(this.frameBuffer=a.GLFramebuffer.createRGBA(e,100,100),this.scaleMode===i.SCALE_MODES.NEAREST?this.frameBuffer.texture.enableNearestScaling():this.frameBuffer.texture.enableLinearScaling(),this.texture=this.frameBuffer.texture),this.setFrame(),this.resize(r,s)}return t.prototype.clear=function(t){var e=t||this.clearColor;this.frameBuffer.clear(e[0],e[1],e[2],e[3])},t.prototype.attachStencilBuffer=function(){this.root||this.frameBuffer.enableStencil()},t.prototype.setFrame=function(t,e){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||this.destinationFrame},t.prototype.activate=function(){var t=this.gl;this.frameBuffer.bind(),this.calculateProjection(this.destinationFrame,this.sourceFrame),this.transform&&this.projectionMatrix.append(this.transform),this.destinationFrame!==this.sourceFrame?(t.enable(t.SCISSOR_TEST),t.scissor(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)):t.disable(t.SCISSOR_TEST),t.viewport(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)},t.prototype.calculateProjection=function(t,e){var r=this.projectionMatrix;e=e||t,r.identity(),this.root?(r.a=1/t.width*2,r.d=-1/t.height*2,r.tx=-1-e.x*r.a,r.ty=1-e.y*r.d):(r.a=1/t.width*2,r.d=1/t.height*2,r.tx=-1-e.x*r.a,r.ty=-1-e.y*r.d)},t.prototype.resize=function(t,e){if(t|=0,e|=0,this.size.width!==t||this.size.height!==e){this.size.width=t,this.size.height=e,this.defaultFrame.width=t,this.defaultFrame.height=e,this.frameBuffer.resize(t*this.resolution,e*this.resolution);var r=this.frame||this.size;this.calculateProjection(r)}},t.prototype.destroy=function(){this.frameBuffer.destroy(),this.frameBuffer=null,this.texture=null},t}();e.default=s},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){t.nativeLines?function(t,e){var r=0,n=t.points;if(0===n.length)return;var o=e.points,a=n.length/2,s=(0,i.hex2rgb)(t.lineColor),u=t.lineAlpha,l=s[0]*u,c=s[1]*u,h=s[2]*u;for(r=1;r<a;r++){var f=n[2*(r-1)],d=n[2*(r-1)+1],p=n[2*r],_=n[2*r+1];o.push(f,d),o.push(l,c,h,u),o.push(p,_),o.push(l,c,h,u)}}(t,r):function(t,e){var r=t.points;if(0===r.length)return;var o=new n.Point(r[0],r[1]),a=new n.Point(r[r.length-2],r[r.length-1]);if(o.x===a.x&&o.y===a.y){(r=r.slice()).pop(),r.pop();var s=(a=new n.Point(r[r.length-2],r[r.length-1])).x+.5*(o.x-a.x),u=a.y+.5*(o.y-a.y);r.unshift(s,u),r.push(s,u)}var l=e.points,c=e.indices,h=r.length/2,f=r.length,d=l.length/6,p=t.lineWidth/2,_=(0,i.hex2rgb)(t.lineColor),v=t.lineAlpha,g=_[0]*v,y=_[1]*v,m=_[2]*v,E=r[0],x=r[1],b=r[2],T=r[3],R=0,O=0,S=-(x-T),w=E-b,C=0,A=0,I=0,P=0,M=Math.sqrt(S*S+w*w);S/=M,w/=M,S*=p,w*=p;var D=t.lineAlignment,L=2*(1-D),U=2*D;l.push(E-S*L,x-w*L,g,y,m,v),l.push(E+S*U,x+w*U,g,y,m,v);for(var N=1;N<h-1;++N){E=r[2*(N-1)],x=r[2*(N-1)+1],b=r[2*N],T=r[2*N+1],R=r[2*(N+1)],O=r[2*(N+1)+1],S=-(x-T),w=E-b,M=Math.sqrt(S*S+w*w),S/=M,w/=M,S*=p,w*=p,C=-(T-O),A=b-R,M=Math.sqrt(C*C+A*A),C/=M,A/=M;var F=-w+x-(-w+T),j=-S+b-(-S+E),k=(-S+E)*(-w+T)-(-S+b)*(-w+x),B=-(A*=p)+O-(-A+T),H=-(C*=p)+b-(-C+R),X=(-C+R)*(-A+T)-(-C+b)*(-A+O),W=F*H-B*j;if(Math.abs(W)<.1)W+=10.1,l.push(b-S*L,T-w*L,g,y,m,v),l.push(b+S*U,T+w*U,g,y,m,v);else{var G=(j*X-H*k)/W,Y=(B*k-F*X)/W,z=(G-b)*(G-b)+(Y-T)*(Y-T);z>196*p*p?(I=S-C,P=w-A,M=Math.sqrt(I*I+P*P),I/=M,P/=M,I*=p,P*=p,l.push(b-I*L,T-P*L),l.push(g,y,m,v),l.push(b+I*U,T+P*U),l.push(g,y,m,v),l.push(b-I*U*L,T-P*L),l.push(g,y,m,v),f++):(l.push(b+(G-b)*L,T+(Y-T)*L),l.push(g,y,m,v),l.push(b-(G-b)*U,T-(Y-T)*U),l.push(g,y,m,v))}}E=r[2*(h-2)],x=r[2*(h-2)+1],b=r[2*(h-1)],T=r[2*(h-1)+1],S=-(x-T),w=E-b,M=Math.sqrt(S*S+w*w),S/=M,w/=M,S*=p,w*=p,l.push(b-S*L,T-w*L),l.push(g,y,m,v),l.push(b+S*U,T+w*U),l.push(g,y,m,v),c.push(d);for(var V=0;V<f;++V)c.push(d++);c.push(d-1)}(t,e)};var n=r(6),i=r(4)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=e,this.y=r}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copy=function(t){this.set(t.x,t.y)},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)},t}();e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){return t&&t.__esModule?t:{default:t}}(r(24)),o=r(2);var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.a=e,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a,this.array=null}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,r,n,i,o){return this.a=t,this.b=e,this.c=r,this.d=n,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new i.default;var r=t.x,n=t.y;return e.x=this.a*r+this.c*n+this.tx,e.y=this.b*r+this.d*n+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new i.default;var r=1/(this.a*this.d+this.c*-this.b),n=t.x,o=t.y;return e.x=this.d*r*n+-this.c*r*o+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*o+-this.b*r*n+(-this.ty*this.a+this.tx*this.b)*r,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),n=this.a,i=this.c,o=this.tx;return this.a=n*e-this.b*r,this.b=n*r+this.b*e,this.c=i*e-this.d*r,this.d=i*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,n=this.c,i=this.d;return this.a=t.a*e+t.b*n,this.b=t.a*r+t.b*i,this.c=t.c*e+t.d*n,this.d=t.c*r+t.d*i,this.tx=t.tx*e+t.ty*n+this.tx,this.ty=t.tx*r+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,r,n,i,o,a,s,u){return this.a=Math.cos(a+u)*i,this.b=Math.sin(a+u)*i,this.c=-Math.sin(a-s)*o,this.d=Math.cos(a-s)*o,this.tx=t-(r*this.a+n*this.c),this.ty=e-(r*this.b+n*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,n=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=n*t.a+this.d*t.c,this.d=n*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,r=this.b,n=this.c,i=this.d,a=-Math.atan2(-n,i),s=Math.atan2(r,e),u=Math.abs(a+s);return u<1e-5||Math.abs(o.PI_2-u)<1e-5?(t.rotation=s,e<0&&i>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=s),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(n*n+i*i),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,n=this.d,i=this.tx,o=t*n-e*r;return this.a=n/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-n*i)/o,this.ty=-(t*this.ty-e*i)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},n(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(2);var o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=Number(e),this.y=Number(r),this.width=Number(n),this.height=Number(o),this.type=i.SHAPES.RECT}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e},t.prototype.fit=function(t){this.x<t.x&&(this.width+=this.x,this.width<0&&(this.width=0),this.x=t.x),this.y<t.y&&(this.height+=this.y,this.height<0&&(this.height=0),this.y=t.y),this.x+this.width>t.x+t.width&&(this.width=t.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>t.y+t.height&&(this.height=t.height-this.y,this.height<0&&(this.height=0))},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),n=Math.min(this.y,t.y),i=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=r-e,this.y=n,this.height=i-n},n(t,[{key:"left",get:function(){return this.x}},{key:"right",get:function(){return this.x+this.width}},{key:"top",get:function(){return this.y}},{key:"bottom",get:function(){return this.y+this.height}}],[{key:"EMPTY",get:function(){return new t(0,0,0,0)}}]),t}();e.default=o},function(t,e){var r=null,n={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};t.exports=function(t,e){if(!r){var i=Object.keys(n);r={};for(var o=0;o<i.length;++o){var a=i[o];r[t[a]]=n[a]}}return r[e]}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(6);var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?n.Rectangle.EMPTY:((t=t||new n.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,r=this.minY,n=this.maxX,i=this.maxY,o=t[0],a=t[1];e=o<e?o:e,r=a<r?a:r,n=o>n?o:n,i=a>i?a:i,o=t[2],a=t[3],e=o<e?o:e,r=a<r?a:r,n=o>n?o:n,i=a>i?a:i,o=t[4],a=t[5],e=o<e?o:e,r=a<r?a:r,n=o>n?o:n,i=a>i?a:i,o=t[6],a=t[7],e=o<e?o:e,r=a<r?a:r,n=o>n?o:n,i=a>i?a:i,this.minX=e,this.minY=r,this.maxX=n,this.maxY=i},t.prototype.addFrame=function(t,e,r,n,i){var o=t.worldTransform,a=o.a,s=o.b,u=o.c,l=o.d,c=o.tx,h=o.ty,f=this.minX,d=this.minY,p=this.maxX,_=this.maxY,v=a*e+u*r+c,g=s*e+l*r+h;f=v<f?v:f,d=g<d?g:d,p=v>p?v:p,_=g>_?g:_,g=s*n+l*r+h,f=(v=a*n+u*r+c)<f?v:f,d=g<d?g:d,p=v>p?v:p,_=g>_?g:_,g=s*e+l*i+h,f=(v=a*e+u*i+c)<f?v:f,d=g<d?g:d,p=v>p?v:p,_=g>_?g:_,g=s*n+l*i+h,f=(v=a*n+u*i+c)<f?v:f,d=g<d?g:d,p=v>p?v:p,_=g>_?g:_,this.minX=f,this.minY=d,this.maxX=p,this.maxY=_},t.prototype.addVertices=function(t,e,r,n){for(var i=t.worldTransform,o=i.a,a=i.b,s=i.c,u=i.d,l=i.tx,c=i.ty,h=this.minX,f=this.minY,d=this.maxX,p=this.maxY,_=r;_<n;_+=2){var v=e[_],g=e[_+1],y=o*v+s*g+l,m=u*g+a*v+c;h=y<h?y:h,f=m<f?m:f,d=y>d?y:d,p=m>p?m:p}this.minX=h,this.minY=f,this.maxX=d,this.maxY=p},t.prototype.addBounds=function(t){var e=this.minX,r=this.minY,n=this.maxX,i=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>n?t.maxX:n,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,n=t.minY>e.minY?t.minY:e.minY,i=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(r<=i&&n<=o){var a=this.minX,s=this.minY,u=this.maxX,l=this.maxY;this.minX=r<a?r:a,this.minY=n<s?n:s,this.maxX=i>u?i:u,this.maxY=o>l?o:l}},t.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,n=t.minY>e.y?t.minY:e.y,i=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(r<=i&&n<=o){var a=this.minX,s=this.minY,u=this.maxX,l=this.maxY;this.minX=r<a?r:a,this.minY=n<s?n:s,this.maxX=i>u?i:u,this.maxY=o>l?o:l}},t}();e.default=i},function(t,e,r){var n,i,o;
|
|
10
|
-
/**
|
|
11
|
-
* isMobile.js v0.4.1
|
|
12
|
-
*
|
|
13
|
-
* A simple library to detect Apple phones and tablets,
|
|
14
|
-
* Android phones and tablets, other mobile devices (like blackberry, mini-opera and windows phone),
|
|
15
|
-
* and any kind of seven inch device, via user agent sniffing.
|
|
16
|
-
*
|
|
17
|
-
* @author: Kai Mallea (kmallea@gmail.com)
|
|
18
|
-
*
|
|
19
|
-
* @license: http://creativecommons.org/publicdomain/zero/1.0/
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* isMobile.js v0.4.1
|
|
23
|
-
*
|
|
24
|
-
* A simple library to detect Apple phones and tablets,
|
|
25
|
-
* Android phones and tablets, other mobile devices (like blackberry, mini-opera and windows phone),
|
|
26
|
-
* and any kind of seven inch device, via user agent sniffing.
|
|
27
|
-
*
|
|
28
|
-
* @author: Kai Mallea (kmallea@gmail.com)
|
|
29
|
-
*
|
|
30
|
-
* @license: http://creativecommons.org/publicdomain/zero/1.0/
|
|
31
|
-
*/
|
|
32
|
-
!function(r){var a=/iPhone/i,s=/iPod/i,u=/iPad/i,l=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,c=/Android/i,h=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,f=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,d=/Windows Phone/i,p=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,_=/BlackBerry/i,v=/BB10/i,g=/Opera Mini/i,y=/(CriOS|Chrome)(?=.*\bMobile\b)/i,m=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,E=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),x=function(t,e){return t.test(e)},b=function(t){var e=t||navigator.userAgent,r=e.split("[FBAN");if(void 0!==r[1]&&(e=r[0]),void 0!==(r=e.split("Twitter"))[1]&&(e=r[0]),this.apple={phone:x(a,e),ipod:x(s,e),tablet:!x(a,e)&&x(u,e),device:x(a,e)||x(s,e)||x(u,e)},this.amazon={phone:x(h,e),tablet:!x(h,e)&&x(f,e),device:x(h,e)||x(f,e)},this.android={phone:x(h,e)||x(l,e),tablet:!x(h,e)&&!x(l,e)&&(x(f,e)||x(c,e)),device:x(h,e)||x(f,e)||x(l,e)||x(c,e)},this.windows={phone:x(d,e),tablet:x(p,e),device:x(d,e)||x(p,e)},this.other={blackberry:x(_,e),blackberry10:x(v,e),opera:x(g,e),firefox:x(m,e),chrome:x(y,e),device:x(_,e)||x(v,e)||x(g,e)||x(m,e)||x(y,e)},this.seven_inch=x(E,e),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},T=function(){var t=new b;return t.Class=b,t};void 0!==t&&t.exports&&"undefined"==typeof window?t.exports=b:void 0!==t&&t.exports&&"undefined"!=typeof window?t.exports=T():(i=[],n=r.isMobile=T(),void 0===(o="function"==typeof n?n.apply(e,i):n)||(t.exports=o))}(this)},function(t,e,r){"use strict";e.__esModule=!0;var n=r(6);var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.worldTransform=new n.Matrix,this.localTransform=new n.Matrix,this._worldID=0,this._parentID=0}return t.prototype.updateLocalTransform=function(){},t.prototype.updateTransform=function(t){var e=t.worldTransform,r=this.worldTransform,n=this.localTransform;r.a=n.a*e.a+n.b*e.c,r.b=n.a*e.b+n.b*e.d,r.c=n.c*e.a+n.d*e.c,r.d=n.c*e.b+n.d*e.d,r.tx=n.tx*e.a+n.ty*e.c+e.tx,r.ty=n.tx*e.b+n.ty*e.d+e.ty,this._worldID++},t}();e.default=i,i.prototype.updateWorldTransform=i.prototype.updateTransform,i.IDENTITY=new i},function(t,e,r){"use strict";function n(t,e,r){r=r||2;var n,s,u,l,c,d,_,v=e&&e.length,g=v?e[0]*r:t.length,y=i(t,0,g,r,!0),m=[];if(!y||y.next===y.prev)return m;if(v&&(y=function(t,e,r,n){var a,s,u,l,c,d=[];for(a=0,s=e.length;a<s;a++)u=e[a]*n,l=a<s-1?e[a+1]*n:t.length,(c=i(t,u,l,n,!1))===c.next&&(c.steiner=!0),d.push(p(c));for(d.sort(h),a=0;a<d.length;a++)f(d[a],r),r=o(r,r.next);return r}(t,e,y,r)),t.length>80*r){n=u=t[0],s=l=t[1];for(var E=r;E<g;E+=r)c=t[E],d=t[E+1],c<n&&(n=c),d<s&&(s=d),c>u&&(u=c),d>l&&(l=d);_=0!==(_=Math.max(u-n,l-s))?1/_:0}return a(y,m,r,n,s,_),m}function i(t,e,r,n,i){var o,a;if(i===O(t,e,r,n)>0)for(o=e;o<r;o+=n)a=b(o,t[o],t[o+1],a);else for(o=r-n;o>=e;o-=n)a=b(o,t[o],t[o+1],a);return a&&y(a,a.next)&&(T(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function a(t,e,r,n,i,h,f){if(t){!f&&h&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=d(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,a,s,u,l=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e<l&&(s++,n=n.nextZ);e++);for(u=l;s>0||u>0&&n;)0!==s&&(0===u||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,l*=2}while(a>1)}(i)}(t,n,i,h);for(var p,_,v=t;t.prev!==t.next;)if(p=t.prev,_=t.next,h?u(t,n,i,h):s(t))e.push(p.i/r),e.push(t.i/r),e.push(_.i/r),T(t),t=_.next,v=_.next;else if((t=_)===v){f?1===f?a(t=l(t,e,r),e,r,n,i,h,2):2===f&&c(t,e,r,n,i,h):a(o(t),e,r,n,i,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(g(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(_(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,r,n){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,u=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,l=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=d(s,u,e,r,n),f=d(l,c,e,r,n),p=t.prevZ,v=t.nextZ;p&&p.z>=h&&v&&v.z<=f;){if(p!==t.prev&&p!==t.next&&_(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&_(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&_(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=f;){if(v!==t.prev&&v!==t.next&&_(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!y(i,o)&&m(i,n,n.next,o)&&E(i,o)&&E(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),T(n),T(n.next),n=t=o),n=n.next}while(n!==t);return n}function c(t,e,r,n,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&v(u,l)){var c=x(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,r,n,i,s),void a(c,e,r,n,i,s)}l=l.next}u=u.next}while(u!==t)}function h(t,e){return t.x-e.x}function f(t,e){if(e=function(t,e){var r,n=e,i=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a){if(a=s,s===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===a)return r.prev;var u,l=r,c=r.x,h=r.y,f=1/0;n=r.next;for(;n!==l;)i>=n.x&&n.x>=c&&i!==n.x&&_(o<h?i:a,o,c,h,o<h?a:i,o,n.x,n.y)&&((u=Math.abs(o-n.y)/(i-n.x))<f||u===f&&n.x>r.x)&&E(n,t)&&(r=n,f=u),n=n.next;return r}(t,e)){var r=x(e,t);o(r,r.next)}}function d(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function _(t,e,r,n,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(n-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&m(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&E(t,e)&&E(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)}function g(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,r,n){return!!(y(t,e)&&y(r,n)||y(t,n)&&y(r,e))||g(t,e,r)>0!=g(t,e,n)>0&&g(r,n,t)>0!=g(r,n,e)>0}function E(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function x(t,e){var r=new R(t.i,t.x,t.y),n=new R(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function b(t,e,r,n){var i=new R(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function R(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(t,e,r,n){for(var i=0,o=e,a=r-n;o<r;o+=n)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}t.exports=n,t.exports.default=n,n.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,a=Math.abs(O(t,0,o,r));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*r,c=s<u-1?e[s+1]*r:t.length;a-=Math.abs(O(t,l,c,r))}var h=0;for(s=0;s<n.length;s+=3){var f=n[s]*r,d=n[s+1]*r,p=n[s+2]*r;h+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[i][o][a]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(6),o=r(4),a=r(2),s=l(r(10)),u=l(r(13));function l(t){return t&&t.__esModule?t:{default:t}}var c=new i.Point,h=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return n._anchor=new i.ObservablePoint(n._onAnchorUpdate,n),n._texture=null,n._width=0,n._height=0,n._tint=null,n._tintRGB=null,n.tint=16777215,n.blendMode=a.BLEND_MODES.NORMAL,n.shader=null,n.cachedTint=16777215,n.texture=r||s.default.EMPTY,n.vertexData=new Float32Array(8),n.vertexTrimmedData=null,n._transformID=-1,n._textureID=-1,n._transformTrimmedID=-1,n._textureTrimmedID=-1,n.pluginName="sprite",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this.cachedTint=16777215,this._width&&(this.scale.x=(0,o.sign)(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=(0,o.sign)(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID||this._textureID!==this._texture._updateID){this._transformID=this.transform._worldID,this._textureID=this._texture._updateID;var t=this._texture,e=this.transform.worldTransform,r=e.a,n=e.b,i=e.c,o=e.d,a=e.tx,s=e.ty,u=this.vertexData,l=t.trim,c=t.orig,h=this._anchor,f=0,d=0,p=0,_=0;l?(f=(d=l.x-h._x*c.width)+l.width,p=(_=l.y-h._y*c.height)+l.height):(f=(d=-h._x*c.width)+c.width,p=(_=-h._y*c.height)+c.height),u[0]=r*d+i*_+a,u[1]=o*_+n*d+s,u[2]=r*f+i*_+a,u[3]=o*_+n*f+s,u[4]=r*f+i*p+a,u[5]=o*p+n*f+s,u[6]=r*d+i*p+a,u[7]=o*p+n*d+s}},e.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,r=t.orig,n=this._anchor,i=this.transform.worldTransform,o=i.a,a=i.b,s=i.c,u=i.d,l=i.tx,c=i.ty,h=-n._x*r.width,f=h+r.width,d=-n._y*r.height,p=d+r.height;e[0]=o*h+s*d+l,e[1]=u*d+a*h+c,e[2]=o*f+s*d+l,e[3]=u*d+a*f+c,e[4]=o*f+s*p+l,e[5]=u*p+a*f+c,e[6]=o*h+s*p+l,e[7]=u*p+a*h+c},e.prototype._renderWebGL=function(t){this.calculateVertices(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new i.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,c);var e=this._texture.orig.width,r=this._texture.orig.height,n=-e*this.anchor.x,i=0;return c.x>=n&&c.x<n+e&&(i=-r*this.anchor.y,c.y>=i&&c.y<i+r)},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,"boolean"==typeof e?e:e&&e.texture){var r="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!r)}this._texture=null,this.shader=null},e.from=function(t){return new e(s.default.from(t))},e.fromFrame=function(t){var r=o.TextureCache[t];if(!r)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return new e(r)},e.fromImage=function(t,r,n){return new e(s.default.fromImage(t,r,n))},n(e,[{key:"width",get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=(0,o.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=(0,o.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"anchor",get:function(){return this._anchor},set:function(t){this._anchor.copy(t)}},{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),e}(u.default);e.default=h},function(t,e,r){"use strict";"use restrict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)},e.isPow2=function(t){return!(t&t-1||!t)},e.log2=function(t){var e,r;return e=(t>65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=n,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<<i&255}}(i),e.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},function(t,e,r){"use strict";e.__esModule=!0,e.Ticker=e.shared=void 0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(121));var i=new n.default;i.autoStart=!0,i.destroy=function(){},e.shared=i,e.Ticker=n.default},function(t,e,r){"use strict";e.__esModule=!0;var n=i(r(60));function i(t){return t&&t.__esModule?t:{default:t}}var o=function(t){function e(r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=null;if(!(r instanceof n.default)){var a=arguments[1],s=arguments[2],u=arguments[3],l=arguments[4];console.warn("Please use RenderTexture.create("+a+", "+s+") instead of the ctor directly."),o=arguments[0],i=null,r=new n.default(a,s,u,l)}var c=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,i));return c.legacyRenderer=o,c.valid=!0,c._updateUvs(),c}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.resize=function(t,e,r){t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r||this.baseTexture.resize(t,e),this._updateUvs()},e.create=function(t,r,i,o){return new e(new n.default(t,r,i,o))},e}(i(r(10)).default);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=r(4);var i={getTintedTexture:function(t,e){var r=t._texture,n="#"+("00000"+(0|(e=i.roundColor(e))).toString(16)).substr(-6);r.tintCache=r.tintCache||{};var o=r.tintCache[n],a=void 0;if(o){if(o.tintId===r._updateID)return r.tintCache[n];a=r.tintCache[n]}else a=i.canvas||document.createElement("canvas");if(i.tintMethod(r,e,a),a.tintId=r._updateID,i.convertTintToImage){var s=new Image;s.src=a.toDataURL(),r.tintCache[n]=s}else r.tintCache[n]=a,i.canvas=null;return a},tintWithMultiply:function(t,e,r){var n=r.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,r.width=Math.ceil(i.width),r.height=Math.ceil(i.height),n.save(),n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,i.width,i.height),n.globalCompositeOperation="multiply",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.restore()},tintWithOverlay:function(t,e,r){var n=r.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,r.width=Math.ceil(i.width),r.height=Math.ceil(i.height),n.save(),n.globalCompositeOperation="copy",n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,i.width,i.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.restore()},tintWithPerPixel:function(t,e,r){var i=r.getContext("2d"),o=t._frame.clone(),a=t.baseTexture.resolution;o.x*=a,o.y*=a,o.width*=a,o.height*=a,r.width=Math.ceil(o.width),r.height=Math.ceil(o.height),i.save(),i.globalCompositeOperation="copy",i.drawImage(t.baseTexture.source,o.x,o.y,o.width,o.height,0,0,o.width,o.height),i.restore();for(var s=(0,n.hex2rgb)(e),u=s[0],l=s[1],c=s[2],h=i.getImageData(0,0,o.width,o.height),f=h.data,d=0;d<f.length;d+=4)f[d+0]*=u,f[d+1]*=l,f[d+2]*=c;i.putImageData(h,0,0)},roundColor:function(t){var e=i.cacheStepsPerColorChannel,r=(0,n.hex2rgb)(t);return r[0]=Math.min(255,r[0]/e*e),r[1]=Math.min(255,r[1]/e*e),r[2]=Math.min(255,r[2]/e*e),(0,n.rgb2hex)(r)},cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:(0,function(t){return t&&t.__esModule?t:{default:t}}(r(62)).default)(),tintMethod:0};i.tintMethod=i.canUseMultiply?i.tintWithMultiply:i.tintWithPerPixel,e.default=i},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){for(var e=6*t,r=new Uint16Array(e),n=0,i=0;n<e;n+=6,i+=4)r[n+0]=i+0,r[n+1]=i+1,r[n+2]=i+2,r[n+3]=i+0,r[n+4]=i+2,r[n+5]=i+3;return r}},function(t,e,r){"use strict";e.__esModule=!0,e.Resource=void 0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=a(r(85)),o=a(r(84));function a(t){return t&&t.__esModule?t:{default:t}}var s=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),u=null;function l(){}var c=e.Resource=function(){function t(e,r,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"string"!=typeof e||"string"!=typeof r)throw new Error("Both name and url are required for constructing a resource.");n=n||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===r.indexOf("data:")),this.name=e,this.url=r,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===n.crossOrigin?"anonymous":n.crossOrigin,this.timeout=n.timeout||0,this.loadType=n.loadType||this._determineLoadType(),this.xhrType=n.xhrType,this.metadata=n.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=l,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new o.default,this.onProgress=new o.default,this.onComplete=new o.default,this.onAfterMiddleware=new o.default}return t.setExtensionLoadType=function(e,r){h(t._loadTypeMap,e,r)},t.setExtensionXhrType=function(e,r){h(t._xhrTypeMap,e,r)},t.prototype.complete=function(){this._clearEvents(),this._finish()},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this._finish()}},t.prototype.load=function(e){var r=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout(function(){return e(r)},1);else switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:s&&this.crossOrigin?this._loadXdr():this._loadXhr()}},t.prototype._hasFlag=function(t){return 0!=(this._flags&t)},t.prototype._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},t.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},t.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},t.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==window.Audio?this.data=new Audio:this.data=document.createElement(t),null!==this.data){if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,r=0;r<this.url.length;++r)this.data.appendChild(this._createSource(t,this.url[r],Array.isArray(e)?e[r]:e));else{var n=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(n)?n[0]:n))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: "+t)},t.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),e.timeout=this.timeout,this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},t.prototype._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=this.timeout||5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXhrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout(function(){return t.send()},1)},t.prototype._createSource=function(t,e,r){r||(r=t+"/"+this._getExtension(e));var n=document.createElement("source");return n.src=e,n.type=r,n},t.prototype._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},t.prototype._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},t.prototype._onTimeout=function(){this.abort("Load timed out.")},t.prototype._xhrOnError=function(){var t=this.xhr;this.abort(f(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},t.prototype._xhrOnTimeout=function(){var t=this.xhr;this.abort(f(t)+" Request timed out.")},t.prototype._xhrOnAbort=function(){var t=this.xhr;this.abort(f(t)+" Request was aborted by the user.")},t.prototype._xhrOnLoad=function(){var e=this.xhr,r="",n=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(r=e.responseText),0===n&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?n=200:1223===n&&(n=204),2===(n/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(r,"text/xml")}else{var o=document.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||r;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,u||(u=document.createElement("a")),u.href=t;var r=!(t=(0,i.default)(u.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,n=t.protocol?t.protocol+":":"";return t.host===e.hostname&&r&&n===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var n=t.indexOf("?"),i=t.indexOf("#"),o=Math.min(n>-1?n:t.length,i>-1?i:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},n(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();function h(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function f(t){return t.toString().replace("object ","")}c.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},c.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},c.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},c.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},c._loadTypeMap={gif:c.LOAD_TYPE.IMAGE,png:c.LOAD_TYPE.IMAGE,bmp:c.LOAD_TYPE.IMAGE,jpg:c.LOAD_TYPE.IMAGE,jpeg:c.LOAD_TYPE.IMAGE,tif:c.LOAD_TYPE.IMAGE,tiff:c.LOAD_TYPE.IMAGE,webp:c.LOAD_TYPE.IMAGE,tga:c.LOAD_TYPE.IMAGE,svg:c.LOAD_TYPE.IMAGE,"svg+xml":c.LOAD_TYPE.IMAGE,mp3:c.LOAD_TYPE.AUDIO,ogg:c.LOAD_TYPE.AUDIO,wav:c.LOAD_TYPE.AUDIO,mp4:c.LOAD_TYPE.VIDEO,webm:c.LOAD_TYPE.VIDEO},c._xhrTypeMap={xhtml:c.XHR_RESPONSE_TYPE.DOCUMENT,html:c.XHR_RESPONSE_TYPE.DOCUMENT,htm:c.XHR_RESPONSE_TYPE.DOCUMENT,xml:c.XHR_RESPONSE_TYPE.DOCUMENT,tmx:c.XHR_RESPONSE_TYPE.DOCUMENT,svg:c.XHR_RESPONSE_TYPE.DOCUMENT,tsx:c.XHR_RESPONSE_TYPE.DOCUMENT,gif:c.XHR_RESPONSE_TYPE.BLOB,png:c.XHR_RESPONSE_TYPE.BLOB,bmp:c.XHR_RESPONSE_TYPE.BLOB,jpg:c.XHR_RESPONSE_TYPE.BLOB,jpeg:c.XHR_RESPONSE_TYPE.BLOB,tif:c.XHR_RESPONSE_TYPE.BLOB,tiff:c.XHR_RESPONSE_TYPE.BLOB,webp:c.XHR_RESPONSE_TYPE.BLOB,tga:c.XHR_RESPONSE_TYPE.BLOB,json:c.XHR_RESPONSE_TYPE.JSON,text:c.XHR_RESPONSE_TYPE.TEXT,txt:c.XHR_RESPONSE_TYPE.TEXT,ttf:c.XHR_RESPONSE_TYPE.BUFFER,otf:c.XHR_RESPONSE_TYPE.BUFFER},c.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",t.exports.default=c},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=function(t){return t&&t.__esModule?t:{default:t}}(r(91));var o=n.ticker.shared;n.settings.UPLOADS_PER_FRAME=4;var a=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.limiter=new i.default(n.settings.UPLOADS_PER_FRAME),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){r.queue&&r.prepareItems()},this.registerFindHook(f),this.registerFindHook(d),this.registerFindHook(s),this.registerFindHook(u),this.registerFindHook(l),this.registerUploadHook(c),this.registerUploadHook(h)}return t.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,o.addOnce(this.tick,this,n.UPDATE_PRIORITY.UTILITY))):e&&e()},t.prototype.tick=function(){setTimeout(this.delayedTick,0)},t.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var r=0,i=this.uploadHooks.length;r<i;r++)if(this.uploadHooks[r](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)o.addOnce(this.tick,this,n.UPDATE_PRIORITY.UTILITY);else{this.ticking=!1;var a=this.completes.slice(0);this.completes.length=0;for(var s=0,u=a.length;s<u;s++)a[s]()}},t.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},t.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},t.prototype.add=function(t){for(var e=0,r=this.addHooks.length;e<r&&!this.addHooks[e](t,this.queue);e++);if(t instanceof n.Container)for(var i=t.children.length-1;i>=0;i--)this.add(t.children[i]);return this},t.prototype.destroy=function(){this.ticking&&o.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();function s(t,e){var r=!1;if(t&&t._textures&&t._textures.length)for(var i=0;i<t._textures.length;i++)if(t._textures[i]instanceof n.Texture){var o=t._textures[i].baseTexture;-1===e.indexOf(o)&&(e.push(o),r=!0)}return r}function u(t,e){return t instanceof n.BaseTexture&&(-1===e.indexOf(t)&&e.push(t),!0)}function l(t,e){if(t._texture&&t._texture instanceof n.Texture){var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function c(t,e){return e instanceof n.Text&&(e.updateText(!0),!0)}function h(t,e){if(e instanceof n.TextStyle){var r=e.toFontString();return n.TextMetrics.measureFont(r),!0}return!1}function f(t,e){if(t instanceof n.Text){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function d(t,e){return t instanceof n.TextStyle&&(-1===e.indexOf(t)&&e.push(t),!0)}e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._x=n,this._y=i,this.cb=e,this.scope=r}return t.prototype.set=function(t,e){var r=t||0,n=e||(0!==e?r:0);this._x===r&&this._y===n||(this._x=r,this._y=n,this.cb.call(this.scope))},t.prototype.copy=function(t){this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope))},n(t,[{key:"x",get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},{key:"y",get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}]),t}();e.default=i},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(25));var i=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],o=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],a=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],s=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],u=[],l=[];function c(t){return t<0?-1:t>0?1:0}!function(){for(var t=0;t<16;t++){var e=[];l.push(e);for(var r=0;r<16;r++)for(var h=c(i[t]*i[r]+a[t]*o[r]),f=c(o[t]*i[r]+s[t]*o[r]),d=c(i[t]*a[r]+a[t]*s[r]),p=c(o[t]*a[r]+s[t]*s[r]),_=0;_<16;_++)if(i[_]===h&&o[_]===f&&a[_]===d&&s[_]===p){e.push(_);break}}for(var v=0;v<16;v++){var g=new n.default;g.set(i[v],o[v],a[v],s[v],0,0),u.push(g)}}();var h={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(t){return i[t]},uY:function(t){return o[t]},vX:function(t){return a[t]},vY:function(t){return s[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return l[t][e]},sub:function(t,e){return l[t][h.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?h.S:h.N:2*Math.abs(e)<=Math.abs(t)?t>0?h.E:h.W:e>0?t>0?h.SE:h.SW:t>0?h.NE:h.NW},matrixAppendRotationInv:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=u[h.inv(e)];i.tx=r,i.ty=n,t.append(i)}};e.default=h},function(t,e){t.exports=function(t,e,r){var n;if(r){var i=r.tempAttribState,o=r.attribState;for(n=0;n<i.length;n++)i[n]=!1;for(n=0;n<e.length;n++)i[e[n].attribute.location]=!0;for(n=0;n<o.length;n++)o[n]!==i[n]&&(o[n]=i[n],r.attribState[n]?t.enableVertexAttribArray(n):t.disableVertexAttribArray(n))}else for(n=0;n<e.length;n++){var a=e[n];t.enableVertexAttribArray(a.attribute.location)}}},function(t,e){var r=function(t,e,r,n,i){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=r||-1,this.format=n||t.RGBA,this.type=i||t.UNSIGNED_BYTE};r.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var r=t.videoWidth||t.width,n=t.videoHeight||t.height;n!==this.height||r!==this.width?e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t):e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.format,this.type,t),this.width=r,this.height=n};var n=!1;r.prototype.uploadData=function(t,e,r){this.bind();var i=this.gl;if(t instanceof Float32Array){if(!n){if(!i.getExtension("OES_texture_float"))throw new Error("floating point textures not available");n=!0}this.type=i.FLOAT}else this.type=this.type||i.UNSIGNED_BYTE;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||r!==this.height?i.texImage2D(i.TEXTURE_2D,0,this.format,e,r,0,this.format,this.type,t||null):i.texSubImage2D(i.TEXTURE_2D,0,0,0,e,r,this.format,this.type,t||null),this.width=e,this.height=r},r.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},r.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},r.prototype.minFilter=function(t){var e=this.gl;this.bind(),this.mipmap?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR:e.NEAREST)},r.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},r.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},r.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},r.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},r.prototype.enableWrapClamp=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},r.prototype.enableWrapRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)},r.prototype.enableWrapMirrorRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.MIRRORED_REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.MIRRORED_REPEAT)},r.prototype.destroy=function(){this.gl.deleteTexture(this.texture)},r.fromSource=function(t,e,n){var i=new r(t);return i.premultiplyAlpha=n||!1,i.upload(e),i},r.fromData=function(t,e,n,i){var o=new r(t);return o.uploadData(e,n,i),o},t.exports=r},function(t,e){var r=function(t,e,r){var n=t.createShader(e);return t.shaderSource(n,r),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS)?n:(console.log(t.getShaderInfoLog(n)),null)};t.exports=function(t,e,n,i){var o=r(t,t.VERTEX_SHADER,e),a=r(t,t.FRAGMENT_SHADER,n),s=t.createProgram();if(t.attachShader(s,o),t.attachShader(s,a),i)for(var u in i)t.bindAttribLocation(s,i[u],u);return t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(s,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(s)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(s)),t.deleteProgram(s),s=null),t.deleteShader(o),t.deleteShader(a),s}},function(t,e,r){var n=r(27),i=r(46),o=function(t,e,r,n){gl.vertexAttribPointer(this.location,this.size,t||gl.FLOAT,e||!1,r||0,n||0)};t.exports=function(t,e){for(var r={},a=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),s=0;s<a;s++){var u=t.getActiveAttrib(e,s),l=n(t,u.type);r[u.name]={type:l,size:i(l),location:t.getAttribLocation(e,u.name),pointer:o}}return r}},function(t,e){var r={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};t.exports=function(t){return r[t]}},function(t,e,r){var n=r(27),i=r(48);t.exports=function(t,e){for(var r={},o=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),a=0;a<o;a++){var s=t.getActiveUniform(e,a),u=s.name.replace(/\[.*?\]/,""),l=n(t,s.type);r[u]={type:l,size:s.size,location:t.getUniformLocation(e,u),value:i(l,s.size)}}return r}},function(t,e){var r=function(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e};t.exports=function(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return r(2*e);case"bvec3":return r(3*e);case"bvec4":return r(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}}},function(t,e){t.exports=function(t,e){return"precision"!==t.substring(0,9)?"precision "+e+" float;\n"+t:t}},function(t,e){var r=function(t){return function(){return this.data[t].value}},n={float:function(t,e,r){t.uniform1f(e,r)},vec2:function(t,e,r){t.uniform2f(e,r[0],r[1])},vec3:function(t,e,r){t.uniform3f(e,r[0],r[1],r[2])},vec4:function(t,e,r){t.uniform4f(e,r[0],r[1],r[2],r[3])},int:function(t,e,r){t.uniform1i(e,r)},ivec2:function(t,e,r){t.uniform2i(e,r[0],r[1])},ivec3:function(t,e,r){t.uniform3i(e,r[0],r[1],r[2])},ivec4:function(t,e,r){t.uniform4i(e,r[0],r[1],r[2],r[3])},bool:function(t,e,r){t.uniform1i(e,r)},bvec2:function(t,e,r){t.uniform2i(e,r[0],r[1])},bvec3:function(t,e,r){t.uniform3i(e,r[0],r[1],r[2])},bvec4:function(t,e,r){t.uniform4i(e,r[0],r[1],r[2],r[3])},mat2:function(t,e,r){t.uniformMatrix2fv(e,!1,r)},mat3:function(t,e,r){t.uniformMatrix3fv(e,!1,r)},mat4:function(t,e,r){t.uniformMatrix4fv(e,!1,r)},sampler2D:function(t,e,r){t.uniform1i(e,r)}},i={float:function(t,e,r){t.uniform1fv(e,r)},vec2:function(t,e,r){t.uniform2fv(e,r)},vec3:function(t,e,r){t.uniform3fv(e,r)},vec4:function(t,e,r){t.uniform4fv(e,r)},int:function(t,e,r){t.uniform1iv(e,r)},ivec2:function(t,e,r){t.uniform2iv(e,r)},ivec3:function(t,e,r){t.uniform3iv(e,r)},ivec4:function(t,e,r){t.uniform4iv(e,r)},bool:function(t,e,r){t.uniform1iv(e,r)},bvec2:function(t,e,r){t.uniform2iv(e,r)},bvec3:function(t,e,r){t.uniform3iv(e,r)},bvec4:function(t,e,r){t.uniform4iv(e,r)},sampler2D:function(t,e,r){t.uniform1iv(e,r)}};function o(t,e){return function(r){this.data[t].value=r;var o=this.data[t].location;1===e.size?n[e.type](this.gl,o,r):i[e.type](this.gl,o,r)}}function a(t,e){for(var r=e,n=0;n<t.length-1;n++){var i=r[t[n]]||{data:{}};r[t[n]]=i,r=i}return r}t.exports=function(t,e){var n={data:{}};n.gl=t;for(var i=Object.keys(e),s=0;s<i.length;s++){var u=i[s],l=u.split("."),c=l[l.length-1],h=a(l,n),f=e[u];h.data[c]=f,h.gl=t,Object.defineProperty(h,c,{get:r(c),set:o(c,f)})}return n}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=h(r(11)),o=r(2),a=h(r(5)),s=h(r(52)),u=h(r(53)),l=h(r(28)),c=r(6);function h(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this)),n=a.default.TRANSFORM_MODE===o.TRANSFORM_MODE.STATIC?s.default:u.default;return r.tempDisplayObjectParent=null,r.transform=new n,r.alpha=1,r.visible=!0,r.renderable=!0,r.parent=null,r.worldAlpha=1,r.filterArea=null,r._filters=null,r._enabledFilters=null,r._bounds=new l.default,r._boundsID=0,r._lastBoundsID=-1,r._boundsRect=null,r._localBoundsRect=null,r._mask=null,r._destroyed=!1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds(),e||(this._boundsRect||(this._boundsRect=new c.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new c.Rectangle),t=this._localBoundsRect);var n=this.getBounds(!1,t);return this.parent=r,this.transform=e,n},e.prototype.toGlobal=function(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,r,n){return e&&(t=e.toGlobal(t,r,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},e.prototype.renderWebGL=function(t){},e.prototype.renderCanvas=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;return this.position.x=t,this.position.y=e,this.scale.x=r||1,this.scale.y=n||1,this.rotation=i,this.skew.x=o,this.skew.y=a,this.pivot.x=s,this.pivot.y=u,this},e.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},n(e,[{key:"_tempDisplayObjectParent",get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent}},{key:"x",get:function(){return this.position.x},set:function(t){this.transform.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.transform.position.y=t}},{key:"worldTransform",get:function(){return this.transform.worldTransform}},{key:"localTransform",get:function(){return this.transform.localTransform}},{key:"position",get:function(){return this.transform.position},set:function(t){this.transform.position.copy(t)}},{key:"scale",get:function(){return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},{key:"pivot",get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},{key:"skew",get:function(){return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},{key:"rotation",get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t}},{key:"worldVisible",get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},{key:"mask",get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0,this._mask.isMask=!1),this._mask=t,this._mask&&(this._mask.renderable=!1,this._mask.isMask=!0)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}]),e}(i.default);e.default=f,f.prototype.displayObjectUpdateTransform=f.prototype.updateTransform},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(6);var o=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.position=new i.ObservablePoint(r.onChange,r,0,0),r.scale=new i.ObservablePoint(r.onChange,r,1,1),r.pivot=new i.ObservablePoint(r.onChange,r,0,0),r.skew=new i.ObservablePoint(r.updateSkew,r,0,0),r._rotation=0,r._cx=1,r._sx=0,r._cy=0,r._sy=1,r._localID=0,r._currentLocalID=0,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x),this._localID++},e.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale._x,t.b=this._sx*this.scale._x,t.c=this._cy*this.scale._y,t.d=this._sy*this.scale._y,t.tx=this.position._x-(this.pivot._x*t.a+this.pivot._y*t.c),t.ty=this.position._y-(this.pivot._x*t.b+this.pivot._y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale._x,e.b=this._sx*this.scale._x,e.c=this._cy*this.scale._y,e.d=this._sy*this.scale._y,e.tx=this.position._x-(this.pivot._x*e.a+this.pivot._y*e.c),e.ty=this.position._y-(this.pivot._x*e.b+this.pivot._y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,n=this.worldTransform;n.a=e.a*r.a+e.b*r.c,n.b=e.a*r.b+e.b*r.d,n.c=e.c*r.a+e.d*r.c,n.d=e.c*r.b+e.d*r.d,n.tx=e.tx*r.a+e.ty*r.c+r.tx,n.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}},e.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},n(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(r(30)).default);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(6);var o=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.position=new i.Point(0,0),r.scale=new i.Point(1,1),r.skew=new i.ObservablePoint(r.updateSkew,r,0,0),r.pivot=new i.Point(0,0),r._rotation=0,r._cx=1,r._sx=0,r._cy=0,r._sy=1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x)},e.prototype.updateLocalTransform=function(){var t=this.localTransform;t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d)},e.prototype.updateTransform=function(t){var e=this.localTransform;e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d);var r=t.worldTransform,n=this.worldTransform;n.a=e.a*r.a+e.b*r.c,n.b=e.a*r.b+e.b*r.d,n.c=e.c*r.a+e.d*r.c,n.d=e.c*r.b+e.d*r.d,n.tx=e.tx*r.a+e.ty*r.c+r.tx,n.ty=e.tx*r.b+e.ty*r.d+r.ty,this._worldID++},e.prototype.setFromMatrix=function(t){t.decompose(this)},n(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(r(30)).default);e.default=o},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location;if(0===t.indexOf("data:"))return"";e=e||window.location,i||(i=document.createElement("a"));i.href=t;var r=!(t=n.default.parse(i.href)).port&&""===e.port||t.port===e.port;if(t.hostname!==e.hostname||!r||t.protocol!==e.protocol)return"anonymous";return""};var n=function(t){return t&&t.__esModule?t:{default:t}}(r(55));var i=void 0},function(t,e,r){"use strict";var n=r(116),i=r(117);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=m,e.resolve=function(t,e){return m(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?m(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=m(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),h=["%","/","?",";","#"].concat(c),f=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(118);function m(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o<t.indexOf("#")?"?":"#",l=t.split(s);l[0]=l[0].replace(/\\/g,"/");var m=t=l.join(s);if(m=m.trim(),!r&&1===t.split("#").length){var E=u.exec(m);if(E)return this.path=m,this.href=m,this.pathname=E[1],E[2]?(this.search=E[2],this.query=e?y.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var x=a.exec(m);if(x){var b=(x=x[0]).toLowerCase();this.protocol=b,m=m.substr(x.length)}if(r||x||m.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===m.substr(0,2);!T||x&&v[x]||(m=m.substr(2),this.slashes=!0)}if(!v[x]&&(T||x&&!g[x])){for(var R,O,S=-1,w=0;w<f.length;w++){-1!==(C=m.indexOf(f[w]))&&(-1===S||C<S)&&(S=C)}-1!==(O=-1===S?m.lastIndexOf("@"):m.lastIndexOf("@",S))&&(R=m.slice(0,O),m=m.slice(O+1),this.auth=decodeURIComponent(R)),S=-1;for(w=0;w<h.length;w++){var C;-1!==(C=m.indexOf(h[w]))&&(-1===S||C<S)&&(S=C)}-1===S&&(S=m.length),this.host=m.slice(0,S),m=m.slice(S),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var I=this.hostname.split(/\./),P=(w=0,I.length);w<P;w++){var M=I[w];if(M&&!M.match(d)){for(var D="",L=0,U=M.length;L<U;L++)M.charCodeAt(L)>127?D+="x":D+=M[L];if(!D.match(d)){var N=I.slice(0,w),F=I.slice(w+1),j=M.match(p);j&&(N.push(j[1]),F.unshift(j[2])),F.length&&(m="/"+F.join(".")+m),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=n.toASCII(this.hostname));var k=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+k,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==m[0]&&(m="/"+m))}if(!_[b])for(w=0,P=c.length;w<P;w++){var H=c[w];if(-1!==m.indexOf(H)){var X=encodeURIComponent(H);X===H&&(X=escape(H)),m=m.split(H).join(X)}}var W=m.indexOf("#");-1!==W&&(this.hash=m.substr(W),m=m.slice(0,W));var G=m.indexOf("?");if(-1!==G?(this.search=m.substr(G),this.query=m.substr(G+1),e&&(this.query=y.parse(this.query)),m=m.slice(0,G)):e&&(this.search="",this.query={}),m&&(this.pathname=m),g[b]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var Y=this.search||"";this.path=k+Y}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,a="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=y.stringify(this.query));var s=this.search||a&&"?"+a||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||g[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),e+o+(r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(s=s.replace("#","%23"))+n},o.prototype.resolve=function(t){return this.resolveObject(m(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),l=0;l<u.length;l++){var c=u[l];"protocol"!==c&&(r[c]=t[c])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!g[t.protocol]){for(var h=Object.keys(t),f=0;f<h.length;f++){var d=h[f];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||v[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var _=r.pathname||"",y=r.search||"";r.path=_+y}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var m=r.pathname&&"/"===r.pathname.charAt(0),E=t.host||t.pathname&&"/"===t.pathname.charAt(0),x=E||m||r.host&&t.pathname,b=x,T=r.pathname&&r.pathname.split("/")||[],R=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(R&&(r.hostname="",r.port=null,r.host&&(""===T[0]?T[0]=r.host:T.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),x=x&&(""===p[0]||""===T[0])),E)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,T=p;else if(p.length)T||(T=[]),T.pop(),T=T.concat(p),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(R)r.hostname=r.host=T.shift(),(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift());return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!T.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var O=T.slice(-1)[0],S=(r.host||t.host||T.length>1)&&("."===O||".."===O)||""===O,w=0,C=T.length;C>=0;C--)"."===(O=T[C])?T.splice(C,1):".."===O?(T.splice(C,1),w++):w&&(T.splice(C,1),w--);if(!x&&!b)for(;w--;w)T.unshift("..");!x||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),S&&"/"!==T.join("/").substr(-1)&&T.push("");var A,I=""===T[0]||T[0]&&"/"===T[0].charAt(0);R&&(r.hostname=r.host=I?"":T.length?T.shift():"",(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift()));return(x=x||r.host&&T.length)&&!I&&T.unshift(""),T.length?r.pathname=T.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=l(r(12)),o=r(4),a=r(34),s=r(2),u=l(r(54));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(r,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw new Error("No video source element specified.");(r.readyState===r.HAVE_ENOUGH_DATA||r.readyState===r.HAVE_FUTURE_DATA)&&r.width&&r.height&&(r.complete=!0);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,n));return i.width=r.videoWidth,i.height=r.videoHeight,i._autoUpdate=!0,i._isAutoUpdating=!1,i.autoPlay=!0,i.update=i.update.bind(i),i._onCanPlay=i._onCanPlay.bind(i),r.addEventListener("play",i._onPlayStart.bind(i)),r.addEventListener("pause",i._onPlayStop.bind(i)),i.hasLoaded=!1,i.__loaded=!1,i._isSourceReady()?i._onCanPlay():(r.addEventListener("canplay",i._onCanPlay),r.addEventListener("canplaythrough",i._onCanPlay)),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(a.shared.add(this.update,this,s.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(a.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.__loaded||(this.__loaded=!0,this.emit("loaded",this)),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.source.play())},e.prototype.destroy=function(){this._isAutoUpdating&&a.shared.remove(this.update,this),this.source&&this.source._pixiId&&(i.default.removeFromCache(this.source._pixiId),delete this.source._pixiId,this.source.pause(),this.source.src="",this.source.load()),t.prototype.destroy.call(this)},e.fromVideo=function(t,r){t._pixiId||(t._pixiId="video_"+(0,o.uid)());var n=o.BaseTextureCache[t._pixiId];return n||(n=new e(t,r),i.default.addToCache(n,t._pixiId)),n},e.fromUrl=function(t,r,n){var i=document.createElement("video");i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","");var o=Array.isArray(t)?t[0].src||t[0]:t.src||t;if(void 0===n&&0!==o.indexOf("data:")?i.crossOrigin=(0,u.default)(o):n&&(i.crossOrigin="string"==typeof n?n:"anonymous"),Array.isArray(t))for(var a=0;a<t.length;++a)i.appendChild(h(t[a].src||t[a],t[a].mime));else i.appendChild(h(o,t.mime));return i.load(),e.fromVideo(i,r)},n(e,[{key:"autoUpdate",get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(a.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(a.shared.add(this.update,this,s.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0))}}]),e}(i.default);function h(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var r=document.createElement("source");return r.src=t,r.type=e,r}e.default=c,c.fromUrls=c.fromUrl},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(41));var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}return t.prototype.set=function(t,e,r){var i=e.width,o=e.height;if(r){var a=t.width/2/i,s=t.height/2/o,u=t.x/i+a,l=t.y/o+s;r=n.default.add(r,n.default.NW),this.x0=u+a*n.default.uX(r),this.y0=l+s*n.default.uY(r),r=n.default.add(r,2),this.x1=u+a*n.default.uX(r),this.y1=l+s*n.default.uY(r),r=n.default.add(r,2),this.x2=u+a*n.default.uX(r),this.y2=l+s*n.default.uY(r),r=n.default.add(r,2),this.x3=u+a*n.default.uX(r),this.y3=l+s*n.default.uY(r)}else this.x0=t.x/i,this.y0=t.y/o,this.x1=(t.x+t.width)/i,this.y1=t.y/o,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/o,this.x3=t.x/i,this.y3=(t.y+t.height)/o;this.uvsUint32[0]=(65535*this.y0&65535)<<16|65535*this.x0&65535,this.uvsUint32[1]=(65535*this.y1&65535)<<16|65535*this.x1&65535,this.uvsUint32[2]=(65535*this.y2&65535)<<16|65535*this.x2&65535,this.uvsUint32[3]=(65535*this.y3&65535)<<16|65535*this.x3&65535},t}();e.default=i},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(4),o=r(6),a=r(2),s=h(r(5)),u=h(r(13)),l=h(r(35)),c=h(r(11));function h(t){return t&&t.__esModule?t:{default:t}}var f=new o.Matrix,d=function(t){function e(r,n,l,c){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var h=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return(0,i.sayHello)(r),"number"==typeof n&&(n=Object.assign({width:n,height:l||s.default.RENDER_OPTIONS.height},c)),n=Object.assign({},s.default.RENDER_OPTIONS,n),h.options=n,h.type=a.RENDERER_TYPE.UNKNOWN,h.screen=new o.Rectangle(0,0,n.width,n.height),h.view=n.view||document.createElement("canvas"),h.resolution=n.resolution||s.default.RESOLUTION,h.transparent=n.transparent,h.autoResize=n.autoResize||!1,h.blendModes=null,h.preserveDrawingBuffer=n.preserveDrawingBuffer,h.clearBeforeRender=n.clearBeforeRender,h.roundPixels=n.roundPixels,h._backgroundColor=0,h._backgroundColorRgba=[0,0,0,0],h._backgroundColorString="#000000",h.backgroundColor=n.backgroundColor||h._backgroundColor,h._tempDisplayObjectParent=new u.default,h._lastObjectRendered=h._tempDisplayObjectParent,h}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoResize&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},e.prototype.generateTexture=function(t,e,r,n){n=n||t.getLocalBounds();var i=l.default.create(0|n.width,0|n.height,e,r);return f.tx=-n.x,f.ty=-n.y,this.render(t,i,!1,f,!0),i},e.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=a.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},n(e,[{key:"width",get:function(){return this.view.width}},{key:"height",get:function(){return this.view.height}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=(0,i.hex2string)(t),(0,i.hex2rgb)(t,this._backgroundColorRgba)}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(12)),i=o(r(5));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,o=arguments[2],a=arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,null,o));return s.resolution=a||i.default.RESOLUTION,s.width=Math.ceil(r),s.height=Math.ceil(n),s.realWidth=s.width*s.resolution,s.realHeight=s.height*s.resolution,s.scaleMode=void 0!==o?o:i.default.SCALE_MODE,s.hasLoaded=!0,s._glRenderTargets={},s._canvasRenderTarget=null,s.valid=!1,s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.resize=function(t,e){t=Math.ceil(t),e=Math.ceil(e),t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.renderer=null},e}(n.default);e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){return t&&t.__esModule?t:{default:t}}(r(5));var o=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=n||i.default.RESOLUTION,this.resize(e,r)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},n(t,[{key:"width",get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},{key:"height",get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}]),t}();e.default=o},function(t,e,r){"use strict";function n(t){var e=document.createElement("canvas");e.width=6,e.height=1;var r=e.getContext("2d");return r.fillStyle=t,r.fillRect(0,0,6,1),e}e.__esModule=!0,e.default=function(){if("undefined"==typeof document)return!1;var t=n("#ff00ff"),e=n("#ffff00"),r=document.createElement("canvas");r.width=6,r.height=1;var i=r.getContext("2d");i.globalCompositeOperation="multiply",i.drawImage(t,0,0),i.drawImage(e,2,0);var o=i.getImageData(2,0,1,1);if(!o)return!1;var a=o.data;return 255===a[0]&&0===a[1]&&0===a[2]}},function(t,e,r){"use strict";e.__esModule=!0;var n=a(r(64)),i=r(6),o=(r(9),a(r(65)));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=new i.Matrix,o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n\n original *= (masky.r * masky.a * alpha * clip);\n\n gl_FragColor = original;\n}\n"));return r.renderable=!1,o.maskSprite=r,o.maskMatrix=n,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.apply=function(t,e,r){var n=this.maskSprite,i=this.maskSprite.texture;i.valid&&(i.transform||(i.transform=new o.default(i,0)),i.transform.update(),this.uniforms.mask=i,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(i.transform.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=i.transform.uClampFrame,t.applyFilter(this,e,r))},e}(n.default);e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=u(r(128)),o=r(4),a=r(2),s=u(r(5));function u(t){return t&&t.__esModule?t:{default:t}}var l={},c=function(){function t(e,r,n){for(var u in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=r||t.defaultFragmentSrc,this._blendMode=a.BLEND_MODES.NORMAL,this.uniformData=n||(0,i.default)(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={},this.uniformData)this.uniforms[u]=this.uniformData[u].value,this.uniformData[u].type&&(this.uniformData[u].type=this.uniformData[u].type.toLowerCase());this.glShaders={},l[this.vertexSrc+this.fragmentSrc]||(l[this.vertexSrc+this.fragmentSrc]=(0,o.uid)()),this.glShaderKey=l[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=s.default.FILTER_RESOLUTION,this.enabled=!0,this.autoFit=!0}return t.prototype.apply=function(t,e,r,n,i){t.applyFilter(this,e,r,n)},n(t,[{key:"blendMode",get:function(){return this._blendMode},set:function(t){this._blendMode=t}}],[{key:"defaultVertexSrc",get:function(){return["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 projectionMatrix;","uniform mat3 filterMatrix;","varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;"," vTextureCoord = aTextureCoord ;","}"].join("\n")}},{key:"defaultFragmentSrc",get:function(){return["varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","uniform sampler2D uSampler;","uniform sampler2D filterSampler;","void main(void){"," vec4 masky = texture2D(filterSampler, vFilterCoord);"," vec4 sample = texture2D(uSampler, vTextureCoord);"," vec4 color;"," if(mod(vFilterCoord.x, 1.0) > 0.5)"," {"," color = vec4(1.0, 0.0, 0.0, 1.0);"," }"," else"," {"," color = vec4(0.0, 1.0, 0.0, 1.0);"," }"," gl_FragColor = mix(sample, masky, 0.5);"," gl_FragColor *= sample.a;","}"].join("\n")}}]),t}();e.default=c},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){return t&&t.__esModule?t:{default:t}}(r(25));var o=new i.default,a=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._texture=e,this.mapCoord=new i.default,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._lastTextureID=-1,this.clampOffset=0,this.clampMargin=void 0===r?.5:r}return t.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var r=this.mapCoord,n=0;n<t.length;n+=2){var i=t[n],o=t[n+1];e[n]=i*r.a+o*r.c+r.tx,e[n+1]=i*r.b+o*r.d+r.ty}return e},t.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._lastTextureID===e._updateID)return!1;this._lastTextureID=e._updateID;var r=e._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var n=e.orig,i=e.trim;i&&(o.set(n.width/i.width,0,0,n.height/i.height,-i.x/i.width,-i.y/i.height),this.mapCoord.append(o));var a=e.baseTexture,s=this.uClampFrame,u=this.clampMargin/a.resolution,l=this.clampOffset;return s[0]=(e._frame.x+u+l)/a.width,s[1]=(e._frame.y+u+l)/a.height,s[2]=(e._frame.x+e._frame.width-u+l)/a.width,s[3]=(e._frame.y+e._frame.height-u+l)/a.height,this.uClampOffset[0]=l/a.realWidth,this.uClampOffset[1]=l/a.realHeight,!0},n(t,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture=t,this._lastTextureID=-1}}]),t}();e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(7)),i=o(r(37));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.interleaved=new Float32Array(16);for(var o=0;o<4;o++)this.interleaved[4*o]=this.vertices[2*o],this.interleaved[4*o+1]=this.vertices[2*o+1],this.interleaved[4*o+2]=this.uvs[2*o],this.interleaved[4*o+3]=this.uvs[2*o+1];this.indices=(0,i.default)(1),this.vertexBuffer=n.default.GLBuffer.createVertexBuffer(e,this.interleaved,e.STATIC_DRAW),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.vao=new n.default.VertexArrayObject(e,r)}return t.prototype.initVao=function(t){this.vao.clear().addIndex(this.indexBuffer).addAttribute(this.vertexBuffer,t.attributes.aVertexPosition,this.gl.FLOAT,!1,16,0).addAttribute(this.vertexBuffer,t.attributes.aTextureCoord,this.gl.FLOAT,!1,16,8)},t.prototype.map=function(t,e){var r=0,n=0;return this.uvs[0]=r,this.uvs[1]=n,this.uvs[2]=r+e.width/t.width,this.uvs[3]=n,this.uvs[4]=r+e.width/t.width,this.uvs[5]=n+e.height/t.height,this.uvs[6]=r,this.uvs[7]=n+e.height/t.height,r=e.x,n=e.y,this.vertices[0]=r,this.vertices[1]=n,this.vertices[2]=r+e.width,this.vertices[3]=n,this.vertices[4]=r+e.width,this.vertices[5]=n+e.height,this.vertices[6]=r,this.vertices[7]=n+e.height,this},t.prototype.upload=function(){for(var t=0;t<4;t++)this.interleaved[4*t]=this.vertices[2*t],this.interleaved[4*t+1]=this.vertices[2*t+1],this.interleaved[4*t+2]=this.uvs[2*t],this.interleaved[4*t+3]=this.uvs[2*t+1];return this.vertexBuffer.upload(this.interleaved),this},t.prototype.destroy=function(){var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t}();e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(2),o=r(4);var a={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:i.TEXT_GRADIENT.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.styleID=0,this.reset(),c(this,e,e)}return t.prototype.clone=function(){var e={};return c(e,this,a),new t(e)},t.prototype.reset=function(){c(this,a,a)},t.prototype.toFontString=function(){var t="number"==typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var r=e.length-1;r>=0;r--){var n=e[r].trim();/([\"\'])[^\'\"]+\1/.test(n)||(n='"'+n+'"'),e[r]=n}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},n(t,[{key:"align",get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)}},{key:"breakWords",get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}},{key:"dropShadow",get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}},{key:"dropShadowAlpha",get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)}},{key:"dropShadowAngle",get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}},{key:"dropShadowBlur",get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}},{key:"dropShadowColor",get:function(){return this._dropShadowColor},set:function(t){var e=l(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}},{key:"dropShadowDistance",get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}},{key:"fill",get:function(){return this._fill},set:function(t){var e=l(t);this._fill!==e&&(this._fill=e,this.styleID++)}},{key:"fillGradientType",get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}},{key:"fillGradientStops",get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0})(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)}},{key:"fontFamily",get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}},{key:"fontSize",get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}},{key:"fontStyle",get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}},{key:"fontVariant",get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)}},{key:"leading",get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=t,this.styleID++)}},{key:"lineJoin",get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)}},{key:"miterLimit",get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)}},{key:"padding",get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)}},{key:"stroke",get:function(){return this._stroke},set:function(t){var e=l(t);this._stroke!==e&&(this._stroke=e,this.styleID++)}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)}},{key:"textBaseline",get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)}},{key:"trim",get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)}},{key:"whiteSpace",get:function(){return this._whiteSpace},set:function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)}},{key:"wordWrap",get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)}},{key:"wordWrapWidth",get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)}}]),t}();function u(t){return"number"==typeof t?(0,o.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function l(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=u(t[e]);return t}return u(t)}function c(t,e,r){for(var n in r)Array.isArray(e[n])?t[n]=e[n].slice():t[n]=e[n]}e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e,r,n,i,o,a,s,u,l){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.text=e,this.style=r,this.width=n,this.height=i,this.lines=o,this.lineWidths=a,this.lineHeight=s,this.maxLineWidth=u,this.fontProperties=l}return t.measureText=function(e,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t._canvas;n=n||r.wordWrap;var o=r.toFontString(),a=t.measureFont(o),s=i.getContext("2d");s.font=o;for(var u=(n?t.wordWrap(e,r,i):e).split(/(?:\r\n|\r|\n)/),l=new Array(u.length),c=0,h=0;h<u.length;h++){var f=s.measureText(u[h]).width+(u[h].length-1)*r.letterSpacing;l[h]=f,c=Math.max(c,f)}var d=c+r.strokeThickness;r.dropShadow&&(d+=r.dropShadowDistance);var p=r.lineHeight||a.fontSize+r.strokeThickness,_=Math.max(p,a.fontSize+r.strokeThickness)+(u.length-1)*(p+r.leading);return r.dropShadow&&(_+=r.dropShadowDistance),new t(e,r,d,_,u,l,p+r.leading,c,a)},t.wordWrap=function(e,r){for(var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:t._canvas).getContext("2d"),i=0,o="",a="",s={},u=r.letterSpacing,l=r.whiteSpace,c=t.collapseSpaces(l),h=t.collapseNewlines(l),f=!c,d=r.wordWrapWidth+u,p=t.tokenize(e),_=0;_<p.length;_++){var v=p[_];if(t.isNewline(v)){if(!h){a+=t.addLine(o),f=!c,o="",i=0;continue}v=" "}if(c){var g=t.isBreakingSpace(v),y=t.isBreakingSpace(o[o.length-1]);if(g&&y)continue}var m=t.getFromCache(v,u,s,n);if(m>d)if(""!==o&&(a+=t.addLine(o),o="",i=0),t.canBreakWords(v,r.breakWords))for(var E=v.split(""),x=0;x<E.length;x++){for(var b=E[x],T=1;E[x+T];){var R=E[x+T],O=b[b.length-1];if(t.canBreakChars(O,R,v,x,r.breakWords))break;b+=R,T++}x+=b.length-1;var S=t.getFromCache(b,u,s,n);S+i>d&&(a+=t.addLine(o),f=!1,o="",i=0),o+=b,i+=S}else{o.length>0&&(a+=t.addLine(o),o="",i=0);var w=_===p.length-1;a+=t.addLine(v,!w),f=!1,o="",i=0}else m+i>d&&(f=!1,a+=t.addLine(o),o="",i=0),(o.length>0||!t.isBreakingSpace(v)||f)&&(o+=v,i+=m)}return a+=t.addLine(o,!1)},t.addLine=function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=t.trimRight(e),e=r?e+"\n":e},t.getFromCache=function(t,e,r,n){var i=r[t];if(void 0===i){var o=t.length*e;i=n.measureText(t).width+o,r[t]=i}return i},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!=typeof e)return"";for(var r=e.length-1;r>=0;r--){var n=e[r];if(!t.isBreakingSpace(n))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"==typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e){return"string"==typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],n="";if("string"!=typeof e)return r;for(var i=0;i<e.length;i++){var o=e[i];t.isBreakingSpace(o)||t.isNewline(o)?(""!==n&&(r.push(n),n=""),r.push(o)):n+=o}return""!==n&&r.push(n),r},t.canBreakWords=function(t,e){return e},t.canBreakChars=function(t,e,r,n,i){return!0},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var r={},n=t._canvas,i=t._context;i.font=e;var o=t.METRICS_STRING+t.BASELINE_SYMBOL,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(t.BASELINE_SYMBOL).width),u=2*s;s=s*t.BASELINE_MULTIPLIER|0,n.width=a,n.height=u,i.fillStyle="#f00",i.fillRect(0,0,a,u),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,s);var l=i.getImageData(0,0,a,u).data,c=l.length,h=4*a,f=0,d=0,p=!1;for(f=0;f<s;++f){for(var _=0;_<h;_+=4)if(255!==l[d+_]){p=!0;break}if(p)break;d+=h}for(r.ascent=s-f,d=c-h,p=!1,f=u;f>s;--f){for(var v=0;v<h;v+=4)if(255!==l[d+v]){p=!0;break}if(p)break;d-=h}return r.descent=f-s,r.fontSize=r.ascent+r.descent,t._fonts[e]=r,r},t.clearMetrics=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e?delete t._fonts[e]:t._fonts={}},t}();e.default=n;var i=document.createElement("canvas");i.width=i.height=10,n._canvas=i,n._context=i.getContext("2d"),n._fonts={},n.METRICS_STRING="|Éq",n.BASELINE_SYMBOL="M",n.BASELINE_MULTIPLIER=1.4,n._newlines=[10,13],n._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e,r,n,i,o,a,s,u,l){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.lineWidth=e,this.lineAlignment=l,this.nativeLines=s,this.lineColor=r,this.lineAlpha=n,this._lineTint=r,this.fillColor=i,this.fillAlpha=o,this._fillTint=i,this.fill=a,this.holes=[],this.shape=u,this.type=u.type}return t.prototype.clone=function(){return new t(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.nativeLines,this.shape)},t.prototype.addHole=function(t){this.holes.push(t)},t.prototype.destroy=function(){this.shape=null,this.holes=null},t}();e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(71),o=l(r(13)),a=r(34),s=l(r(5)),u=r(2);function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(e,r,n,u,l){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"number"==typeof e&&(e=Object.assign({width:e,height:r||s.default.RENDER_OPTIONS.height,forceCanvas:!!u,sharedTicker:!!l},n)),this._options=e=Object.assign({autoStart:!0,sharedTicker:!1,forceCanvas:!1,sharedLoader:!1},e),this.renderer=(0,i.autoDetectRenderer)(e),this.stage=new o.default,this._ticker=null,this.ticker=e.sharedTicker?a.shared:new a.Ticker,e.autoStart&&this.start()}return t.prototype.render=function(){this.renderer.render(this.stage)},t.prototype.stop=function(){this._ticker.stop()},t.prototype.start=function(){this._ticker.start()},t.prototype.destroy=function(t,e){if(this._ticker){var r=this._ticker;this.ticker=null,r.destroy()}this.stage.destroy(e),this.stage=null,this.renderer.destroy(t),this.renderer=null,this._options=null},n(t,[{key:"ticker",set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,u.UPDATE_PRIORITY.LOW)},get:function(){return this._ticker}},{key:"view",get:function(){return this.renderer.view}},{key:"screen",get:function(){return this.renderer.screen}}]),t}();e.default=c},function(t,e,r){"use strict";e.__esModule=!0,e.autoDetectRenderer=function(t,e,r,a){var s=t&&t.forceCanvas;void 0!==a&&(s=a);if(!s&&n.isWebGLSupported())return new o.default(t,e,r);return new i.default(t,e,r)};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(4)),i=a(r(14)),o=a(r(21));function a(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";e.__esModule=!0,e.default={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1}},function(t,e,r){"use strict";e.__esModule=!0,e.BitmapText=e.TilingSpriteRenderer=e.TilingSprite=e.AnimatedSprite=void 0;var n=r(161);Object.defineProperty(e,"AnimatedSprite",{enumerable:!0,get:function(){return s(n).default}});var i=r(162);Object.defineProperty(e,"TilingSprite",{enumerable:!0,get:function(){return s(i).default}});var o=r(163);Object.defineProperty(e,"TilingSpriteRenderer",{enumerable:!0,get:function(){return s(o).default}});var a=r(164);function s(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"BitmapText",{enumerable:!0,get:function(){return s(a).default}}),r(165),r(166),r(167)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=u(r(75)),a=u(r(76)),s=u(r(77));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(r,n,s,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),u=u||5;var l=(0,o.default)(u,!0),c=(0,a.default)(u),h=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,l,c));return h.resolution=s||i.settings.RESOLUTION,h._quality=0,h.quality=n||4,h.strength=r||8,h.firstRun=!0,h}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.apply=function(t,e,r,n){if(this.firstRun){var i=t.renderer.gl,u=(0,s.default)(i);this.vertexSrc=(0,o.default)(u,!0),this.fragmentSrc=(0,a.default)(u),this.firstRun=!1}if(this.uniforms.strength=1/r.size.width*(r.size.width/e.size.width),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,n);else{for(var l=t.getRenderTarget(!0),c=e,h=l,f=0;f<this.passes-1;f++){t.applyFilter(this,c,h,!0);var d=h;h=c,c=d}t.applyFilter(this,c,r,n),t.returnRenderTarget(l)}},n(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(i.Filter);e.default=l},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){var r=Math.ceil(t/2),i=n,o="",a=void 0;a=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;s<t;s++){var u=a.replace("%index%",s);u=u.replace("%sampleIndex%",s-(r-1)+".0"),o+=u,o+="\n"}return i=(i=i.replace("%blur%",o)).replace("%size%",t)};var n=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform float strength;","uniform mat3 projectionMatrix;","varying vec2 vBlurTexCoords[%size%];","void main(void)","{","gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);","%blur%","}"].join("\n")},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){for(var e=n[t],r=e.length,o=i,a="",s=void 0,u=0;u<t;u++){var l="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",u);s=u,u>=r&&(s=t-u-1),l=l.replace("%value%",e[s]),a+=l,a+="\n"}return o=(o=o.replace("%blur%",a)).replace("%size%",t)};var n={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},i=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n")},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=t.getParameter(t.MAX_VARYING_VECTORS),r=15;for(;r>e;)r-=2;return r}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=u(r(75)),a=u(r(76)),s=u(r(77));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(r,n,s,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),u=u||5;var l=(0,o.default)(u,!1),c=(0,a.default)(u),h=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,l,c));return h.resolution=s||i.settings.RESOLUTION,h._quality=0,h.quality=n||4,h.strength=r||8,h.firstRun=!0,h}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.apply=function(t,e,r,n){if(this.firstRun){var i=t.renderer.gl,u=(0,s.default)(i);this.vertexSrc=(0,o.default)(u,!1),this.fragmentSrc=(0,a.default)(u),this.firstRun=!1}if(this.uniforms.strength=1/r.size.height*(r.size.height/e.size.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,n);else{for(var l=t.getRenderTarget(!0),c=e,h=l,f=0;f<this.passes-1;f++){t.applyFilter(this,c,h,!0);var d=h;h=c,c=d}t.applyFilter(this,c,r,n),t.returnRenderTarget(l)}},n(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(i.Filter);e.default=l},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.global=new i.Point,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return t.prototype.getLocalPosition=function(t,e,r){return t.worldTransform.applyInverse(r||this.global,e)},t.prototype.copyEvent=function(t){t.isPrimary&&(this.isPrimary=!0),this.button=t.button,this.buttons=Number.isInteger(t.buttons)?t.buttons:t.which,this.width=t.width,this.height=t.height,this.tiltX=t.tiltX,this.tiltY=t.tiltY,this.pointerType=t.pointerType,this.pressure=t.pressure,this.rotationAngle=t.rotationAngle,this.twist=t.twist||0,this.tangentialPressure=t.tangentialPressure||0},t.prototype.reset=function(){this.isPrimary=!1},n(t,[{key:"pointerId",get:function(){return this.identifier}}]),t}();e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.stopped=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0},t.prototype.reset=function(){this.stopped=!1,this.currentTarget=null,this.target=null},t}();e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},n(t,[{key:"pointerId",get:function(){return this._pointerId}},{key:"flags",get:function(){return this._flags},set:function(t){this._flags=t}},{key:"none",get:function(){return this._flags===this.constructor.FLAGS.NONE}},{key:"over",get:function(){return 0!=(this._flags&this.constructor.FLAGS.OVER)},set:function(t){this._doSet(this.constructor.FLAGS.OVER,t)}},{key:"rightDown",get:function(){return 0!=(this._flags&this.constructor.FLAGS.RIGHT_DOWN)},set:function(t){this._doSet(this.constructor.FLAGS.RIGHT_DOWN,t)}},{key:"leftDown",get:function(){return 0!=(this._flags&this.constructor.FLAGS.LEFT_DOWN)},set:function(t){this._doSet(this.constructor.FLAGS.LEFT_DOWN,t)}}]),t}();e.default=i,i.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4})},function(t,e,r){"use strict";e.__esModule=!0,e.default={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0}},function(t,e,r){"use strict";e.__esModule=!0,e.parse=a,e.default=function(){return function(t,e){if(t.data&&t.type===i.Resource.TYPE.XML)if(0!==t.data.getElementsByTagName("page").length&&0!==t.data.getElementsByTagName("info").length&&null!==t.data.getElementsByTagName("info")[0].getAttribute("face")){var r=t.isDataUrl?"":n.dirname(t.url);t.isDataUrl&&("."===r&&(r=""),this.baseUrl&&r&&"/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(r+="/")),(r=r.replace(this.baseUrl,""))&&"/"!==r.charAt(r.length-1)&&(r+="/");for(var o=t.data.getElementsByTagName("page"),s={},u=function(r){s[r.metadata.pageFile]=r.texture,Object.keys(s).length===o.length&&(a(t,s),e())},l=0;l<o.length;++l){var c=o[l].getAttribute("file"),h=r+c,f=!1;for(var d in this.resources)if(this.resources[d].url===h){this.resources[d].metadata.pageFile=c,u(this.resources[d]),f=!0;break}if(!f){var p={crossOrigin:t.crossOrigin,loadType:i.Resource.LOAD_TYPE.IMAGE,metadata:Object.assign({pageFile:c},t.metadata.imageMetadata),parentResource:t};this.add(h,p,u)}}}else e();else e()}};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(9)),i=r(17),o=r(73);function a(t,e){t.bitmapFont=o.BitmapText.registerFont(t.data,e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(e,r,n){void 0===r&&(r=!1),i(this,t),this._fn=e,this._once=r,this._thisArg=n,this._next=this._prev=this._owner=null}return n(t,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),t}();function a(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var s=function(){function t(){i(this,t),this._head=this._tail=void 0}return n(t,[{key:"handlers",value:function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=this._head;if(t)return!!e;for(var r=[];e;)r.push(e),e=e._next;return r}},{key:"has",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function(){var t=this._head;if(!t)return!1;for(;t;)t._once&&this.detach(t),t._fn.apply(t._thisArg,arguments),t=t._next;return!0}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return a(this,new o(t,!1,e))}},{key:"once",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return a(this,new o(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return t._owner!==this?this:(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null,this)}},{key:"detachAll",value:function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this}}]),t}();s.MiniSignalBinding=o,e.default=s,t.exports=e.default},function(t,e,r){"use strict";t.exports=function(t,e){e=e||{};for(var r={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},n=r.parser[e.strictMode?"strict":"loose"].exec(t),i={},o=14;o--;)i[r.key[o]]=n[o]||"";return i[r.q.name]={},i[r.key[12]].replace(r.q.parser,function(t,e,n){e&&(i[r.q.name][e]=n)}),i}},function(t,e,r){"use strict";function n(){}function i(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}e.__esModule=!0,e.eachSeries=function(t,e,r,n){var i=0,o=t.length;!function a(s){s||i===o?r&&r(s):n?setTimeout(function(){e(t[i++],a)},1):e(t[i++],a)}()},e.queue=function(t,e){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var r=0,o={_tasks:[],concurrency:e,saturated:n,unsaturated:n,buffer:e/4,empty:n,drain:n,error:n,started:!1,paused:!1,push:function(t,e){a(t,!1,e)},kill:function(){r=0,o.drain=n,o.started=!1,o._tasks=[]},unshift:function(t,e){a(t,!0,e)},process:function(){for(;!o.paused&&r<o.concurrency&&o._tasks.length;){var e=o._tasks.shift();0===o._tasks.length&&o.empty(),(r+=1)===o.concurrency&&o.saturated(),t(e.data,i(s(e)))}},length:function(){return o._tasks.length},running:function(){return r},idle:function(){return o._tasks.length+r===0},pause:function(){!0!==o.paused&&(o.paused=!0)},resume:function(){if(!1!==o.paused){o.paused=!1;for(var t=1;t<=o.concurrency;t++)o.process()}}};function a(t,e,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(o.started=!0,null==t&&o.idle())setTimeout(function(){return o.drain()},1);else{var i={data:t,callback:"function"==typeof r?r:n};e?o._tasks.unshift(i):o._tasks.push(i),setTimeout(function(){return o.process()},1)}}function s(t){return function(){r-=1,t.callback.apply(t,arguments),null!=arguments[0]&&o.error(arguments[0],t.data),r<=o.concurrency-o.buffer&&o.unsaturated(),o.idle()&&o.drain(),o.process()}}return o}},function(t,e,r){"use strict";e.__esModule=!0,e.encodeBinary=i;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(t){for(var e="",r=0;r<t.length;){for(var i=[0,0,0],o=[0,0,0,0],a=0;a<i.length;++a)r<t.length?i[a]=255&t.charCodeAt(r++):i[a]=0;switch(o[0]=i[0]>>2,o[1]=(3&i[0])<<4|i[1]>>4,o[2]=(15&i[1])<<2|i[2]>>6,o[3]=63&i[2],r-(t.length-1)){case 2:o[3]=64,o[2]=64;break;case 1:o[3]=64}for(var s=0;s<o.length;++s)e+=n.charAt(o[s])}return e}t.exports.default=i},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){return function(t,e){var r=t.name+"_image";if(t.data&&t.type===n.Resource.TYPE.JSON&&t.data.frames&&!this.resources[r]){var i={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata,parentResource:t},s=a(t,this.baseUrl);this.add(r,s,i,function(r){if(r.error)e(r.error);else{var n=new o.Spritesheet(r.texture.baseTexture,t.data,t.url);n.parse(function(){t.spritesheet=n,t.textures=n.textures,e()})}})}else e()}},e.getResourcePath=a;var n=r(17),i=function(t){return t&&t.__esModule?t:{default:t}}(r(55)),o=r(3);function a(t,e){return t.isDataUrl?t.data.meta.image:i.default.resolve(t.url.replace(e,""),t.data.meta.image)}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){return function(t,e){t.data&&t.type===n.Resource.TYPE.IMAGE&&(t.texture=i.default.fromLoader(t.data,t.url,t.name)),e()}};var n=r(17),i=function(t){return t&&t.__esModule?t:{default:t}}(r(10))},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(18));var i=function(t){function e(r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return a._ready=!0,a.verticesX=i||10,a.verticesY=o||10,a.drawMode=n.default.DRAW_MODES.TRIANGLES,a.refresh(),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._refresh=function(){for(var t=this._texture,e=this.verticesX*this.verticesY,r=[],n=[],i=[],o=this.verticesX-1,a=this.verticesY-1,s=t.width/o,u=t.height/a,l=0;l<e;l++){var c=l%this.verticesX,h=l/this.verticesX|0;r.push(c*s,h*u),n.push(c/o,h/a)}for(var f=o*a,d=0;d<f;d++){var p=d%o,_=d/o|0,v=_*this.verticesX+p,g=_*this.verticesX+p+1,y=(_+1)*this.verticesX+p,m=(_+1)*this.verticesX+p+1;i.push(v,g,y),i.push(g,m,y)}this.vertices=new Float32Array(r),this.uvs=new Float32Array(n),this.colors=new Float32Array([]),this.indices=new Uint16Array(i),this.dirty++,this.indexDirty++,this.multiplyUvs()},e.prototype._onTextureUpdate=function(){n.default.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},e}(n.default);e.default=i},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.maxItemsPerFrame=e,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();e.default=n},function(t,e){var r={utf8:{stringToBytes:function(t){return r.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(r.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}};t.exports=r},function(t,e,r){!function(){var e=r(196),n=r(92).utf8,i=r(197),o=r(92).bin,a=function(t,r){t.constructor==String?t=r&&"binary"===r.encoding?o.stringToBytes(t):n.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var s=e.bytesToWords(t),u=8*t.length,l=1732584193,c=-271733879,h=-1732584194,f=271733878,d=0;d<s.length;d++)s[d]=16711935&(s[d]<<8|s[d]>>>24)|4278255360&(s[d]<<24|s[d]>>>8);s[u>>>5]|=128<<u%32,s[14+(u+64>>>9<<4)]=u;var p=a._ff,_=a._gg,v=a._hh,g=a._ii;for(d=0;d<s.length;d+=16){var y=l,m=c,E=h,x=f;c=g(c=g(c=g(c=g(c=v(c=v(c=v(c=v(c=_(c=_(c=_(c=_(c=p(c=p(c=p(c=p(c,h=p(h,f=p(f,l=p(l,c,h,f,s[d+0],7,-680876936),c,h,s[d+1],12,-389564586),l,c,s[d+2],17,606105819),f,l,s[d+3],22,-1044525330),h=p(h,f=p(f,l=p(l,c,h,f,s[d+4],7,-176418897),c,h,s[d+5],12,1200080426),l,c,s[d+6],17,-1473231341),f,l,s[d+7],22,-45705983),h=p(h,f=p(f,l=p(l,c,h,f,s[d+8],7,1770035416),c,h,s[d+9],12,-1958414417),l,c,s[d+10],17,-42063),f,l,s[d+11],22,-1990404162),h=p(h,f=p(f,l=p(l,c,h,f,s[d+12],7,1804603682),c,h,s[d+13],12,-40341101),l,c,s[d+14],17,-1502002290),f,l,s[d+15],22,1236535329),h=_(h,f=_(f,l=_(l,c,h,f,s[d+1],5,-165796510),c,h,s[d+6],9,-1069501632),l,c,s[d+11],14,643717713),f,l,s[d+0],20,-373897302),h=_(h,f=_(f,l=_(l,c,h,f,s[d+5],5,-701558691),c,h,s[d+10],9,38016083),l,c,s[d+15],14,-660478335),f,l,s[d+4],20,-405537848),h=_(h,f=_(f,l=_(l,c,h,f,s[d+9],5,568446438),c,h,s[d+14],9,-1019803690),l,c,s[d+3],14,-187363961),f,l,s[d+8],20,1163531501),h=_(h,f=_(f,l=_(l,c,h,f,s[d+13],5,-1444681467),c,h,s[d+2],9,-51403784),l,c,s[d+7],14,1735328473),f,l,s[d+12],20,-1926607734),h=v(h,f=v(f,l=v(l,c,h,f,s[d+5],4,-378558),c,h,s[d+8],11,-2022574463),l,c,s[d+11],16,1839030562),f,l,s[d+14],23,-35309556),h=v(h,f=v(f,l=v(l,c,h,f,s[d+1],4,-1530992060),c,h,s[d+4],11,1272893353),l,c,s[d+7],16,-155497632),f,l,s[d+10],23,-1094730640),h=v(h,f=v(f,l=v(l,c,h,f,s[d+13],4,681279174),c,h,s[d+0],11,-358537222),l,c,s[d+3],16,-722521979),f,l,s[d+6],23,76029189),h=v(h,f=v(f,l=v(l,c,h,f,s[d+9],4,-640364487),c,h,s[d+12],11,-421815835),l,c,s[d+15],16,530742520),f,l,s[d+2],23,-995338651),h=g(h,f=g(f,l=g(l,c,h,f,s[d+0],6,-198630844),c,h,s[d+7],10,1126891415),l,c,s[d+14],15,-1416354905),f,l,s[d+5],21,-57434055),h=g(h,f=g(f,l=g(l,c,h,f,s[d+12],6,1700485571),c,h,s[d+3],10,-1894986606),l,c,s[d+10],15,-1051523),f,l,s[d+1],21,-2054922799),h=g(h,f=g(f,l=g(l,c,h,f,s[d+8],6,1873313359),c,h,s[d+15],10,-30611744),l,c,s[d+6],15,-1560198380),f,l,s[d+13],21,1309151649),h=g(h,f=g(f,l=g(l,c,h,f,s[d+4],6,-145523070),c,h,s[d+11],10,-1120210379),l,c,s[d+2],15,718787259),f,l,s[d+9],21,-343485551),l=l+y>>>0,c=c+m>>>0,h=h+E>>>0,f=f+x>>>0}return e.endian([l,c,h,f])};a._ff=function(t,e,r,n,i,o,a){var s=t+(e&r|~e&n)+(i>>>0)+a;return(s<<o|s>>>32-o)+e},a._gg=function(t,e,r,n,i,o,a){var s=t+(e&n|r&~n)+(i>>>0)+a;return(s<<o|s>>>32-o)+e},a._hh=function(t,e,r,n,i,o,a){var s=t+(e^r^n)+(i>>>0)+a;return(s<<o|s>>>32-o)+e},a._ii=function(t,e,r,n,i,o,a){var s=t+(r^(e|~n))+(i>>>0)+a;return(s<<o|s>>>32-o)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,r){if(void 0===t||null===t)throw new Error("Illegal argument "+t);var n=e.wordsToBytes(a(t,r));return r&&r.asBytes?n:r&&r.asString?o.bytesToString(n):e.bytesToHex(n)}}()},function(t,e,r){"use strict";r(95),r(97),r(98),r(99),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},function(t,e,r){"use strict";var n=function(t){return t&&t.__esModule?t:{default:t}}(r(96));Object.assign||(Object.assign=n.default)},function(t,e,r){"use strict";
|
|
9
|
+
*/(function(){var o="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],u="[object Arguments]",l="[object Array]",c="[object Boolean]",h="[object Date]",f="[object Error]",d="[object Function]",p="[object GeneratorFunction]",v="[object Map]",_="[object Number]",g="[object Object]",y="[object RegExp]",m="[object Set]",x="[object String]",E="[object Symbol]",b="[object WeakMap]",T="[object ArrayBuffer]",R="[object DataView]",O="[object Float32Array]",S="[object Float64Array]",C="[object Int8Array]",w="[object Int16Array]",A="[object Int32Array]",P="[object Uint8Array]",M="[object Uint16Array]",I="[object Uint32Array]",D=/\b__p \+= '';/g,L=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,j=RegExp(N.source),k=RegExp(F.source),B=/<%-([\s\S]+?)%>/g,H=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Y=/[\\^$.*+?()[\]{}|]/g,V=RegExp(Y.source),K=/^\s+/,q=/\s/,Z=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,J=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,et=/\\(\\)?/g,rt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,nt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,at=/^\[object .+?Constructor\]$/,st=/^0o[0-7]+$/i,ut=/^(?:0|[1-9]\d*)$/,lt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ct=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,ft="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",dt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pt="[\\ud800-\\udfff]",vt="["+dt+"]",_t="["+ft+"]",gt="\\d+",yt="[\\u2700-\\u27bf]",mt="[a-z\\xdf-\\xf6\\xf8-\\xff]",xt="[^\\ud800-\\udfff"+dt+gt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Et="\\ud83c[\\udffb-\\udfff]",bt="[^\\ud800-\\udfff]",Tt="(?:\\ud83c[\\udde6-\\uddff]){2}",Rt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ot="[A-Z\\xc0-\\xd6\\xd8-\\xde]",St="(?:"+mt+"|"+xt+")",Ct="(?:"+Ot+"|"+xt+")",wt="(?:"+_t+"|"+Et+")"+"?",At="[\\ufe0e\\ufe0f]?"+wt+("(?:\\u200d(?:"+[bt,Tt,Rt].join("|")+")[\\ufe0e\\ufe0f]?"+wt+")*"),Pt="(?:"+[yt,Tt,Rt].join("|")+")"+At,Mt="(?:"+[bt+_t+"?",_t,Tt,Rt,pt].join("|")+")",It=RegExp("['’]","g"),Dt=RegExp(_t,"g"),Lt=RegExp(Et+"(?="+Et+")|"+Mt+At,"g"),Ut=RegExp([Ot+"?"+mt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[vt,Ot,"$"].join("|")+")",Ct+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[vt,Ot+St,"$"].join("|")+")",Ot+"?"+St+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ot+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gt,Pt].join("|"),"g"),Nt=RegExp("[\\u200d\\ud800-\\udfff"+ft+"\\ufe0e\\ufe0f]"),Ft=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],kt=-1,Bt={};Bt[O]=Bt[S]=Bt[C]=Bt[w]=Bt[A]=Bt[P]=Bt["[object Uint8ClampedArray]"]=Bt[M]=Bt[I]=!0,Bt[u]=Bt[l]=Bt[T]=Bt[c]=Bt[R]=Bt[h]=Bt[f]=Bt[d]=Bt[v]=Bt[_]=Bt[g]=Bt[y]=Bt[m]=Bt[x]=Bt[b]=!1;var Ht={};Ht[u]=Ht[l]=Ht[T]=Ht[R]=Ht[c]=Ht[h]=Ht[O]=Ht[S]=Ht[C]=Ht[w]=Ht[A]=Ht[v]=Ht[_]=Ht[g]=Ht[y]=Ht[m]=Ht[x]=Ht[E]=Ht[P]=Ht["[object Uint8ClampedArray]"]=Ht[M]=Ht[I]=!0,Ht[f]=Ht[d]=Ht[b]=!1;var Wt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Gt=parseFloat,Xt=parseInt,zt="object"==typeof t&&t&&t.Object===Object&&t,Yt="object"==typeof self&&self&&self.Object===Object&&self,Vt=zt||Yt||Function("return this")(),Kt=e&&!e.nodeType&&e,qt=Kt&&"object"==typeof n&&n&&!n.nodeType&&n,Zt=qt&&qt.exports===Kt,$t=Zt&&zt.process,Qt=function(){try{var t=qt&&qt.require&&qt.require("util").types;return t||$t&&$t.binding&&$t.binding("util")}catch(t){}}(),Jt=Qt&&Qt.isArrayBuffer,te=Qt&&Qt.isDate,ee=Qt&&Qt.isMap,re=Qt&&Qt.isRegExp,ne=Qt&&Qt.isSet,ie=Qt&&Qt.isTypedArray;function oe(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function ae(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(n,a,r(a),t)}return n}function se(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function ue(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function le(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function ce(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}function he(t,e){return!!(null==t?0:t.length)&&Ee(t,e,0)>-1}function fe(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function de(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function pe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function ve(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function _e(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function ge(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var ye=Oe("length");function me(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function xe(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Ee(t,e,r){return e==e?function(t,e,r){var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):xe(t,Te,r)}function be(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function Te(t){return t!=t}function Re(t,e){var r=null==t?0:t.length;return r?we(t,e)/r:NaN}function Oe(t){return function(e){return null==e?void 0:e[t]}}function Se(t){return function(e){return null==t?void 0:t[e]}}function Ce(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function we(t,e){for(var r,n=-1,i=t.length;++n<i;){var o=e(t[n]);void 0!==o&&(r=void 0===r?o:r+o)}return r}function Ae(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Pe(t){return t?t.slice(0,Ke(t)+1).replace(K,""):t}function Me(t){return function(e){return t(e)}}function Ie(t,e){return de(e,(function(e){return t[e]}))}function De(t,e){return t.has(e)}function Le(t,e){for(var r=-1,n=t.length;++r<n&&Ee(e,t[r],0)>-1;);return r}function Ue(t,e){for(var r=t.length;r--&&Ee(e,t[r],0)>-1;);return r}function Ne(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var Fe=Se({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),je=Se({"&":"&","<":"<",">":">",'"':""","'":"'"});function ke(t){return"\\"+Wt[t]}function Be(t){return Nt.test(t)}function He(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function We(t,e){return function(r){return t(e(r))}}function Ge(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r];s!==e&&s!==a||(t[r]=a,o[i++]=r)}return o}function Xe(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function ze(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function Ye(t){return Be(t)?function(t){var e=Lt.lastIndex=0;for(;Lt.test(t);)++e;return e}(t):ye(t)}function Ve(t){return Be(t)?function(t){return t.match(Lt)||[]}(t):function(t){return t.split("")}(t)}function Ke(t){for(var e=t.length;e--&&q.test(t.charAt(e)););return e}var qe=Se({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Ze=function t(e){var r,n=(e=null==e?Vt:Ze.defaults(Vt.Object(),e,Ze.pick(Vt,jt))).Array,i=e.Date,q=e.Error,ft=e.Function,dt=e.Math,pt=e.Object,vt=e.RegExp,_t=e.String,gt=e.TypeError,yt=n.prototype,mt=ft.prototype,xt=pt.prototype,Et=e["__core-js_shared__"],bt=mt.toString,Tt=xt.hasOwnProperty,Rt=0,Ot=(r=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",St=xt.toString,Ct=bt.call(pt),wt=Vt._,At=vt("^"+bt.call(Tt).replace(Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pt=Zt?e.Buffer:void 0,Mt=e.Symbol,Lt=e.Uint8Array,Nt=Pt?Pt.allocUnsafe:void 0,Wt=We(pt.getPrototypeOf,pt),zt=pt.create,Yt=xt.propertyIsEnumerable,Kt=yt.splice,qt=Mt?Mt.isConcatSpreadable:void 0,$t=Mt?Mt.iterator:void 0,Qt=Mt?Mt.toStringTag:void 0,ye=function(){try{var t=to(pt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Se=e.clearTimeout!==Vt.clearTimeout&&e.clearTimeout,$e=i&&i.now!==Vt.Date.now&&i.now,Qe=e.setTimeout!==Vt.setTimeout&&e.setTimeout,Je=dt.ceil,tr=dt.floor,er=pt.getOwnPropertySymbols,rr=Pt?Pt.isBuffer:void 0,nr=e.isFinite,ir=yt.join,or=We(pt.keys,pt),ar=dt.max,sr=dt.min,ur=i.now,lr=e.parseInt,cr=dt.random,hr=yt.reverse,fr=to(e,"DataView"),dr=to(e,"Map"),pr=to(e,"Promise"),vr=to(e,"Set"),_r=to(e,"WeakMap"),gr=to(pt,"create"),yr=_r&&new _r,mr={},xr=wo(fr),Er=wo(dr),br=wo(pr),Tr=wo(vr),Rr=wo(_r),Or=Mt?Mt.prototype:void 0,Sr=Or?Or.valueOf:void 0,Cr=Or?Or.toString:void 0;function wr(t){if(za(t)&&!La(t)&&!(t instanceof Ir)){if(t instanceof Mr)return t;if(Tt.call(t,"__wrapped__"))return Ao(t)}return new Mr(t)}var Ar=function(){function t(){}return function(e){if(!Xa(e))return{};if(zt)return zt(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function Pr(){}function Mr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Ir(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Lr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ur(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Nr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Ur;++e<r;)this.add(t[e])}function Fr(t){var e=this.__data__=new Lr(t);this.size=e.size}function jr(t,e){var r=La(t),n=!r&&Da(t),i=!r&&!n&&ja(t),o=!r&&!n&&!i&&Ja(t),a=r||n||i||o,s=a?Ae(t.length,_t):[],u=s.length;for(var l in t)!e&&!Tt.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||so(l,u))||s.push(l);return s}function kr(t){var e=t.length;return e?t[Fn(0,e-1)]:void 0}function Br(t,e){return Oo(yi(t),qr(e,0,t.length))}function Hr(t){return Oo(yi(t))}function Wr(t,e,r){(void 0!==r&&!Pa(t[e],r)||void 0===r&&!(e in t))&&Vr(t,e,r)}function Gr(t,e,r){var n=t[e];Tt.call(t,e)&&Pa(n,r)&&(void 0!==r||e in t)||Vr(t,e,r)}function Xr(t,e){for(var r=t.length;r--;)if(Pa(t[r][0],e))return r;return-1}function zr(t,e,r,n){return tn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function Yr(t,e){return t&&mi(e,Es(e),t)}function Vr(t,e,r){"__proto__"==e&&ye?ye(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Kr(t,e){for(var r=-1,i=e.length,o=n(i),a=null==t;++r<i;)o[r]=a?void 0:_s(t,e[r]);return o}function qr(t,e,r){return t==t&&(void 0!==r&&(t=t<=r?t:r),void 0!==e&&(t=t>=e?t:e)),t}function Zr(t,e,r,n,i,o){var a,s=1&e,l=2&e,f=4&e;if(r&&(a=i?r(t,n,i,o):r(t)),void 0!==a)return a;if(!Xa(t))return t;var b=La(t);if(b){if(a=function(t){var e=t.length,r=new t.constructor(e);e&&"string"==typeof t[0]&&Tt.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!s)return yi(t,a)}else{var D=no(t),L=D==d||D==p;if(ja(t))return fi(t,s);if(D==g||D==u||L&&!i){if(a=l||L?{}:oo(t),!s)return l?function(t,e){return mi(t,ro(t),e)}(t,function(t,e){return t&&mi(e,bs(e),t)}(a,t)):function(t,e){return mi(t,eo(t),e)}(t,Yr(a,t))}else{if(!Ht[D])return i?t:{};a=function(t,e,r){var n=t.constructor;switch(e){case T:return di(t);case c:case h:return new n(+t);case R:return function(t,e){var r=e?di(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case O:case S:case C:case w:case A:case P:case"[object Uint8ClampedArray]":case M:case I:return pi(t,r);case v:return new n;case _:case x:return new n(t);case y:return function(t){var e=new t.constructor(t.source,nt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case m:return new n;case E:return i=t,Sr?pt(Sr.call(i)):{}}var i}(t,D,s)}}o||(o=new Fr);var U=o.get(t);if(U)return U;o.set(t,a),Za(t)?t.forEach((function(n){a.add(Zr(n,e,r,n,t,o))})):Ya(t)&&t.forEach((function(n,i){a.set(i,Zr(n,e,r,i,t,o))}));var N=b?void 0:(f?l?Vi:Yi:l?bs:Es)(t);return se(N||t,(function(n,i){N&&(n=t[i=n]),Gr(a,i,Zr(n,e,r,i,t,o))})),a}function $r(t,e,r){var n=r.length;if(null==t)return!n;for(t=pt(t);n--;){var i=r[n],o=e[i],a=t[i];if(void 0===a&&!(i in t)||!o(a))return!1}return!0}function Qr(t,e,r){if("function"!=typeof t)throw new gt(o);return Eo((function(){t.apply(void 0,r)}),e)}function Jr(t,e,r,n){var i=-1,o=he,a=!0,s=t.length,u=[],l=e.length;if(!s)return u;r&&(e=de(e,Me(r))),n?(o=fe,a=!1):e.length>=200&&(o=De,a=!1,e=new Nr(e));t:for(;++i<s;){var c=t[i],h=null==r?c:r(c);if(c=n||0!==c?c:0,a&&h==h){for(var f=l;f--;)if(e[f]===h)continue t;u.push(c)}else o(e,h,n)||u.push(c)}return u}wr.templateSettings={escape:B,evaluate:H,interpolate:W,variable:"",imports:{_:wr}},wr.prototype=Pr.prototype,wr.prototype.constructor=wr,Mr.prototype=Ar(Pr.prototype),Mr.prototype.constructor=Mr,Ir.prototype=Ar(Pr.prototype),Ir.prototype.constructor=Ir,Dr.prototype.clear=function(){this.__data__=gr?gr(null):{},this.size=0},Dr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Dr.prototype.get=function(t){var e=this.__data__;if(gr){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Tt.call(e,t)?e[t]:void 0},Dr.prototype.has=function(t){var e=this.__data__;return gr?void 0!==e[t]:Tt.call(e,t)},Dr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=gr&&void 0===e?"__lodash_hash_undefined__":e,this},Lr.prototype.clear=function(){this.__data__=[],this.size=0},Lr.prototype.delete=function(t){var e=this.__data__,r=Xr(e,t);return!(r<0)&&(r==e.length-1?e.pop():Kt.call(e,r,1),--this.size,!0)},Lr.prototype.get=function(t){var e=this.__data__,r=Xr(e,t);return r<0?void 0:e[r][1]},Lr.prototype.has=function(t){return Xr(this.__data__,t)>-1},Lr.prototype.set=function(t,e){var r=this.__data__,n=Xr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Ur.prototype.clear=function(){this.size=0,this.__data__={hash:new Dr,map:new(dr||Lr),string:new Dr}},Ur.prototype.delete=function(t){var e=Qi(this,t).delete(t);return this.size-=e?1:0,e},Ur.prototype.get=function(t){return Qi(this,t).get(t)},Ur.prototype.has=function(t){return Qi(this,t).has(t)},Ur.prototype.set=function(t,e){var r=Qi(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Nr.prototype.add=Nr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Nr.prototype.has=function(t){return this.__data__.has(t)},Fr.prototype.clear=function(){this.__data__=new Lr,this.size=0},Fr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Fr.prototype.get=function(t){return this.__data__.get(t)},Fr.prototype.has=function(t){return this.__data__.has(t)},Fr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Lr){var n=r.__data__;if(!dr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Ur(n)}return r.set(t,e),this.size=r.size,this};var tn=bi(ln),en=bi(cn,!0);function rn(t,e){var r=!0;return tn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function nn(t,e,r){for(var n=-1,i=t.length;++n<i;){var o=t[n],a=e(o);if(null!=a&&(void 0===s?a==a&&!Qa(a):r(a,s)))var s=a,u=o}return u}function on(t,e){var r=[];return tn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function an(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=ao),i||(i=[]);++o<a;){var s=t[o];e>0&&r(s)?e>1?an(s,e-1,r,n,i):pe(i,s):n||(i[i.length]=s)}return i}var sn=Ti(),un=Ti(!0);function ln(t,e){return t&&sn(t,e,Es)}function cn(t,e){return t&&un(t,e,Es)}function hn(t,e){return ce(e,(function(e){return Ha(t[e])}))}function fn(t,e){for(var r=0,n=(e=ui(e,t)).length;null!=t&&r<n;)t=t[Co(e[r++])];return r&&r==n?t:void 0}function dn(t,e,r){var n=e(t);return La(t)?n:pe(n,r(t))}function pn(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Qt&&Qt in pt(t)?function(t){var e=Tt.call(t,Qt),r=t[Qt];try{t[Qt]=void 0;var n=!0}catch(t){}var i=St.call(t);n&&(e?t[Qt]=r:delete t[Qt]);return i}(t):function(t){return St.call(t)}(t)}function vn(t,e){return t>e}function _n(t,e){return null!=t&&Tt.call(t,e)}function gn(t,e){return null!=t&&e in pt(t)}function yn(t,e,r){for(var i=r?fe:he,o=t[0].length,a=t.length,s=a,u=n(a),l=1/0,c=[];s--;){var h=t[s];s&&e&&(h=de(h,Me(e))),l=sr(h.length,l),u[s]=!r&&(e||o>=120&&h.length>=120)?new Nr(s&&h):void 0}h=t[0];var f=-1,d=u[0];t:for(;++f<o&&c.length<l;){var p=h[f],v=e?e(p):p;if(p=r||0!==p?p:0,!(d?De(d,v):i(c,v,r))){for(s=a;--s;){var _=u[s];if(!(_?De(_,v):i(t[s],v,r)))continue t}d&&d.push(v),c.push(p)}}return c}function mn(t,e,r){var n=null==(t=go(t,e=ui(e,t)))?t:t[Co(Bo(e))];return null==n?void 0:oe(n,t,r)}function xn(t){return za(t)&&pn(t)==u}function En(t,e,r,n,i){return t===e||(null==t||null==e||!za(t)&&!za(e)?t!=t&&e!=e:function(t,e,r,n,i,o){var a=La(t),s=La(e),d=a?l:no(t),p=s?l:no(e),b=(d=d==u?g:d)==g,O=(p=p==u?g:p)==g,S=d==p;if(S&&ja(t)){if(!ja(e))return!1;a=!0,b=!1}if(S&&!b)return o||(o=new Fr),a||Ja(t)?Xi(t,e,r,n,i,o):function(t,e,r,n,i,o,a){switch(r){case R:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case T:return!(t.byteLength!=e.byteLength||!o(new Lt(t),new Lt(e)));case c:case h:case _:return Pa(+t,+e);case f:return t.name==e.name&&t.message==e.message;case y:case x:return t==e+"";case v:var s=He;case m:var u=1&n;if(s||(s=Xe),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;n|=2,a.set(t,e);var d=Xi(s(t),s(e),n,i,o,a);return a.delete(t),d;case E:if(Sr)return Sr.call(t)==Sr.call(e)}return!1}(t,e,d,r,n,i,o);if(!(1&r)){var C=b&&Tt.call(t,"__wrapped__"),w=O&&Tt.call(e,"__wrapped__");if(C||w){var A=C?t.value():t,P=w?e.value():e;return o||(o=new Fr),i(A,P,r,n,o)}}if(!S)return!1;return o||(o=new Fr),function(t,e,r,n,i,o){var a=1&r,s=Yi(t),u=s.length,l=Yi(e).length;if(u!=l&&!a)return!1;var c=u;for(;c--;){var h=s[c];if(!(a?h in e:Tt.call(e,h)))return!1}var f=o.get(t),d=o.get(e);if(f&&d)return f==e&&d==t;var p=!0;o.set(t,e),o.set(e,t);var v=a;for(;++c<u;){h=s[c];var _=t[h],g=e[h];if(n)var y=a?n(g,_,h,e,t,o):n(_,g,h,t,e,o);if(!(void 0===y?_===g||i(_,g,r,n,o):y)){p=!1;break}v||(v="constructor"==h)}if(p&&!v){var m=t.constructor,x=e.constructor;m==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof x&&x instanceof x||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,r,n,i,o)}(t,e,r,n,En,i))}function bn(t,e,r,n){var i=r.length,o=i,a=!n;if(null==t)return!o;for(t=pt(t);i--;){var s=r[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var u=(s=r[i])[0],l=t[u],c=s[1];if(a&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new Fr;if(n)var f=n(l,c,u,t,e,h);if(!(void 0===f?En(c,l,3,n,h):f))return!1}}return!0}function Tn(t){return!(!Xa(t)||(e=t,Ot&&Ot in e))&&(Ha(t)?At:at).test(wo(t));var e}function Rn(t){return"function"==typeof t?t:null==t?Vs:"object"==typeof t?La(t)?Pn(t[0],t[1]):An(t):ru(t)}function On(t){if(!fo(t))return or(t);var e=[];for(var r in pt(t))Tt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Sn(t){if(!Xa(t))return function(t){var e=[];if(null!=t)for(var r in pt(t))e.push(r);return e}(t);var e=fo(t),r=[];for(var n in t)("constructor"!=n||!e&&Tt.call(t,n))&&r.push(n);return r}function Cn(t,e){return t<e}function wn(t,e){var r=-1,i=Na(t)?n(t.length):[];return tn(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function An(t){var e=Ji(t);return 1==e.length&&e[0][2]?vo(e[0][0],e[0][1]):function(r){return r===t||bn(r,t,e)}}function Pn(t,e){return lo(t)&&po(e)?vo(Co(t),e):function(r){var n=_s(r,t);return void 0===n&&n===e?gs(r,t):En(e,n,3)}}function Mn(t,e,r,n,i){t!==e&&sn(e,(function(o,a){if(i||(i=new Fr),Xa(o))!function(t,e,r,n,i,o,a){var s=mo(t,r),u=mo(e,r),l=a.get(u);if(l)return void Wr(t,r,l);var c=o?o(s,u,r+"",t,e,a):void 0,h=void 0===c;if(h){var f=La(u),d=!f&&ja(u),p=!f&&!d&&Ja(u);c=u,f||d||p?La(s)?c=s:Fa(s)?c=yi(s):d?(h=!1,c=fi(u,!0)):p?(h=!1,c=pi(u,!0)):c=[]:Ka(u)||Da(u)?(c=s,Da(s)?c=ss(s):Xa(s)&&!Ha(s)||(c=oo(u))):h=!1}h&&(a.set(u,c),i(c,u,n,o,a),a.delete(u));Wr(t,r,c)}(t,e,a,r,Mn,n,i);else{var s=n?n(mo(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Wr(t,a,s)}}),bs)}function In(t,e){var r=t.length;if(r)return so(e+=e<0?r:0,r)?t[e]:void 0}function Dn(t,e,r){e=e.length?de(e,(function(t){return La(t)?function(e){return fn(e,1===t.length?t[0]:t)}:t})):[Vs];var n=-1;return e=de(e,Me($i())),function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}(wn(t,(function(t,r,i){return{criteria:de(e,(function(e){return e(t)})),index:++n,value:t}})),(function(t,e){return function(t,e,r){var n=-1,i=t.criteria,o=e.criteria,a=i.length,s=r.length;for(;++n<a;){var u=vi(i[n],o[n]);if(u){if(n>=s)return u;var l=r[n];return u*("desc"==l?-1:1)}}return t.index-e.index}(t,e,r)}))}function Ln(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var a=e[n],s=fn(t,a);r(s,a)&&Wn(o,ui(a,t),s)}return o}function Un(t,e,r,n){var i=n?be:Ee,o=-1,a=e.length,s=t;for(t===e&&(e=yi(e)),r&&(s=de(t,Me(r)));++o<a;)for(var u=0,l=e[o],c=r?r(l):l;(u=i(s,c,u,n))>-1;)s!==t&&Kt.call(s,u,1),Kt.call(t,u,1);return t}function Nn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;so(i)?Kt.call(t,i,1):ti(t,i)}}return t}function Fn(t,e){return t+tr(cr()*(e-t+1))}function jn(t,e){var r="";if(!t||e<1||e>9007199254740991)return r;do{e%2&&(r+=t),(e=tr(e/2))&&(t+=t)}while(e);return r}function kn(t,e){return bo(_o(t,e,Vs),t+"")}function Bn(t){return kr(Ps(t))}function Hn(t,e){var r=Ps(t);return Oo(r,qr(e,0,r.length))}function Wn(t,e,r,n){if(!Xa(t))return t;for(var i=-1,o=(e=ui(e,t)).length,a=o-1,s=t;null!=s&&++i<o;){var u=Co(e[i]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(i!=a){var c=s[u];void 0===(l=n?n(c,u,s):void 0)&&(l=Xa(c)?c:so(e[i+1])?[]:{})}Gr(s,u,l),s=s[u]}return t}var Gn=yr?function(t,e){return yr.set(t,e),t}:Vs,Xn=ye?function(t,e){return ye(t,"toString",{configurable:!0,enumerable:!1,value:Xs(e),writable:!0})}:Vs;function zn(t){return Oo(Ps(t))}function Yn(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=n(o);++i<o;)a[i]=t[i+e];return a}function Vn(t,e){var r;return tn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function Kn(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=t[o];null!==a&&!Qa(a)&&(r?a<=e:a<e)?n=o+1:i=o}return i}return qn(t,e,Vs,r)}function qn(t,e,r,n){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=r(e))!=e,s=null===e,u=Qa(e),l=void 0===e;i<o;){var c=tr((i+o)/2),h=r(t[c]),f=void 0!==h,d=null===h,p=h==h,v=Qa(h);if(a)var _=n||p;else _=l?p&&(n||f):s?p&&f&&(n||!d):u?p&&f&&!d&&(n||!v):!d&&!v&&(n?h<=e:h<e);_?i=c+1:o=c}return sr(o,4294967294)}function Zn(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var a=t[r],s=e?e(a):a;if(!r||!Pa(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function $n(t){return"number"==typeof t?t:Qa(t)?NaN:+t}function Qn(t){if("string"==typeof t)return t;if(La(t))return de(t,Qn)+"";if(Qa(t))return Cr?Cr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Jn(t,e,r){var n=-1,i=he,o=t.length,a=!0,s=[],u=s;if(r)a=!1,i=fe;else if(o>=200){var l=e?null:ji(t);if(l)return Xe(l);a=!1,i=De,u=new Nr}else u=e?[]:s;t:for(;++n<o;){var c=t[n],h=e?e(c):c;if(c=r||0!==c?c:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,r)||(u!==s&&u.push(h),s.push(c))}return s}function ti(t,e){return null==(t=go(t,e=ui(e,t)))||delete t[Co(Bo(e))]}function ei(t,e,r,n){return Wn(t,e,r(fn(t,e)),n)}function ri(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?Yn(t,n?0:o,n?o+1:i):Yn(t,n?o+1:0,n?i:o)}function ni(t,e){var r=t;return r instanceof Ir&&(r=r.value()),ve(e,(function(t,e){return e.func.apply(e.thisArg,pe([t],e.args))}),r)}function ii(t,e,r){var i=t.length;if(i<2)return i?Jn(t[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=Jr(a[o]||s,t[u],e,r));return Jn(an(a,1),e,r)}function oi(t,e,r){for(var n=-1,i=t.length,o=e.length,a={};++n<i;){var s=n<o?e[n]:void 0;r(a,t[n],s)}return a}function ai(t){return Fa(t)?t:[]}function si(t){return"function"==typeof t?t:Vs}function ui(t,e){return La(t)?t:lo(t,e)?[t]:So(us(t))}var li=kn;function ci(t,e,r){var n=t.length;return r=void 0===r?n:r,!e&&r>=n?t:Yn(t,e,r)}var hi=Se||function(t){return Vt.clearTimeout(t)};function fi(t,e){if(e)return t.slice();var r=t.length,n=Nt?Nt(r):new t.constructor(r);return t.copy(n),n}function di(t){var e=new t.constructor(t.byteLength);return new Lt(e).set(new Lt(t)),e}function pi(t,e){var r=e?di(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function vi(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,o=Qa(t),a=void 0!==e,s=null===e,u=e==e,l=Qa(e);if(!s&&!l&&!o&&t>e||o&&a&&u&&!s&&!l||n&&a&&u||!r&&u||!i)return 1;if(!n&&!o&&!l&&t<e||l&&r&&i&&!n&&!o||s&&r&&i||!a&&i||!u)return-1}return 0}function _i(t,e,r,i){for(var o=-1,a=t.length,s=r.length,u=-1,l=e.length,c=ar(a-s,0),h=n(l+c),f=!i;++u<l;)h[u]=e[u];for(;++o<s;)(f||o<a)&&(h[r[o]]=t[o]);for(;c--;)h[u++]=t[o++];return h}function gi(t,e,r,i){for(var o=-1,a=t.length,s=-1,u=r.length,l=-1,c=e.length,h=ar(a-u,0),f=n(h+c),d=!i;++o<h;)f[o]=t[o];for(var p=o;++l<c;)f[p+l]=e[l];for(;++s<u;)(d||o<a)&&(f[p+r[s]]=t[o++]);return f}function yi(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function mi(t,e,r,n){var i=!r;r||(r={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=n?n(r[s],t[s],s,r,t):void 0;void 0===u&&(u=t[s]),i?Vr(r,s,u):Gr(r,s,u)}return r}function xi(t,e){return function(r,n){var i=La(r)?ae:zr,o=e?e():{};return i(r,t,$i(n,2),o)}}function Ei(t){return kn((function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&uo(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=pt(e);++n<i;){var s=r[n];s&&t(e,s,n,o)}return e}))}function bi(t,e){return function(r,n){if(null==r)return r;if(!Na(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=pt(r);(e?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function Ti(t){return function(e,r,n){for(var i=-1,o=pt(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}function Ri(t){return function(e){var r=Be(e=us(e))?Ve(e):void 0,n=r?r[0]:e.charAt(0),i=r?ci(r,1).join(""):e.slice(1);return n[t]()+i}}function Oi(t){return function(e){return ve(Hs(Ds(e).replace(It,"")),t,"")}}function Si(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Ar(t.prototype),n=t.apply(r,e);return Xa(n)?n:r}}function Ci(t){return function(e,r,n){var i=pt(e);if(!Na(e)){var o=$i(r,3);e=Es(e),r=function(t){return o(i[t],t,i)}}var a=t(e,r,n);return a>-1?i[o?e[a]:a]:void 0}}function wi(t){return zi((function(e){var r=e.length,n=r,i=Mr.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new gt(o);if(i&&!s&&"wrapper"==qi(a))var s=new Mr([],!0)}for(n=s?n:r;++n<r;){var u=qi(a=e[n]),l="wrapper"==u?Ki(a):void 0;s=l&&co(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?s[qi(l[0])].apply(s,l[3]):1==a.length&&co(a)?s[u]():s.thru(a)}return function(){var t=arguments,n=t[0];if(s&&1==t.length&&La(n))return s.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Ai(t,e,r,i,o,a,s,u,l,c){var h=128&e,f=1&e,d=2&e,p=24&e,v=512&e,_=d?void 0:Si(t);return function g(){for(var y=arguments.length,m=n(y),x=y;x--;)m[x]=arguments[x];if(p)var E=Zi(g),b=Ne(m,E);if(i&&(m=_i(m,i,o,p)),a&&(m=gi(m,a,s,p)),y-=b,p&&y<c){var T=Ge(m,E);return Ni(t,e,Ai,g.placeholder,r,m,T,u,l,c-y)}var R=f?r:this,O=d?R[t]:t;return y=m.length,u?m=yo(m,u):v&&y>1&&m.reverse(),h&&l<y&&(m.length=l),this&&this!==Vt&&this instanceof g&&(O=_||Si(O)),O.apply(R,m)}}function Pi(t,e){return function(r,n){return function(t,e,r,n){return ln(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function Mi(t,e){return function(r,n){var i;if(void 0===r&&void 0===n)return e;if(void 0!==r&&(i=r),void 0!==n){if(void 0===i)return n;"string"==typeof r||"string"==typeof n?(r=Qn(r),n=Qn(n)):(r=$n(r),n=$n(n)),i=t(r,n)}return i}}function Ii(t){return zi((function(e){return e=de(e,Me($i())),kn((function(r){var n=this;return t(e,(function(t){return oe(t,n,r)}))}))}))}function Di(t,e){var r=(e=void 0===e?" ":Qn(e)).length;if(r<2)return r?jn(e,t):e;var n=jn(e,Je(t/Ye(e)));return Be(e)?ci(Ve(n),0,t).join(""):n.slice(0,t)}function Li(t){return function(e,r,i){return i&&"number"!=typeof i&&uo(e,r,i)&&(r=i=void 0),e=ns(e),void 0===r?(r=e,e=0):r=ns(r),function(t,e,r,i){for(var o=-1,a=ar(Je((e-t)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=t,t+=r;return s}(e,r,i=void 0===i?e<r?1:-1:ns(i),t)}}function Ui(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=as(e),r=as(r)),t(e,r)}}function Ni(t,e,r,n,i,o,a,s,u,l){var c=8&e;e|=c?32:64,4&(e&=~(c?64:32))||(e&=-4);var h=[t,e,i,c?o:void 0,c?a:void 0,c?void 0:o,c?void 0:a,s,u,l],f=r.apply(void 0,h);return co(t)&&xo(f,h),f.placeholder=n,To(f,t,e)}function Fi(t){var e=dt[t];return function(t,r){if(t=as(t),(r=null==r?0:sr(is(r),292))&&nr(t)){var n=(us(t)+"e").split("e");return+((n=(us(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var ji=vr&&1/Xe(new vr([,-0]))[1]==1/0?function(t){return new vr(t)}:Qs;function ki(t){return function(e){var r=no(e);return r==v?He(e):r==m?ze(e):function(t,e){return de(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Bi(t,e,r,i,s,u,l,c){var h=2&e;if(!h&&"function"!=typeof t)throw new gt(o);var f=i?i.length:0;if(f||(e&=-97,i=s=void 0),l=void 0===l?l:ar(is(l),0),c=void 0===c?c:is(c),f-=s?s.length:0,64&e){var d=i,p=s;i=s=void 0}var v=h?void 0:Ki(t),_=[t,e,r,i,s,d,p,u,l,c];if(v&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<131,s=128==n&&8==r||128==n&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!o&&!s)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var u=e[3];if(u){var l=t[3];t[3]=l?_i(l,u,e[4]):u,t[4]=l?Ge(t[3],a):e[4]}(u=e[5])&&(l=t[5],t[5]=l?gi(l,u,e[6]):u,t[6]=l?Ge(t[5],a):e[6]);(u=e[7])&&(t[7]=u);128&n&&(t[8]=null==t[8]?e[8]:sr(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(_,v),t=_[0],e=_[1],r=_[2],i=_[3],s=_[4],!(c=_[9]=void 0===_[9]?h?0:t.length:ar(_[9]-f,0))&&24&e&&(e&=-25),e&&1!=e)g=8==e||16==e?function(t,e,r){var i=Si(t);return function o(){for(var a=arguments.length,s=n(a),u=a,l=Zi(o);u--;)s[u]=arguments[u];var c=a<3&&s[0]!==l&&s[a-1]!==l?[]:Ge(s,l);if((a-=c.length)<r)return Ni(t,e,Ai,o.placeholder,void 0,s,c,void 0,void 0,r-a);var h=this&&this!==Vt&&this instanceof o?i:t;return oe(h,this,s)}}(t,e,c):32!=e&&33!=e||s.length?Ai.apply(void 0,_):function(t,e,r,i){var o=1&e,a=Si(t);return function e(){for(var s=-1,u=arguments.length,l=-1,c=i.length,h=n(c+u),f=this&&this!==Vt&&this instanceof e?a:t;++l<c;)h[l]=i[l];for(;u--;)h[l++]=arguments[++s];return oe(f,o?r:this,h)}}(t,e,r,i);else var g=function(t,e,r){var n=1&e,i=Si(t);return function e(){var o=this&&this!==Vt&&this instanceof e?i:t;return o.apply(n?r:this,arguments)}}(t,e,r);return To((v?Gn:xo)(g,_),t,e)}function Hi(t,e,r,n){return void 0===t||Pa(t,xt[r])&&!Tt.call(n,r)?e:t}function Wi(t,e,r,n,i,o){return Xa(t)&&Xa(e)&&(o.set(e,t),Mn(t,e,void 0,Wi,o),o.delete(e)),t}function Gi(t){return Ka(t)?void 0:t}function Xi(t,e,r,n,i,o){var a=1&r,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var h=-1,f=!0,d=2&r?new Nr:void 0;for(o.set(t,e),o.set(e,t);++h<s;){var p=t[h],v=e[h];if(n)var _=a?n(v,p,h,e,t,o):n(p,v,h,t,e,o);if(void 0!==_){if(_)continue;f=!1;break}if(d){if(!ge(e,(function(t,e){if(!De(d,e)&&(p===t||i(p,t,r,n,o)))return d.push(e)}))){f=!1;break}}else if(p!==v&&!i(p,v,r,n,o)){f=!1;break}}return o.delete(t),o.delete(e),f}function zi(t){return bo(_o(t,void 0,Uo),t+"")}function Yi(t){return dn(t,Es,eo)}function Vi(t){return dn(t,bs,ro)}var Ki=yr?function(t){return yr.get(t)}:Qs;function qi(t){for(var e=t.name+"",r=mr[e],n=Tt.call(mr,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function Zi(t){return(Tt.call(wr,"placeholder")?wr:t).placeholder}function $i(){var t=wr.iteratee||Ks;return t=t===Ks?Rn:t,arguments.length?t(arguments[0],arguments[1]):t}function Qi(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function Ji(t){for(var e=Es(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,po(i)]}return e}function to(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Tn(r)?r:void 0}var eo=er?function(t){return null==t?[]:(t=pt(t),ce(er(t),(function(e){return Yt.call(t,e)})))}:ou,ro=er?function(t){for(var e=[];t;)pe(e,eo(t)),t=Wt(t);return e}:ou,no=pn;function io(t,e,r){for(var n=-1,i=(e=ui(e,t)).length,o=!1;++n<i;){var a=Co(e[n]);if(!(o=null!=t&&r(t,a)))break;t=t[a]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&Ga(i)&&so(a,i)&&(La(t)||Da(t))}function oo(t){return"function"!=typeof t.constructor||fo(t)?{}:Ar(Wt(t))}function ao(t){return La(t)||Da(t)||!!(qt&&t&&t[qt])}function so(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&ut.test(t))&&t>-1&&t%1==0&&t<e}function uo(t,e,r){if(!Xa(r))return!1;var n=typeof e;return!!("number"==n?Na(r)&&so(e,r.length):"string"==n&&e in r)&&Pa(r[e],t)}function lo(t,e){if(La(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Qa(t))||(X.test(t)||!G.test(t)||null!=e&&t in pt(e))}function co(t){var e=qi(t),r=wr[e];if("function"!=typeof r||!(e in Ir.prototype))return!1;if(t===r)return!0;var n=Ki(r);return!!n&&t===n[0]}(fr&&no(new fr(new ArrayBuffer(1)))!=R||dr&&no(new dr)!=v||pr&&"[object Promise]"!=no(pr.resolve())||vr&&no(new vr)!=m||_r&&no(new _r)!=b)&&(no=function(t){var e=pn(t),r=e==g?t.constructor:void 0,n=r?wo(r):"";if(n)switch(n){case xr:return R;case Er:return v;case br:return"[object Promise]";case Tr:return m;case Rr:return b}return e});var ho=Et?Ha:au;function fo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xt)}function po(t){return t==t&&!Xa(t)}function vo(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in pt(r)))}}function _o(t,e,r){return e=ar(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=ar(i.length-e,0),s=n(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=n(e+1);++o<e;)u[o]=i[o];return u[e]=r(s),oe(t,this,u)}}function go(t,e){return e.length<2?t:fn(t,Yn(e,0,-1))}function yo(t,e){for(var r=t.length,n=sr(e.length,r),i=yi(t);n--;){var o=e[n];t[n]=so(o,r)?i[o]:void 0}return t}function mo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var xo=Ro(Gn),Eo=Qe||function(t,e){return Vt.setTimeout(t,e)},bo=Ro(Xn);function To(t,e,r){var n=e+"";return bo(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(Z,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return se(s,(function(r){var n="_."+r[0];e&r[1]&&!he(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match($);return e?e[1].split(Q):[]}(n),r)))}function Ro(t){var e=0,r=0;return function(){var n=ur(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Oo(t,e){var r=-1,n=t.length,i=n-1;for(e=void 0===e?n:e;++r<e;){var o=Fn(r,i),a=t[o];t[o]=t[r],t[r]=a}return t.length=e,t}var So=function(t){var e=Ra(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(z,(function(t,r,n,i){e.push(n?i.replace(et,"$1"):r||t)})),e}));function Co(t){if("string"==typeof t||Qa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function wo(t){if(null!=t){try{return bt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ao(t){if(t instanceof Ir)return t.clone();var e=new Mr(t.__wrapped__,t.__chain__);return e.__actions__=yi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Po=kn((function(t,e){return Fa(t)?Jr(t,an(e,1,Fa,!0)):[]})),Mo=kn((function(t,e){var r=Bo(e);return Fa(r)&&(r=void 0),Fa(t)?Jr(t,an(e,1,Fa,!0),$i(r,2)):[]})),Io=kn((function(t,e){var r=Bo(e);return Fa(r)&&(r=void 0),Fa(t)?Jr(t,an(e,1,Fa,!0),void 0,r):[]}));function Do(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:is(r);return i<0&&(i=ar(n+i,0)),xe(t,$i(e,3),i)}function Lo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n-1;return void 0!==r&&(i=is(r),i=r<0?ar(n+i,0):sr(i,n-1)),xe(t,$i(e,3),i,!0)}function Uo(t){return(null==t?0:t.length)?an(t,1):[]}function No(t){return t&&t.length?t[0]:void 0}var Fo=kn((function(t){var e=de(t,ai);return e.length&&e[0]===t[0]?yn(e):[]})),jo=kn((function(t){var e=Bo(t),r=de(t,ai);return e===Bo(r)?e=void 0:r.pop(),r.length&&r[0]===t[0]?yn(r,$i(e,2)):[]})),ko=kn((function(t){var e=Bo(t),r=de(t,ai);return(e="function"==typeof e?e:void 0)&&r.pop(),r.length&&r[0]===t[0]?yn(r,void 0,e):[]}));function Bo(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Ho=kn(Wo);function Wo(t,e){return t&&t.length&&e&&e.length?Un(t,e):t}var Go=zi((function(t,e){var r=null==t?0:t.length,n=Kr(t,e);return Nn(t,de(e,(function(t){return so(t,r)?+t:t})).sort(vi)),n}));function Xo(t){return null==t?t:hr.call(t)}var zo=kn((function(t){return Jn(an(t,1,Fa,!0))})),Yo=kn((function(t){var e=Bo(t);return Fa(e)&&(e=void 0),Jn(an(t,1,Fa,!0),$i(e,2))})),Vo=kn((function(t){var e=Bo(t);return e="function"==typeof e?e:void 0,Jn(an(t,1,Fa,!0),void 0,e)}));function Ko(t){if(!t||!t.length)return[];var e=0;return t=ce(t,(function(t){if(Fa(t))return e=ar(t.length,e),!0})),Ae(e,(function(e){return de(t,Oe(e))}))}function qo(t,e){if(!t||!t.length)return[];var r=Ko(t);return null==e?r:de(r,(function(t){return oe(e,void 0,t)}))}var Zo=kn((function(t,e){return Fa(t)?Jr(t,e):[]})),$o=kn((function(t){return ii(ce(t,Fa))})),Qo=kn((function(t){var e=Bo(t);return Fa(e)&&(e=void 0),ii(ce(t,Fa),$i(e,2))})),Jo=kn((function(t){var e=Bo(t);return e="function"==typeof e?e:void 0,ii(ce(t,Fa),void 0,e)})),ta=kn(Ko);var ea=kn((function(t){var e=t.length,r=e>1?t[e-1]:void 0;return r="function"==typeof r?(t.pop(),r):void 0,qo(t,r)}));function ra(t){var e=wr(t);return e.__chain__=!0,e}function na(t,e){return e(t)}var ia=zi((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,i=function(e){return Kr(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Ir&&so(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:na,args:[i],thisArg:void 0}),new Mr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var oa=xi((function(t,e,r){Tt.call(t,r)?++t[r]:Vr(t,r,1)}));var aa=Ci(Do),sa=Ci(Lo);function ua(t,e){return(La(t)?se:tn)(t,$i(e,3))}function la(t,e){return(La(t)?ue:en)(t,$i(e,3))}var ca=xi((function(t,e,r){Tt.call(t,r)?t[r].push(e):Vr(t,r,[e])}));var ha=kn((function(t,e,r){var i=-1,o="function"==typeof e,a=Na(t)?n(t.length):[];return tn(t,(function(t){a[++i]=o?oe(e,t,r):mn(t,e,r)})),a})),fa=xi((function(t,e,r){Vr(t,r,e)}));function da(t,e){return(La(t)?de:wn)(t,$i(e,3))}var pa=xi((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]}));var va=kn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&uo(t,e[0],e[1])?e=[]:r>2&&uo(e[0],e[1],e[2])&&(e=[e[0]]),Dn(t,an(e,1),[])})),_a=$e||function(){return Vt.Date.now()};function ga(t,e,r){return e=r?void 0:e,Bi(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function ya(t,e){var r;if("function"!=typeof e)throw new gt(o);return t=is(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}}var ma=kn((function(t,e,r){var n=1;if(r.length){var i=Ge(r,Zi(ma));n|=32}return Bi(t,n,e,r,i)})),xa=kn((function(t,e,r){var n=3;if(r.length){var i=Ge(r,Zi(xa));n|=32}return Bi(e,n,t,r,i)}));function Ea(t,e,r){var n,i,a,s,u,l,c=0,h=!1,f=!1,d=!0;if("function"!=typeof t)throw new gt(o);function p(e){var r=n,o=i;return n=i=void 0,c=e,s=t.apply(o,r)}function v(t){return c=t,u=Eo(g,e),h?p(t):s}function _(t){var r=t-l;return void 0===l||r>=e||r<0||f&&t-c>=a}function g(){var t=_a();if(_(t))return y(t);u=Eo(g,function(t){var r=e-(t-l);return f?sr(r,a-(t-c)):r}(t))}function y(t){return u=void 0,d&&n?p(t):(n=i=void 0,s)}function m(){var t=_a(),r=_(t);if(n=arguments,i=this,l=t,r){if(void 0===u)return v(l);if(f)return hi(u),u=Eo(g,e),p(l)}return void 0===u&&(u=Eo(g,e)),s}return e=as(e)||0,Xa(r)&&(h=!!r.leading,a=(f="maxWait"in r)?ar(as(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d),m.cancel=function(){void 0!==u&&hi(u),c=0,n=l=i=u=void 0},m.flush=function(){return void 0===u?s:y(_a())},m}var ba=kn((function(t,e){return Qr(t,1,e)})),Ta=kn((function(t,e,r){return Qr(t,as(e)||0,r)}));function Ra(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new gt(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Ra.Cache||Ur),r}function Oa(t){if("function"!=typeof t)throw new gt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ra.Cache=Ur;var Sa=li((function(t,e){var r=(e=1==e.length&&La(e[0])?de(e[0],Me($i())):de(an(e,1),Me($i()))).length;return kn((function(n){for(var i=-1,o=sr(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return oe(t,this,n)}))})),Ca=kn((function(t,e){return Bi(t,32,void 0,e,Ge(e,Zi(Ca)))})),wa=kn((function(t,e){return Bi(t,64,void 0,e,Ge(e,Zi(wa)))})),Aa=zi((function(t,e){return Bi(t,256,void 0,void 0,void 0,e)}));function Pa(t,e){return t===e||t!=t&&e!=e}var Ma=Ui(vn),Ia=Ui((function(t,e){return t>=e})),Da=xn(function(){return arguments}())?xn:function(t){return za(t)&&Tt.call(t,"callee")&&!Yt.call(t,"callee")},La=n.isArray,Ua=Jt?Me(Jt):function(t){return za(t)&&pn(t)==T};function Na(t){return null!=t&&Ga(t.length)&&!Ha(t)}function Fa(t){return za(t)&&Na(t)}var ja=rr||au,ka=te?Me(te):function(t){return za(t)&&pn(t)==h};function Ba(t){if(!za(t))return!1;var e=pn(t);return e==f||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Ka(t)}function Ha(t){if(!Xa(t))return!1;var e=pn(t);return e==d||e==p||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Wa(t){return"number"==typeof t&&t==is(t)}function Ga(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Xa(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function za(t){return null!=t&&"object"==typeof t}var Ya=ee?Me(ee):function(t){return za(t)&&no(t)==v};function Va(t){return"number"==typeof t||za(t)&&pn(t)==_}function Ka(t){if(!za(t)||pn(t)!=g)return!1;var e=Wt(t);if(null===e)return!0;var r=Tt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&bt.call(r)==Ct}var qa=re?Me(re):function(t){return za(t)&&pn(t)==y};var Za=ne?Me(ne):function(t){return za(t)&&no(t)==m};function $a(t){return"string"==typeof t||!La(t)&&za(t)&&pn(t)==x}function Qa(t){return"symbol"==typeof t||za(t)&&pn(t)==E}var Ja=ie?Me(ie):function(t){return za(t)&&Ga(t.length)&&!!Bt[pn(t)]};var ts=Ui(Cn),es=Ui((function(t,e){return t<=e}));function rs(t){if(!t)return[];if(Na(t))return $a(t)?Ve(t):yi(t);if($t&&t[$t])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[$t]());var e=no(t);return(e==v?He:e==m?Xe:Ps)(t)}function ns(t){return t?(t=as(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function is(t){var e=ns(t),r=e%1;return e==e?r?e-r:e:0}function os(t){return t?qr(is(t),0,4294967295):0}function as(t){if("number"==typeof t)return t;if(Qa(t))return NaN;if(Xa(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Xa(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Pe(t);var r=ot.test(t);return r||st.test(t)?Xt(t.slice(2),r?2:8):it.test(t)?NaN:+t}function ss(t){return mi(t,bs(t))}function us(t){return null==t?"":Qn(t)}var ls=Ei((function(t,e){if(fo(e)||Na(e))mi(e,Es(e),t);else for(var r in e)Tt.call(e,r)&&Gr(t,r,e[r])})),cs=Ei((function(t,e){mi(e,bs(e),t)})),hs=Ei((function(t,e,r,n){mi(e,bs(e),t,n)})),fs=Ei((function(t,e,r,n){mi(e,Es(e),t,n)})),ds=zi(Kr);var ps=kn((function(t,e){t=pt(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&uo(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],a=bs(o),s=-1,u=a.length;++s<u;){var l=a[s],c=t[l];(void 0===c||Pa(c,xt[l])&&!Tt.call(t,l))&&(t[l]=o[l])}return t})),vs=kn((function(t){return t.push(void 0,Wi),oe(Rs,void 0,t)}));function _s(t,e,r){var n=null==t?void 0:fn(t,e);return void 0===n?r:n}function gs(t,e){return null!=t&&io(t,e,gn)}var ys=Pi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=St.call(e)),t[e]=r}),Xs(Vs)),ms=Pi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=St.call(e)),Tt.call(t,e)?t[e].push(r):t[e]=[r]}),$i),xs=kn(mn);function Es(t){return Na(t)?jr(t):On(t)}function bs(t){return Na(t)?jr(t,!0):Sn(t)}var Ts=Ei((function(t,e,r){Mn(t,e,r)})),Rs=Ei((function(t,e,r,n){Mn(t,e,r,n)})),Os=zi((function(t,e){var r={};if(null==t)return r;var n=!1;e=de(e,(function(e){return e=ui(e,t),n||(n=e.length>1),e})),mi(t,Vi(t),r),n&&(r=Zr(r,7,Gi));for(var i=e.length;i--;)ti(r,e[i]);return r}));var Ss=zi((function(t,e){return null==t?{}:function(t,e){return Ln(t,e,(function(e,r){return gs(t,r)}))}(t,e)}));function Cs(t,e){if(null==t)return{};var r=de(Vi(t),(function(t){return[t]}));return e=$i(e),Ln(t,r,(function(t,r){return e(t,r[0])}))}var ws=ki(Es),As=ki(bs);function Ps(t){return null==t?[]:Ie(t,Es(t))}var Ms=Oi((function(t,e,r){return e=e.toLowerCase(),t+(r?Is(e):e)}));function Is(t){return Bs(us(t).toLowerCase())}function Ds(t){return(t=us(t))&&t.replace(lt,Fe).replace(Dt,"")}var Ls=Oi((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Us=Oi((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Ns=Ri("toLowerCase");var Fs=Oi((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}));var js=Oi((function(t,e,r){return t+(r?" ":"")+Bs(e)}));var ks=Oi((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Bs=Ri("toUpperCase");function Hs(t,e,r){return t=us(t),void 0===(e=r?void 0:e)?function(t){return Ft.test(t)}(t)?function(t){return t.match(Ut)||[]}(t):function(t){return t.match(J)||[]}(t):t.match(e)||[]}var Ws=kn((function(t,e){try{return oe(t,void 0,e)}catch(t){return Ba(t)?t:new q(t)}})),Gs=zi((function(t,e){return se(e,(function(e){e=Co(e),Vr(t,e,ma(t[e],t))})),t}));function Xs(t){return function(){return t}}var zs=wi(),Ys=wi(!0);function Vs(t){return t}function Ks(t){return Rn("function"==typeof t?t:Zr(t,1))}var qs=kn((function(t,e){return function(r){return mn(r,t,e)}})),Zs=kn((function(t,e){return function(r){return mn(t,r,e)}}));function $s(t,e,r){var n=Es(e),i=hn(e,n);null!=r||Xa(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=hn(e,Es(e)));var o=!(Xa(r)&&"chain"in r&&!r.chain),a=Ha(t);return se(i,(function(r){var n=e[r];t[r]=n,a&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=yi(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,pe([this.value()],arguments))})})),t}function Qs(){}var Js=Ii(de),tu=Ii(le),eu=Ii(ge);function ru(t){return lo(t)?Oe(Co(t)):function(t){return function(e){return fn(e,t)}}(t)}var nu=Li(),iu=Li(!0);function ou(){return[]}function au(){return!1}var su=Mi((function(t,e){return t+e}),0),uu=Fi("ceil"),lu=Mi((function(t,e){return t/e}),1),cu=Fi("floor");var hu,fu=Mi((function(t,e){return t*e}),1),du=Fi("round"),pu=Mi((function(t,e){return t-e}),0);return wr.after=function(t,e){if("function"!=typeof e)throw new gt(o);return t=is(t),function(){if(--t<1)return e.apply(this,arguments)}},wr.ary=ga,wr.assign=ls,wr.assignIn=cs,wr.assignInWith=hs,wr.assignWith=fs,wr.at=ds,wr.before=ya,wr.bind=ma,wr.bindAll=Gs,wr.bindKey=xa,wr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return La(t)?t:[t]},wr.chain=ra,wr.chunk=function(t,e,r){e=(r?uo(t,e,r):void 0===e)?1:ar(is(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=n(Je(i/e));o<i;)s[a++]=Yn(t,o,o+=e);return s},wr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},wr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return pe(La(r)?yi(r):[r],an(e,1))},wr.cond=function(t){var e=null==t?0:t.length,r=$i();return t=e?de(t,(function(t){if("function"!=typeof t[1])throw new gt(o);return[r(t[0]),t[1]]})):[],kn((function(r){for(var n=-1;++n<e;){var i=t[n];if(oe(i[0],this,r))return oe(i[1],this,r)}}))},wr.conforms=function(t){return function(t){var e=Es(t);return function(r){return $r(r,t,e)}}(Zr(t,1))},wr.constant=Xs,wr.countBy=oa,wr.create=function(t,e){var r=Ar(t);return null==e?r:Yr(r,e)},wr.curry=function t(e,r,n){var i=Bi(e,8,void 0,void 0,void 0,void 0,void 0,r=n?void 0:r);return i.placeholder=t.placeholder,i},wr.curryRight=function t(e,r,n){var i=Bi(e,16,void 0,void 0,void 0,void 0,void 0,r=n?void 0:r);return i.placeholder=t.placeholder,i},wr.debounce=Ea,wr.defaults=ps,wr.defaultsDeep=vs,wr.defer=ba,wr.delay=Ta,wr.difference=Po,wr.differenceBy=Mo,wr.differenceWith=Io,wr.drop=function(t,e,r){var n=null==t?0:t.length;return n?Yn(t,(e=r||void 0===e?1:is(e))<0?0:e,n):[]},wr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?Yn(t,0,(e=n-(e=r||void 0===e?1:is(e)))<0?0:e):[]},wr.dropRightWhile=function(t,e){return t&&t.length?ri(t,$i(e,3),!0,!0):[]},wr.dropWhile=function(t,e){return t&&t.length?ri(t,$i(e,3),!0):[]},wr.fill=function(t,e,r,n){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&uo(t,e,r)&&(r=0,n=i),function(t,e,r,n){var i=t.length;for((r=is(r))<0&&(r=-r>i?0:i+r),(n=void 0===n||n>i?i:is(n))<0&&(n+=i),n=r>n?0:os(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},wr.filter=function(t,e){return(La(t)?ce:on)(t,$i(e,3))},wr.flatMap=function(t,e){return an(da(t,e),1)},wr.flatMapDeep=function(t,e){return an(da(t,e),1/0)},wr.flatMapDepth=function(t,e,r){return r=void 0===r?1:is(r),an(da(t,e),r)},wr.flatten=Uo,wr.flattenDeep=function(t){return(null==t?0:t.length)?an(t,1/0):[]},wr.flattenDepth=function(t,e){return(null==t?0:t.length)?an(t,e=void 0===e?1:is(e)):[]},wr.flip=function(t){return Bi(t,512)},wr.flow=zs,wr.flowRight=Ys,wr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},wr.functions=function(t){return null==t?[]:hn(t,Es(t))},wr.functionsIn=function(t){return null==t?[]:hn(t,bs(t))},wr.groupBy=ca,wr.initial=function(t){return(null==t?0:t.length)?Yn(t,0,-1):[]},wr.intersection=Fo,wr.intersectionBy=jo,wr.intersectionWith=ko,wr.invert=ys,wr.invertBy=ms,wr.invokeMap=ha,wr.iteratee=Ks,wr.keyBy=fa,wr.keys=Es,wr.keysIn=bs,wr.map=da,wr.mapKeys=function(t,e){var r={};return e=$i(e,3),ln(t,(function(t,n,i){Vr(r,e(t,n,i),t)})),r},wr.mapValues=function(t,e){var r={};return e=$i(e,3),ln(t,(function(t,n,i){Vr(r,n,e(t,n,i))})),r},wr.matches=function(t){return An(Zr(t,1))},wr.matchesProperty=function(t,e){return Pn(t,Zr(e,1))},wr.memoize=Ra,wr.merge=Ts,wr.mergeWith=Rs,wr.method=qs,wr.methodOf=Zs,wr.mixin=$s,wr.negate=Oa,wr.nthArg=function(t){return t=is(t),kn((function(e){return In(e,t)}))},wr.omit=Os,wr.omitBy=function(t,e){return Cs(t,Oa($i(e)))},wr.once=function(t){return ya(2,t)},wr.orderBy=function(t,e,r,n){return null==t?[]:(La(e)||(e=null==e?[]:[e]),La(r=n?void 0:r)||(r=null==r?[]:[r]),Dn(t,e,r))},wr.over=Js,wr.overArgs=Sa,wr.overEvery=tu,wr.overSome=eu,wr.partial=Ca,wr.partialRight=wa,wr.partition=pa,wr.pick=Ss,wr.pickBy=Cs,wr.property=ru,wr.propertyOf=function(t){return function(e){return null==t?void 0:fn(t,e)}},wr.pull=Ho,wr.pullAll=Wo,wr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Un(t,e,$i(r,2)):t},wr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Un(t,e,void 0,r):t},wr.pullAt=Go,wr.range=nu,wr.rangeRight=iu,wr.rearg=Aa,wr.reject=function(t,e){return(La(t)?ce:on)(t,Oa($i(e,3)))},wr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=$i(e,3);++n<o;){var a=t[n];e(a,n,t)&&(r.push(a),i.push(n))}return Nn(t,i),r},wr.rest=function(t,e){if("function"!=typeof t)throw new gt(o);return kn(t,e=void 0===e?e:is(e))},wr.reverse=Xo,wr.sampleSize=function(t,e,r){return e=(r?uo(t,e,r):void 0===e)?1:is(e),(La(t)?Br:Hn)(t,e)},wr.set=function(t,e,r){return null==t?t:Wn(t,e,r)},wr.setWith=function(t,e,r,n){return n="function"==typeof n?n:void 0,null==t?t:Wn(t,e,r,n)},wr.shuffle=function(t){return(La(t)?Hr:zn)(t)},wr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&uo(t,e,r)?(e=0,r=n):(e=null==e?0:is(e),r=void 0===r?n:is(r)),Yn(t,e,r)):[]},wr.sortBy=va,wr.sortedUniq=function(t){return t&&t.length?Zn(t):[]},wr.sortedUniqBy=function(t,e){return t&&t.length?Zn(t,$i(e,2)):[]},wr.split=function(t,e,r){return r&&"number"!=typeof r&&uo(t,e,r)&&(e=r=void 0),(r=void 0===r?4294967295:r>>>0)?(t=us(t))&&("string"==typeof e||null!=e&&!qa(e))&&!(e=Qn(e))&&Be(t)?ci(Ve(t),0,r):t.split(e,r):[]},wr.spread=function(t,e){if("function"!=typeof t)throw new gt(o);return e=null==e?0:ar(is(e),0),kn((function(r){var n=r[e],i=ci(r,0,e);return n&&pe(i,n),oe(t,this,i)}))},wr.tail=function(t){var e=null==t?0:t.length;return e?Yn(t,1,e):[]},wr.take=function(t,e,r){return t&&t.length?Yn(t,0,(e=r||void 0===e?1:is(e))<0?0:e):[]},wr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?Yn(t,(e=n-(e=r||void 0===e?1:is(e)))<0?0:e,n):[]},wr.takeRightWhile=function(t,e){return t&&t.length?ri(t,$i(e,3),!1,!0):[]},wr.takeWhile=function(t,e){return t&&t.length?ri(t,$i(e,3)):[]},wr.tap=function(t,e){return e(t),t},wr.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new gt(o);return Xa(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ea(t,e,{leading:n,maxWait:e,trailing:i})},wr.thru=na,wr.toArray=rs,wr.toPairs=ws,wr.toPairsIn=As,wr.toPath=function(t){return La(t)?de(t,Co):Qa(t)?[t]:yi(So(us(t)))},wr.toPlainObject=ss,wr.transform=function(t,e,r){var n=La(t),i=n||ja(t)||Ja(t);if(e=$i(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:Xa(t)&&Ha(o)?Ar(Wt(t)):{}}return(i?se:ln)(t,(function(t,n,i){return e(r,t,n,i)})),r},wr.unary=function(t){return ga(t,1)},wr.union=zo,wr.unionBy=Yo,wr.unionWith=Vo,wr.uniq=function(t){return t&&t.length?Jn(t):[]},wr.uniqBy=function(t,e){return t&&t.length?Jn(t,$i(e,2)):[]},wr.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Jn(t,void 0,e):[]},wr.unset=function(t,e){return null==t||ti(t,e)},wr.unzip=Ko,wr.unzipWith=qo,wr.update=function(t,e,r){return null==t?t:ei(t,e,si(r))},wr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:void 0,null==t?t:ei(t,e,si(r),n)},wr.values=Ps,wr.valuesIn=function(t){return null==t?[]:Ie(t,bs(t))},wr.without=Zo,wr.words=Hs,wr.wrap=function(t,e){return Ca(si(e),t)},wr.xor=$o,wr.xorBy=Qo,wr.xorWith=Jo,wr.zip=ta,wr.zipObject=function(t,e){return oi(t||[],e||[],Gr)},wr.zipObjectDeep=function(t,e){return oi(t||[],e||[],Wn)},wr.zipWith=ea,wr.entries=ws,wr.entriesIn=As,wr.extend=cs,wr.extendWith=hs,$s(wr,wr),wr.add=su,wr.attempt=Ws,wr.camelCase=Ms,wr.capitalize=Is,wr.ceil=uu,wr.clamp=function(t,e,r){return void 0===r&&(r=e,e=void 0),void 0!==r&&(r=(r=as(r))==r?r:0),void 0!==e&&(e=(e=as(e))==e?e:0),qr(as(t),e,r)},wr.clone=function(t){return Zr(t,4)},wr.cloneDeep=function(t){return Zr(t,5)},wr.cloneDeepWith=function(t,e){return Zr(t,5,e="function"==typeof e?e:void 0)},wr.cloneWith=function(t,e){return Zr(t,4,e="function"==typeof e?e:void 0)},wr.conformsTo=function(t,e){return null==e||$r(t,e,Es(e))},wr.deburr=Ds,wr.defaultTo=function(t,e){return null==t||t!=t?e:t},wr.divide=lu,wr.endsWith=function(t,e,r){t=us(t),e=Qn(e);var n=t.length,i=r=void 0===r?n:qr(is(r),0,n);return(r-=e.length)>=0&&t.slice(r,i)==e},wr.eq=Pa,wr.escape=function(t){return(t=us(t))&&k.test(t)?t.replace(F,je):t},wr.escapeRegExp=function(t){return(t=us(t))&&V.test(t)?t.replace(Y,"\\$&"):t},wr.every=function(t,e,r){var n=La(t)?le:rn;return r&&uo(t,e,r)&&(e=void 0),n(t,$i(e,3))},wr.find=aa,wr.findIndex=Do,wr.findKey=function(t,e){return me(t,$i(e,3),ln)},wr.findLast=sa,wr.findLastIndex=Lo,wr.findLastKey=function(t,e){return me(t,$i(e,3),cn)},wr.floor=cu,wr.forEach=ua,wr.forEachRight=la,wr.forIn=function(t,e){return null==t?t:sn(t,$i(e,3),bs)},wr.forInRight=function(t,e){return null==t?t:un(t,$i(e,3),bs)},wr.forOwn=function(t,e){return t&&ln(t,$i(e,3))},wr.forOwnRight=function(t,e){return t&&cn(t,$i(e,3))},wr.get=_s,wr.gt=Ma,wr.gte=Ia,wr.has=function(t,e){return null!=t&&io(t,e,_n)},wr.hasIn=gs,wr.head=No,wr.identity=Vs,wr.includes=function(t,e,r,n){t=Na(t)?t:Ps(t),r=r&&!n?is(r):0;var i=t.length;return r<0&&(r=ar(i+r,0)),$a(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Ee(t,e,r)>-1},wr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:is(r);return i<0&&(i=ar(n+i,0)),Ee(t,e,i)},wr.inRange=function(t,e,r){return e=ns(e),void 0===r?(r=e,e=0):r=ns(r),function(t,e,r){return t>=sr(e,r)&&t<ar(e,r)}(t=as(t),e,r)},wr.invoke=xs,wr.isArguments=Da,wr.isArray=La,wr.isArrayBuffer=Ua,wr.isArrayLike=Na,wr.isArrayLikeObject=Fa,wr.isBoolean=function(t){return!0===t||!1===t||za(t)&&pn(t)==c},wr.isBuffer=ja,wr.isDate=ka,wr.isElement=function(t){return za(t)&&1===t.nodeType&&!Ka(t)},wr.isEmpty=function(t){if(null==t)return!0;if(Na(t)&&(La(t)||"string"==typeof t||"function"==typeof t.splice||ja(t)||Ja(t)||Da(t)))return!t.length;var e=no(t);if(e==v||e==m)return!t.size;if(fo(t))return!On(t).length;for(var r in t)if(Tt.call(t,r))return!1;return!0},wr.isEqual=function(t,e){return En(t,e)},wr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:void 0)?r(t,e):void 0;return void 0===n?En(t,e,void 0,r):!!n},wr.isError=Ba,wr.isFinite=function(t){return"number"==typeof t&&nr(t)},wr.isFunction=Ha,wr.isInteger=Wa,wr.isLength=Ga,wr.isMap=Ya,wr.isMatch=function(t,e){return t===e||bn(t,e,Ji(e))},wr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:void 0,bn(t,e,Ji(e),r)},wr.isNaN=function(t){return Va(t)&&t!=+t},wr.isNative=function(t){if(ho(t))throw new q("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Tn(t)},wr.isNil=function(t){return null==t},wr.isNull=function(t){return null===t},wr.isNumber=Va,wr.isObject=Xa,wr.isObjectLike=za,wr.isPlainObject=Ka,wr.isRegExp=qa,wr.isSafeInteger=function(t){return Wa(t)&&t>=-9007199254740991&&t<=9007199254740991},wr.isSet=Za,wr.isString=$a,wr.isSymbol=Qa,wr.isTypedArray=Ja,wr.isUndefined=function(t){return void 0===t},wr.isWeakMap=function(t){return za(t)&&no(t)==b},wr.isWeakSet=function(t){return za(t)&&"[object WeakSet]"==pn(t)},wr.join=function(t,e){return null==t?"":ir.call(t,e)},wr.kebabCase=Ls,wr.last=Bo,wr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=n;return void 0!==r&&(i=(i=is(r))<0?ar(n+i,0):sr(i,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,i):xe(t,Te,i,!0)},wr.lowerCase=Us,wr.lowerFirst=Ns,wr.lt=ts,wr.lte=es,wr.max=function(t){return t&&t.length?nn(t,Vs,vn):void 0},wr.maxBy=function(t,e){return t&&t.length?nn(t,$i(e,2),vn):void 0},wr.mean=function(t){return Re(t,Vs)},wr.meanBy=function(t,e){return Re(t,$i(e,2))},wr.min=function(t){return t&&t.length?nn(t,Vs,Cn):void 0},wr.minBy=function(t,e){return t&&t.length?nn(t,$i(e,2),Cn):void 0},wr.stubArray=ou,wr.stubFalse=au,wr.stubObject=function(){return{}},wr.stubString=function(){return""},wr.stubTrue=function(){return!0},wr.multiply=fu,wr.nth=function(t,e){return t&&t.length?In(t,is(e)):void 0},wr.noConflict=function(){return Vt._===this&&(Vt._=wt),this},wr.noop=Qs,wr.now=_a,wr.pad=function(t,e,r){t=us(t);var n=(e=is(e))?Ye(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Di(tr(i),r)+t+Di(Je(i),r)},wr.padEnd=function(t,e,r){t=us(t);var n=(e=is(e))?Ye(t):0;return e&&n<e?t+Di(e-n,r):t},wr.padStart=function(t,e,r){t=us(t);var n=(e=is(e))?Ye(t):0;return e&&n<e?Di(e-n,r)+t:t},wr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),lr(us(t).replace(K,""),e||0)},wr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&uo(t,e,r)&&(e=r=void 0),void 0===r&&("boolean"==typeof e?(r=e,e=void 0):"boolean"==typeof t&&(r=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=ns(t),void 0===e?(e=t,t=0):e=ns(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var i=cr();return sr(t+i*(e-t+Gt("1e-"+((i+"").length-1))),e)}return Fn(t,e)},wr.reduce=function(t,e,r){var n=La(t)?ve:Ce,i=arguments.length<3;return n(t,$i(e,4),r,i,tn)},wr.reduceRight=function(t,e,r){var n=La(t)?_e:Ce,i=arguments.length<3;return n(t,$i(e,4),r,i,en)},wr.repeat=function(t,e,r){return e=(r?uo(t,e,r):void 0===e)?1:is(e),jn(us(t),e)},wr.replace=function(){var t=arguments,e=us(t[0]);return t.length<3?e:e.replace(t[1],t[2])},wr.result=function(t,e,r){var n=-1,i=(e=ui(e,t)).length;for(i||(i=1,t=void 0);++n<i;){var o=null==t?void 0:t[Co(e[n])];void 0===o&&(n=i,o=r),t=Ha(o)?o.call(t):o}return t},wr.round=du,wr.runInContext=t,wr.sample=function(t){return(La(t)?kr:Bn)(t)},wr.size=function(t){if(null==t)return 0;if(Na(t))return $a(t)?Ye(t):t.length;var e=no(t);return e==v||e==m?t.size:On(t).length},wr.snakeCase=Fs,wr.some=function(t,e,r){var n=La(t)?ge:Vn;return r&&uo(t,e,r)&&(e=void 0),n(t,$i(e,3))},wr.sortedIndex=function(t,e){return Kn(t,e)},wr.sortedIndexBy=function(t,e,r){return qn(t,e,$i(r,2))},wr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=Kn(t,e);if(n<r&&Pa(t[n],e))return n}return-1},wr.sortedLastIndex=function(t,e){return Kn(t,e,!0)},wr.sortedLastIndexBy=function(t,e,r){return qn(t,e,$i(r,2),!0)},wr.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var r=Kn(t,e,!0)-1;if(Pa(t[r],e))return r}return-1},wr.startCase=js,wr.startsWith=function(t,e,r){return t=us(t),r=null==r?0:qr(is(r),0,t.length),e=Qn(e),t.slice(r,r+e.length)==e},wr.subtract=pu,wr.sum=function(t){return t&&t.length?we(t,Vs):0},wr.sumBy=function(t,e){return t&&t.length?we(t,$i(e,2)):0},wr.template=function(t,e,r){var n=wr.templateSettings;r&&uo(t,e,r)&&(e=void 0),t=us(t),e=hs({},e,n,Hi);var i,o,a=hs({},e.imports,n.imports,Hi),s=Es(a),u=Ie(a,s),l=0,c=e.interpolate||ct,h="__p += '",f=vt((e.escape||ct).source+"|"+c.source+"|"+(c===W?rt:ct).source+"|"+(e.evaluate||ct).source+"|$","g"),d="//# sourceURL="+(Tt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++kt+"]")+"\n";t.replace(f,(function(e,r,n,a,s,u){return n||(n=a),h+=t.slice(l,u).replace(ht,ke),r&&(i=!0,h+="' +\n__e("+r+") +\n'"),s&&(o=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),h+="';\n";var p=Tt.call(e,"variable")&&e.variable;if(p){if(tt.test(p))throw new q("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(D,""):h).replace(L,"$1").replace(U,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=Ws((function(){return ft(s,d+"return "+h).apply(void 0,u)}));if(v.source=h,Ba(v))throw v;return v},wr.times=function(t,e){if((t=is(t))<1||t>9007199254740991)return[];var r=4294967295,n=sr(t,4294967295);t-=4294967295;for(var i=Ae(n,e=$i(e));++r<t;)e(r);return i},wr.toFinite=ns,wr.toInteger=is,wr.toLength=os,wr.toLower=function(t){return us(t).toLowerCase()},wr.toNumber=as,wr.toSafeInteger=function(t){return t?qr(is(t),-9007199254740991,9007199254740991):0===t?t:0},wr.toString=us,wr.toUpper=function(t){return us(t).toUpperCase()},wr.trim=function(t,e,r){if((t=us(t))&&(r||void 0===e))return Pe(t);if(!t||!(e=Qn(e)))return t;var n=Ve(t),i=Ve(e);return ci(n,Le(n,i),Ue(n,i)+1).join("")},wr.trimEnd=function(t,e,r){if((t=us(t))&&(r||void 0===e))return t.slice(0,Ke(t)+1);if(!t||!(e=Qn(e)))return t;var n=Ve(t);return ci(n,0,Ue(n,Ve(e))+1).join("")},wr.trimStart=function(t,e,r){if((t=us(t))&&(r||void 0===e))return t.replace(K,"");if(!t||!(e=Qn(e)))return t;var n=Ve(t);return ci(n,Le(n,Ve(e))).join("")},wr.truncate=function(t,e){var r=30,n="...";if(Xa(e)){var i="separator"in e?e.separator:i;r="length"in e?is(e.length):r,n="omission"in e?Qn(e.omission):n}var o=(t=us(t)).length;if(Be(t)){var a=Ve(t);o=a.length}if(r>=o)return t;var s=r-Ye(n);if(s<1)return n;var u=a?ci(a,0,s).join(""):t.slice(0,s);if(void 0===i)return u+n;if(a&&(s+=u.length-s),qa(i)){if(t.slice(s).search(i)){var l,c=u;for(i.global||(i=vt(i.source,us(nt.exec(i))+"g")),i.lastIndex=0;l=i.exec(c);)var h=l.index;u=u.slice(0,void 0===h?s:h)}}else if(t.indexOf(Qn(i),s)!=s){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+n},wr.unescape=function(t){return(t=us(t))&&j.test(t)?t.replace(N,qe):t},wr.uniqueId=function(t){var e=++Rt;return us(t)+e},wr.upperCase=ks,wr.upperFirst=Bs,wr.each=ua,wr.eachRight=la,wr.first=No,$s(wr,(hu={},ln(wr,(function(t,e){Tt.call(wr.prototype,e)||(hu[e]=t)})),hu),{chain:!1}),wr.VERSION="4.17.21",se(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){wr[t].placeholder=wr})),se(["drop","take"],(function(t,e){Ir.prototype[t]=function(r){r=void 0===r?1:ar(is(r),0);var n=this.__filtered__&&!e?new Ir(this):this.clone();return n.__filtered__?n.__takeCount__=sr(r,n.__takeCount__):n.__views__.push({size:sr(r,4294967295),type:t+(n.__dir__<0?"Right":"")}),n},Ir.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),se(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Ir.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:$i(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),se(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Ir.prototype[t]=function(){return this[r](1).value()[0]}})),se(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Ir.prototype[t]=function(){return this.__filtered__?new Ir(this):this[r](1)}})),Ir.prototype.compact=function(){return this.filter(Vs)},Ir.prototype.find=function(t){return this.filter(t).head()},Ir.prototype.findLast=function(t){return this.reverse().find(t)},Ir.prototype.invokeMap=kn((function(t,e){return"function"==typeof t?new Ir(this):this.map((function(r){return mn(r,t,e)}))})),Ir.prototype.reject=function(t){return this.filter(Oa($i(t)))},Ir.prototype.slice=function(t,e){t=is(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Ir(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),void 0!==e&&(r=(e=is(e))<0?r.dropRight(-e):r.take(e-t)),r)},Ir.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ir.prototype.toArray=function(){return this.take(4294967295)},ln(Ir.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),i=wr[n?"take"+("last"==e?"Right":""):e],o=n||/^find/.test(e);i&&(wr.prototype[e]=function(){var e=this.__wrapped__,a=n?[1]:arguments,s=e instanceof Ir,u=a[0],l=s||La(e),c=function(t){var e=i.apply(wr,pe([t],a));return n&&h?e[0]:e};l&&r&&"function"==typeof u&&1!=u.length&&(s=l=!1);var h=this.__chain__,f=!!this.__actions__.length,d=o&&!h,p=s&&!f;if(!o&&l){e=p?e:new Ir(this);var v=t.apply(e,a);return v.__actions__.push({func:na,args:[c],thisArg:void 0}),new Mr(v,h)}return d&&p?t.apply(this,a):(v=this.thru(c),d?n?v.value()[0]:v.value():v)})})),se(["pop","push","shift","sort","splice","unshift"],(function(t){var e=yt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);wr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(La(i)?i:[],t)}return this[r]((function(r){return e.apply(La(r)?r:[],t)}))}})),ln(Ir.prototype,(function(t,e){var r=wr[e];if(r){var n=r.name+"";Tt.call(mr,n)||(mr[n]=[]),mr[n].push({name:e,func:r})}})),mr[Ai(void 0,2).name]=[{name:"wrapper",func:void 0}],Ir.prototype.clone=function(){var t=new Ir(this.__wrapped__);return t.__actions__=yi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=yi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=yi(this.__views__),t},Ir.prototype.reverse=function(){if(this.__filtered__){var t=new Ir(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ir.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=La(t),n=e<0,i=r?t.length:0,o=function(t,e,r){var n=-1,i=r.length;for(;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=sr(e,t+a);break;case"takeRight":t=ar(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=n?s:a-1,c=this.__iteratees__,h=c.length,f=0,d=sr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return ni(t,this.__actions__);var p=[];t:for(;u--&&f<d;){for(var v=-1,_=t[l+=e];++v<h;){var g=c[v],y=g.iteratee,m=g.type,x=y(_);if(2==m)_=x;else if(!x){if(1==m)continue t;break t}}p[f++]=_}return p},wr.prototype.at=ia,wr.prototype.chain=function(){return ra(this)},wr.prototype.commit=function(){return new Mr(this.value(),this.__chain__)},wr.prototype.next=function(){void 0===this.__values__&&(this.__values__=rs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},wr.prototype.plant=function(t){for(var e,r=this;r instanceof Pr;){var n=Ao(r);n.__index__=0,n.__values__=void 0,e?i.__wrapped__=n:e=n;var i=n;r=r.__wrapped__}return i.__wrapped__=t,e},wr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ir){var e=t;return this.__actions__.length&&(e=new Ir(this)),(e=e.reverse()).__actions__.push({func:na,args:[Xo],thisArg:void 0}),new Mr(e,this.__chain__)}return this.thru(Xo)},wr.prototype.toJSON=wr.prototype.valueOf=wr.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},wr.prototype.first=wr.prototype.head,$t&&(wr.prototype[$t]=function(){return this}),wr}();Vt._=Ze,void 0===(i=function(){return Ze}.call(e,r,e,n))||(n.exports=i)}).call(this)}).call(this,r(19),r(56)(t))},function(t,e,r){(function(t){function r(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}e.resolve=function(){for(var e="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,i="/"===a.charAt(0))}return(i?"/":"")+(e=r(n(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var o=e.isAbsolute(t),a="/"===i(t,-1);return(t=r(n(t.split("/"),(function(t){return!!t})),!o).join("/"))||o||(t="."),t&&a&&(t+="/"),(o?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(n(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,r){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var i=n(t.split("/")),o=n(r.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u<a;u++)if(i[u]!==o[u]){s=u;break}var l=[];for(u=s;u<i.length;u++)l.push("..");return(l=l.concat(o.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,i=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},e.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){r=e+1;break}}else-1===n&&(i=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,i=!0,o=0,a=t.length-1;a>=0;--a){var s=t.charCodeAt(a);if(47!==s)-1===n&&(i=!1,n=a+1),46===s?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){r=a+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===r+1?"":t.slice(e,n)};var i="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,r(129))},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=h(r(12)),o=h(r(57)),a=h(r(58)),s=h(r(11)),u=r(6),l=r(4),c=h(r(5));function h(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(r,n,i,o,a,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var l=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));if(l.noFrame=!1,n||(l.noFrame=!0,n=new u.Rectangle(0,0,1,1)),r instanceof e&&(r=r.baseTexture),l.baseTexture=r,l._frame=n,l.trim=o,l.valid=!1,l.requiresUpdate=!1,l._uvs=null,l.orig=i||n,l._rotate=Number(a||0),!0===a)l._rotate=2;else if(l._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return r.hasLoaded?(l.noFrame&&(n=new u.Rectangle(0,0,r.width,r.height),r.on("update",l.onBaseTextureUpdated,l)),l.frame=n):r.once("loaded",l.onBaseTextureLoaded,l),l.defaultAnchor=s?new u.Point(s.x,s.y):new u.Point(0,0),l._updateID=0,l.transform=null,l.textureCacheIds=[],l}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.update=function(){this.baseTexture.update()},e.prototype.onBaseTextureLoaded=function(t){this._updateID++,this.noFrame?this.frame=new u.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},e.prototype.onBaseTextureUpdated=function(t){this._updateID++,this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},e.prototype.destroy=function(t){this.baseTexture&&(t&&(l.TextureCache[this.baseTexture.imageUrl]&&e.removeFromCache(this.baseTexture.imageUrl),this.baseTexture.destroy()),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){return new e(this.baseTexture,this.frame,this.orig,this.trim,this.rotate,this.defaultAnchor)},e.prototype._updateUvs=function(){this._uvs||(this._uvs=new a.default),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.fromImage=function(t,r,n,o){var a=l.TextureCache[t];return a||(a=new e(i.default.fromImage(t,r,n,o)),e.addToCache(a,t)),a},e.fromFrame=function(t){var e=l.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},e.fromCanvas=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";return new e(i.default.fromCanvas(t,r,n))},e.fromVideo=function(t,r,n,i){return"string"==typeof t?e.fromVideoUrl(t,r,n,i):new e(o.default.fromVideo(t,r,i))},e.fromVideoUrl=function(t,r,n,i){return new e(o.default.fromUrl(t,r,n,i))},e.from=function(t){if("string"==typeof t){var r=l.TextureCache[t];return r||(null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/)?e.fromVideoUrl(t):e.fromImage(t))}return t instanceof HTMLImageElement?new e(i.default.from(t)):t instanceof HTMLCanvasElement?e.fromCanvas(t,c.default.SCALE_MODE,"HTMLCanvasElement"):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof i.default?new e(t):t},e.fromLoader=function(t,r,n){var o=new i.default(t,void 0,(0,l.getResolutionOfUrl)(r)),a=new e(o);return o.imageUrl=r,n||(n=r),i.default.addToCache(a.baseTexture,n),e.addToCache(a,n),n!==r&&(i.default.addToCache(a.baseTexture,r),e.addToCache(a,r)),a},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),l.TextureCache[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),l.TextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=l.TextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete l.TextureCache[t],e}}else if(t&&t.textureCacheIds){for(var n=0;n<t.textureCacheIds.length;++n)l.TextureCache[t.textureCacheIds[n]]===t&&delete l.TextureCache[t.textureCacheIds[n]];return t.textureCacheIds.length=0,t}return null},n(e,[{key:"frame",get:function(){return this._frame},set:function(t){this._frame=t,this.noFrame=!1;var e=t.x,r=t.y,n=t.width,i=t.height,o=e+n>this.baseTexture.width,a=r+i>this.baseTexture.height;if(o||a){var s=o&&a?"and":"or",u="X: "+e+" + "+n+" = "+(e+n)+" > "+this.baseTexture.width,l="Y: "+r+" + "+i+" = "+(r+i)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+u+" "+s+" "+l)}this.valid=n&&i&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs()}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig.width}},{key:"height",get:function(){return this.orig.height}}]),e}(s.default);function d(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}e.default=f,f.EMPTY=new f(new i.default),d(f.EMPTY),d(f.EMPTY.baseTexture),f.WHITE=function(){var t=document.createElement("canvas");t.width=10,t.height=10;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,10,10),new f(new i.default(t))}(),d(f.WHITE),d(f.WHITE.baseTexture)},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function s(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),s.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},s.prototype.listeners=function(t,e){var r=i?i+t:t,n=this._events[r];if(e)return!!n;if(!n)return[];if(n.fn)return[n.fn];for(var o=0,a=n.length,s=new Array(a);o<a;o++)s[o]=n[o].fn;return s},s.prototype.emit=function(t,e,r,n,o,a){var s=i?i+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,n),!0;case 5:return c.fn.call(c.context,e,r,n,o),!0;case 6:return c.fn.call(c.context,e,r,n,o,a),!0}for(l=1,u=new Array(h-1);l<h;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,r);break;case 4:c[l].fn.call(c[l].context,e,r,n);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(t,e,r){var n=new a(e,r||this),o=i?i+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],n]:this._events[o].push(n):(this._events[o]=n,this._eventsCount++),this},s.prototype.once=function(t,e,r){var n=new a(e,r||this,!0),o=i?i+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],n]:this._events[o].push(n):(this._events[o]=n,this._eventsCount++),this},s.prototype.removeListener=function(t,e,r,n){var a=i?i+t:t;if(!this._events[a])return this;if(!e)return 0==--this._eventsCount?this._events=new o:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==e||n&&!s.once||r&&s.context!==r||(0==--this._eventsCount?this._events=new o:delete this._events[a]);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==e||n&&!s[u].once||r&&s[u].context!==r)&&l.push(s[u]);l.length?this._events[a]=1===l.length?l[0]:l:0==--this._eventsCount?this._events=new o:delete this._events[a]}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new o:delete this._events[e])):(this._events=new o,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=i,s.EventEmitter=s,t.exports=s},function(t,e,r){"use strict";e.__esModule=!0;var n=r(4),i=u(r(5)),o=u(r(11)),a=u(r(54)),s=u(r(34));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(r,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return s.uid=(0,n.uid)(),s.touched=0,s.resolution=a||i.default.RESOLUTION,s.width=100,s.height=100,s.realWidth=100,s.realHeight=100,s.scaleMode=void 0!==o?o:i.default.SCALE_MODE,s.hasLoaded=!1,s.isLoading=!1,s.source=null,s.origSource=null,s.imageType=null,s.sourceScale=1,s.premultipliedAlpha=!0,s.imageUrl=null,s.isPowerOfTwo=!1,s.mipmap=i.default.MIPMAP_TEXTURES,s.wrapMode=i.default.WRAP_MODE,s._glTextures={},s._enabled=0,s._virtalBoundId=-1,s._destroyed=!1,s.textureCacheIds=[],r&&s.loadSource(r),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.update=function(){"svg"!==this.imageType&&(this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this._updateDimensions()),this.emit("update",this)},e.prototype._updateDimensions=function(){this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=s.default.isPow2(this.realWidth)&&s.default.isPow2(this.realHeight)},e.prototype.loadSource=function(t){var e=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null);var r=!this.source;if(this.source=t,(t.src&&t.complete||t.getContext)&&t.width&&t.height)this._updateImageType(),"svg"===this.imageType?this._loadSvgSource():this._sourceLoaded(),r&&this.emit("loaded",this);else if(!t.getContext){this.isLoading=!0;var n=this;if(t.onload=function(){n._updateImageType(),t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n._sourceLoaded(),"svg"!==n.imageType?n.emit("loaded",n):n._loadSvgSource())},t.onerror=function(){t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n.emit("error",n))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===n.imageType)return void n._loadSvgSource();this.isLoading=!1,t.width&&t.height?(this._sourceLoaded(),e&&this.emit("loaded",this)):e&&this.emit("error",this)}}},e.prototype._updateImageType=function(){if(this.imageUrl){var t=(0,n.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var r=t.subType.split("+")[0];if(!(e=(0,n.getUrlFileExtension)("."+r)))throw new Error("Invalid image type in data URI.")}else(e=(0,n.getUrlFileExtension)(this.imageUrl))||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function(){if("svg"===this.imageType){var t=(0,n.decomposeDataUri)(this.imageUrl);t?this._loadSvgSourceUsingDataUri(t):this._loadSvgSourceUsingXhr()}},e.prototype._loadSvgSourceUsingDataUri=function(t){var e=void 0;if("base64"===t.encoding){if(!atob)throw new Error("Your browser doesn't support base64 conversions.");e=atob(t.data)}else e=t.data;this._loadSvgSourceUsingString(e)},e.prototype._loadSvgSourceUsingXhr=function(){var t=this,e=new XMLHttpRequest;e.onload=function(){if(e.readyState!==e.DONE||200!==e.status)throw new Error("Failed to load SVG using XHR.");t._loadSvgSourceUsingString(e.response)},e.onerror=function(){return t.emit("error",t)},e.open("GET",this.imageUrl,!0),e.send()},e.prototype._loadSvgSourceUsingString=function(t){var r=(0,n.getSvgSize)(t),i=r.width,o=r.height;if(!i||!o)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(i*this.sourceScale),this.realHeight=Math.round(o*this.sourceScale),this._updateDimensions();var a=document.createElement("canvas");a.width=this.realWidth,a.height=this.realHeight,a._pixiId="canvas_"+(0,n.uid)(),a.getContext("2d").drawImage(this.source,0,0,i,o,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=a,e.addToCache(this,a._pixiId),this.isLoading=!1,this._sourceLoaded(),this.emit("loaded",this)},e.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},e.prototype.destroy=function(){this.imageUrl&&(delete n.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source=null,this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this._destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},e.fromImage=function(t,r,i,o){var s=n.BaseTextureCache[t];if(!s){var u=new Image;void 0===r&&0!==t.indexOf("data:")?u.crossOrigin=(0,a.default)(t):r&&(u.crossOrigin="string"==typeof r?r:"anonymous"),(s=new e(u,i)).imageUrl=t,o&&(s.sourceScale=o),s.resolution=(0,n.getResolutionOfUrl)(t),u.src=t,e.addToCache(s,t)}return s},e.fromCanvas=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";t._pixiId||(t._pixiId=i+"_"+(0,n.uid)());var o=n.BaseTextureCache[t._pixiId];return o||(o=new e(t,r),e.addToCache(o,t._pixiId)),o},e.from=function(t,r,i){if("string"==typeof t)return e.fromImage(t,void 0,r,i);if(t instanceof HTMLImageElement){var o=t.src,a=n.BaseTextureCache[o];return a||((a=new e(t,r)).imageUrl=o,i&&(a.sourceScale=i),a.resolution=(0,n.getResolutionOfUrl)(o),e.addToCache(a,o)),a}return t instanceof HTMLCanvasElement?e.fromCanvas(t,r):t},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),n.BaseTextureCache[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),n.BaseTextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=n.BaseTextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete n.BaseTextureCache[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)delete n.BaseTextureCache[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},e}(o.default);e.default=l},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(4),a=r(51);var s=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.children=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onChildrenChange=function(){},e.prototype.addChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r<e;r++)this.addChild(arguments[r]);else t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),t.emit("added",this);return t},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),t},e.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),n=this.getChildIndex(e);this.children[r]=e,this.children[n]=t,this.onChildrenChange(r<n?r:n)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(t);(0,o.removeItems)(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r<e;r++)this.removeChild(arguments[r]);else{var n=this.children.indexOf(t);if(-1===n)return null;t.parent=null,t.transform._parentID=-1,(0,o.removeItems)(this.children,n,1),this._boundsID++,this.onChildrenChange(n),t.emit("removed",this)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,(0,o.removeItems)(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),e},e.prototype.removeChildren=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],r=t,n="number"==typeof e?e:this.children.length,i=n-r,o=void 0;if(i>0&&i<=n){o=this.children.splice(r,i);for(var a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(var s=0;s<o.length;++s)o[s].emit("removed",this);return o}if(0===i&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var r=this.children[t];r.visible&&r.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];e.visible&&e.renderable&&(e.calculateBounds(),e._mask?(e._mask.calculateBounds(),this._bounds.addBoundsMask(e._bounds,e._mask._bounds)):e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds))}this._lastBoundsID=this._boundsID},e.prototype._calculateBounds=function(){},e.prototype.renderWebGL=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvancedWebGL(t);else{this._renderWebGL(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderWebGL(t)}},e.prototype.renderAdvancedWebGL=function(t){t.flush();var e=this._filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var n=0;n<e.length;n++)e[n].enabled&&this._enabledFilters.push(e[n]);this._enabledFilters.length&&t.filterManager.pushFilter(this,this._enabledFilters)}r&&t.maskManager.pushMask(this,this._mask),this._renderWebGL(t);for(var i=0,o=this.children.length;i<o;i++)this.children[i].renderWebGL(t);t.flush(),r&&t.maskManager.popMask(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filterManager.popFilter()},e.prototype._renderWebGL=function(t){},e.prototype._renderCanvas=function(t){},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable){this._mask&&t.maskManager.pushMask(this._mask),this._renderCanvas(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderCanvas(t);this._mask&&t.maskManager.popMask(t)}},e.prototype.destroy=function(e){t.prototype.destroy.call(this);var r="boolean"==typeof e?e:e&&e.children,n=this.removeChildren(0,this.children.length);if(r)for(var i=0;i<n.length;++i)n[i].destroy(e)},i(e,[{key:"width",get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t}},{key:"height",get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t}}]),e}(((n=a)&&n.__esModule?n:{default:n}).default);e.default=s,s.prototype.containerUpdateTransform=s.prototype.updateTransform},function(t,e,r){"use strict";e.__esModule=!0;var n=c(r(59)),i=c(r(124)),o=c(r(61)),a=c(r(125)),s=r(4),u=r(2),l=c(r(5));function c(t){return t&&t.__esModule?t:{default:t}}var h=function(t){function e(r,n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"Canvas",r,n,o));return s.type=u.RENDERER_TYPE.CANVAS,s.rootContext=s.view.getContext("2d",{alpha:s.transparent}),s.context=s.rootContext,s.refresh=!0,s.maskManager=new i.default(s),s.smoothProperty="imageSmoothingEnabled",s.rootContext.imageSmoothingEnabled||(s.rootContext.webkitImageSmoothingEnabled?s.smoothProperty="webkitImageSmoothingEnabled":s.rootContext.mozImageSmoothingEnabled?s.smoothProperty="mozImageSmoothingEnabled":s.rootContext.oImageSmoothingEnabled?s.smoothProperty="oImageSmoothingEnabled":s.rootContext.msImageSmoothingEnabled&&(s.smoothProperty="msImageSmoothingEnabled")),s.initPlugins(),s.blendModes=(0,a.default)(),s._activeBlendMode=null,s.renderingToScreen=!1,s.resize(s.options.width,s.options.height),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.render=function(t,e,r,n,i){if(this.view){this.renderingToScreen=!e,this.emit("prerender");var a=this.resolution;e?((e=e.baseTexture||e)._canvasRenderTarget||(e._canvasRenderTarget=new o.default(e.width,e.height,e.resolution),e.source=e._canvasRenderTarget.canvas,e.valid=!0),this.context=e._canvasRenderTarget.context,this.resolution=e._canvasRenderTarget.resolution):this.context=this.rootContext;var s=this.context;if(e||(this._lastObjectRendered=t),!i){var l=t.parent,c=this._tempDisplayObjectParent.transform.worldTransform;n?(n.copy(c),this._tempDisplayObjectParent.transform._worldID=-1):c.identity(),t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=l}s.save(),s.setTransform(1,0,0,1,0,0),s.globalAlpha=1,this._activeBlendMode=u.BLEND_MODES.NORMAL,s.globalCompositeOperation=this.blendModes[u.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(s.fillStyle="black",s.clear()),(void 0!==r?r:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?s.clearRect(0,0,this.width,this.height):(s.fillStyle=this._backgroundColorString,s.fillRect(0,0,this.width,this.height)));var h=this.context;this.context=s,t.renderCanvas(this),this.context=h,s.restore(),this.resolution=a,this.emit("postrender")}},e.prototype.clear=function(t){var e=this.context;t=t||this._backgroundColorString,!this.transparent&&t?(e.fillStyle=t,e.fillRect(0,0,this.width,this.height)):e.clearRect(0,0,this.width,this.height)},e.prototype.setBlendMode=function(t){this._activeBlendMode!==t&&(this._activeBlendMode=t,this.context.globalCompositeOperation=this.blendModes[t])},e.prototype.destroy=function(e){this.destroyPlugins(),t.prototype.destroy.call(this,e),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this.smoothProperty&&(this.rootContext[this.smoothProperty]=l.default.SCALE_MODE===u.SCALE_MODES.LINEAR)},e.prototype.invalidateBlendMode=function(){this._activeBlendMode=this.blendModes.indexOf(this.context.globalCompositeOperation)},e}(n.default);e.default=h,s.pluginTarget.mixin(h)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.renderer.on("context",this.onContextChange,this)}return t.prototype.onContextChange=function(){},t.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null},t}();e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(7),o=r(5),a=(n=o)&&n.__esModule?n:{default:n};function s(t,e){if(t instanceof Array){if("precision"!==t[0].substring(0,9)){var r=t.slice(0);return r.unshift("precision "+e+" float;"),r}}else if("precision"!==t.trim().substring(0,9))return"precision "+e+" float;\n"+t;return t}var u=function(t){function e(r,n,i,o,u){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,s(n,u||a.default.PRECISION_VERTEX),s(i,u||a.default.PRECISION_FRAGMENT),void 0,o))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.GLShader);e.default=u},function(t,e,r){"use strict";var n=r(178).Loader,i=r(38).Resource,o=r(86),a=r(87);n.Resource=i,n.async=o,n.encodeBinary=a,n.base64=a,t.exports=n,t.exports.Loader=n,t.exports.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),a=r(10),s=(n=a)&&n.__esModule?n:{default:n};var u=new o.Point,l=new o.Polygon,c=function(t){function e(r,n,i,a,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var l=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return l._texture=r||s.default.EMPTY,l.uvs=i||new Float32Array([0,0,1,0,1,1,0,1]),l.vertices=n||new Float32Array([0,0,100,0,100,100,0,100]),l.indices=a||new Uint16Array([0,1,3,2]),l.dirty=0,l.indexDirty=0,l.vertexDirty=0,l.autoUpdate=!0,l.blendMode=o.BLEND_MODES.NORMAL,l.canvasPadding=o.settings.MESH_CANVAS_PADDING,l.drawMode=u||e.DRAW_MODES.TRIANGLE_MESH,l.shader=null,l.tintRgb=new Float32Array([1,1,1]),l._glDatas={},l._uvTransform=new o.TextureMatrix(l._texture),l.uploadUvTransform=!1,l.pluginName="mesh",l}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._renderWebGL=function(t){this.refresh(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){this.refresh(),t.plugins[this.pluginName].render(this)},e.prototype._onTextureUpdate=function(){this._uvTransform.texture=this._texture,this.refresh()},e.prototype.multiplyUvs=function(){this.uploadUvTransform||this._uvTransform.multiplyUvs(this.uvs)},e.prototype.refresh=function(t){this.autoUpdate&&this.vertexDirty++,this._uvTransform.update(t)&&this._refresh()},e.prototype._refresh=function(){},e.prototype._calculateBounds=function(){this._bounds.addVertices(this.transform,this.vertices,0,this.vertices.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,u);for(var r=this.vertices,n=l.points,i=this.indices,o=this.indices.length,a=this.drawMode===e.DRAW_MODES.TRIANGLES?3:1,s=0;s+2<o;s+=a){var c=2*i[s],h=2*i[s+1],f=2*i[s+2];if(n[0]=r[c],n[1]=r[c+1],n[2]=r[h],n[3]=r[h+1],n[4]=r[f],n[5]=r[f+1],l.contains(u.x,u.y))return!0}return!1},e.prototype.destroy=function(e){for(var r in this._glDatas){var n=this._glDatas[r];n.destroy?n.destroy():(n.vertexBuffer&&(n.vertexBuffer.destroy(),n.vertexBuffer=null),n.indexBuffer&&(n.indexBuffer.destroy(),n.indexBuffer=null),n.uvBuffer&&(n.uvBuffer.destroy(),n.uvBuffer=null),n.vao&&(n.vao.destroy(),n.vao=null))}this._glDatas=null,t.prototype.destroy.call(this,e)},i(e,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}},{key:"tint",get:function(){return o.utils.rgb2hex(this.tintRgb)},set:function(t){this.tintRgb=o.utils.hex2rgb(t,this.tintRgb)}}]),e}(o.Container);e.default=c,c.DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(4),o=r(62);var a={getTintedTexture:function(t,e){var r=t._texture,n="#"+("00000"+(0|(e=a.roundColor(e))).toString(16)).substr(-6);r.tintCache=r.tintCache||{};var i=r.tintCache[n],o=void 0;if(i){if(i.tintId===r._updateID)return r.tintCache[n];o=r.tintCache[n]}else o=a.canvas||document.createElement("canvas");if(a.tintMethod(r,e,o),o.tintId=r._updateID,a.convertTintToImage){var s=new Image;s.src=o.toDataURL(),r.tintCache[n]=s}else r.tintCache[n]=o,a.canvas=null;return o},tintWithMultiply:function(t,e,r){var n=r.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,r.width=Math.ceil(i.width),r.height=Math.ceil(i.height),n.save(),n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,i.width,i.height),n.globalCompositeOperation="multiply",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.restore()},tintWithOverlay:function(t,e,r){var n=r.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,r.width=Math.ceil(i.width),r.height=Math.ceil(i.height),n.save(),n.globalCompositeOperation="copy",n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,i.width,i.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.restore()},tintWithPerPixel:function(t,e,r){var n=r.getContext("2d"),o=t._frame.clone(),a=t.baseTexture.resolution;o.x*=a,o.y*=a,o.width*=a,o.height*=a,r.width=Math.ceil(o.width),r.height=Math.ceil(o.height),n.save(),n.globalCompositeOperation="copy",n.drawImage(t.baseTexture.source,o.x,o.y,o.width,o.height,0,0,o.width,o.height),n.restore();for(var s=(0,i.hex2rgb)(e),u=s[0],l=s[1],c=s[2],h=n.getImageData(0,0,o.width,o.height),f=h.data,d=0;d<f.length;d+=4)f[d+0]*=u,f[d+1]*=l,f[d+2]*=c;n.putImageData(h,0,0)},roundColor:function(t){var e=a.cacheStepsPerColorChannel,r=(0,i.hex2rgb)(t);return r[0]=Math.min(255,r[0]/e*e),r[1]=Math.min(255,r[1]/e*e),r[2]=Math.min(255,r[2]/e*e),(0,i.rgb2hex)(r)},cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:(0,((n=o)&&n.__esModule?n:{default:n}).default)(),tintMethod:0};a.tintMethod=a.canUseMultiply?a.tintWithMultiply:a.tintWithPerPixel,e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(15);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){return o(this,e),a(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.flush=function(){},e.prototype.render=function(t){},e}(((n=i)&&n.__esModule?n:{default:n}).default);e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n=y(r(59)),i=y(r(127)),o=y(r(130)),a=y(r(131)),s=y(r(23)),u=y(r(21)),l=y(r(133)),c=y(r(12)),h=y(r(134)),f=y(r(135)),d=y(r(137)),p=y(r(138)),v=r(4),_=y(r(7)),g=r(2);function y(t){return t&&t.__esModule?t:{default:t}}var m=0,x=function(t){function e(r,n,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"WebGL",r,n,a));return s.legacy=s.options.legacy,s.legacy&&(_.default.VertexArrayObject.FORCE_NATIVE=!0),s.type=g.RENDERER_TYPE.WEBGL,s.handleContextLost=s.handleContextLost.bind(s),s.handleContextRestored=s.handleContextRestored.bind(s),s.view.addEventListener("webglcontextlost",s.handleContextLost,!1),s.view.addEventListener("webglcontextrestored",s.handleContextRestored,!1),s._contextOptions={alpha:s.transparent,antialias:s.options.antialias,premultipliedAlpha:s.transparent&&"notMultiplied"!==s.transparent,stencil:!0,preserveDrawingBuffer:s.options.preserveDrawingBuffer,powerPreference:s.options.powerPreference},s._backgroundColorRgba[3]=s.transparent?0:1,s.maskManager=new i.default(s),s.stencilManager=new o.default(s),s.emptyRenderer=new u.default(s),s.currentRenderer=s.emptyRenderer,s.textureManager=null,s.filterManager=null,s.initPlugins(),s.options.context&&(0,p.default)(s.options.context),s.gl=s.options.context||_.default.createContext(s.view,s._contextOptions),s.CONTEXT_UID=m++,s.state=new f.default(s.gl),s.renderingToScreen=!0,s.boundTextures=null,s._activeShader=null,s._activeVao=null,s._activeRenderTarget=null,s._initContext(),s.drawModes=(0,d.default)(s.gl),s._nextTextureLocation=0,s.setBlendMode(0),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._initContext=function(){var t=this.gl;t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext();var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this._activeShader=null,this._activeVao=null,this.boundTextures=new Array(e),this.emptyTextures=new Array(e),this._unknownBoundTextures=!1,this.textureManager=new l.default(this),this.filterManager=new a.default(this),this.textureGC=new h.default(this),this.state.resetToDefault(),this.rootRenderTarget=new s.default(t,this.width,this.height,null,this.resolution,!0),this.rootRenderTarget.clearColor=this._backgroundColorRgba,this.bindRenderTarget(this.rootRenderTarget);var r=new _.default.GLTexture.fromData(t,null,1,1),n={_glTextures:{}};n._glTextures[this.CONTEXT_UID]={};for(var i=0;i<e;i++){var o=new c.default;o._glTextures[this.CONTEXT_UID]=r,this.boundTextures[i]=n,this.emptyTextures[i]=o,this.bindTexture(null,i)}this.emit("context",t),this.resize(this.screen.width,this.screen.height)},e.prototype.render=function(t,e,r,n,i){if(this.renderingToScreen=!e,this.emit("prerender"),this.gl&&!this.gl.isContextLost()){if(this._nextTextureLocation=0,e||(this._lastObjectRendered=t),!i){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}this.bindRenderTexture(e,n),this.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this._activeRenderTarget.clear(),t.renderWebGL(this),this.currentRenderer.flush(),this.textureGC.update(),this.emit("postrender")}},e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.resize=function(t,e){n.default.prototype.resize.call(this,t,e),this.rootRenderTarget.resize(t,e),this._activeRenderTarget===this.rootRenderTarget&&(this.rootRenderTarget.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=this.rootRenderTarget.projectionMatrix.toArray(!0)))},e.prototype.setBlendMode=function(t){this.state.setBlendMode(t)},e.prototype.clear=function(t){this._activeRenderTarget.clear(t)},e.prototype.setTransform=function(t){this._activeRenderTarget.transform=t},e.prototype.clearRenderTexture=function(t,e){var r=t.baseTexture._glRenderTargets[this.CONTEXT_UID];return r&&r.clear(e),this},e.prototype.bindRenderTexture=function(t,e){var r=void 0;if(t){var n=t.baseTexture;n._glRenderTargets[this.CONTEXT_UID]||this.textureManager.updateTexture(n,0),this.unbindTexture(n),(r=n._glRenderTargets[this.CONTEXT_UID]).setFrame(t.frame)}else r=this.rootRenderTarget;return r.transform=e,this.bindRenderTarget(r),this},e.prototype.bindRenderTarget=function(t){return t!==this._activeRenderTarget&&(this._activeRenderTarget=t,t.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=t.projectionMatrix.toArray(!0)),this.stencilManager.setMaskStack(t.stencilMaskStack)),this},e.prototype.bindShader=function(t,e){return this._activeShader!==t&&(this._activeShader=t,t.bind(),!1!==e&&(t.uniforms.projectionMatrix=this._activeRenderTarget.projectionMatrix.toArray(!0))),this},e.prototype.bindTexture=function(t,e,r){if((t=(t=t||this.emptyTextures[e]).baseTexture||t).touched=this.textureGC.count,r)e=e||0;else{for(var n=0;n<this.boundTextures.length;n++)if(this.boundTextures[n]===t)return n;void 0===e&&(this._nextTextureLocation++,this._nextTextureLocation%=this.boundTextures.length,e=this.boundTextures.length-this._nextTextureLocation-1)}var i=this.gl,o=t._glTextures[this.CONTEXT_UID];return o?(this.boundTextures[e]=t,i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,o.texture)):this.textureManager.updateTexture(t,e),e},e.prototype.unbindTexture=function(t){var e=this.gl;if(t=t.baseTexture||t,this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var r=0;r<this.boundTextures.length;r++)this.boundTextures[r]===this.emptyTextures[r]&&(e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,this.emptyTextures[r]._glTextures[this.CONTEXT_UID].texture))}for(var n=0;n<this.boundTextures.length;n++)this.boundTextures[n]===t&&(this.boundTextures[n]=this.emptyTextures[n],e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,this.emptyTextures[n]._glTextures[this.CONTEXT_UID].texture));return this},e.prototype.createVao=function(){return new _.default.VertexArrayObject(this.gl,this.state.attribState)},e.prototype.bindVao=function(t){return this._activeVao===t||(t?t.bind():this._activeVao&&this._activeVao.unbind(),this._activeVao=t),this},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer),this.bindVao(null),this._activeShader=null,this._activeRenderTarget=this.rootRenderTarget,this._unknownBoundTextures=!0;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.emptyTextures[t];return this.rootRenderTarget.activate(),this.state.resetToDefault(),this},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.textureManager.removeAll(),this.filterManager.destroy(!0),this._initContext()},e.prototype.destroy=function(e){this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),this.textureManager.destroy(),t.prototype.destroy.call(this,e),this.uid=0,this.maskManager.destroy(),this.stencilManager.destroy(),this.filterManager.destroy(),this.maskManager=null,this.filterManager=null,this.textureManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.gl.useProgram(null),this.gl.getExtension("WEBGL_lose_context")&&this.gl.getExtension("WEBGL_lose_context").loseContext(),this.gl=null},e}(n.default);e.default=x,v.pluginTarget.mixin(x)},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(6),o=r(2),a=r(5),s=(n=a)&&n.__esModule?n:{default:n},u=r(7);var l=function(){function t(e,r,n,a,l,c){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.frameBuffer=null,this.texture=null,this.clearColor=[0,0,0,0],this.size=new i.Rectangle(0,0,1,1),this.resolution=l||s.default.RESOLUTION,this.projectionMatrix=new i.Matrix,this.transform=null,this.frame=null,this.defaultFrame=new i.Rectangle,this.destinationFrame=null,this.sourceFrame=null,this.stencilBuffer=null,this.stencilMaskStack=[],this.filterData=null,this.filterPoolKey="",this.scaleMode=void 0!==a?a:s.default.SCALE_MODE,this.root=c||!1,this.root?(this.frameBuffer=new u.GLFramebuffer(e,100,100),this.frameBuffer.framebuffer=null):(this.frameBuffer=u.GLFramebuffer.createRGBA(e,100,100),this.scaleMode===o.SCALE_MODES.NEAREST?this.frameBuffer.texture.enableNearestScaling():this.frameBuffer.texture.enableLinearScaling(),this.texture=this.frameBuffer.texture),this.setFrame(),this.resize(r,n)}return t.prototype.clear=function(t){var e=t||this.clearColor;this.frameBuffer.clear(e[0],e[1],e[2],e[3])},t.prototype.attachStencilBuffer=function(){this.root||this.frameBuffer.enableStencil()},t.prototype.setFrame=function(t,e){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||this.destinationFrame},t.prototype.activate=function(){var t=this.gl;this.frameBuffer.bind(),this.calculateProjection(this.destinationFrame,this.sourceFrame),this.transform&&this.projectionMatrix.append(this.transform),this.destinationFrame!==this.sourceFrame?(t.enable(t.SCISSOR_TEST),t.scissor(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)):t.disable(t.SCISSOR_TEST),t.viewport(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)},t.prototype.calculateProjection=function(t,e){var r=this.projectionMatrix;e=e||t,r.identity(),this.root?(r.a=1/t.width*2,r.d=-1/t.height*2,r.tx=-1-e.x*r.a,r.ty=1-e.y*r.d):(r.a=1/t.width*2,r.d=1/t.height*2,r.tx=-1-e.x*r.a,r.ty=-1-e.y*r.d)},t.prototype.resize=function(t,e){if(t|=0,e|=0,this.size.width!==t||this.size.height!==e){this.size.width=t,this.size.height=e,this.defaultFrame.width=t,this.defaultFrame.height=e,this.frameBuffer.resize(t*this.resolution,e*this.resolution);var r=this.frame||this.size;this.calculateProjection(r)}},t.prototype.destroy=function(){this.frameBuffer.stencil&&this.gl.deleteRenderbuffer(this.frameBuffer.stencil),this.frameBuffer.destroy(),this.frameBuffer=null,this.texture=null},t}();e.default=l},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){t.nativeLines?function(t,e){var r=0,n=t.points;if(0===n.length)return;var o=e.points,a=n.length/2,s=(0,i.hex2rgb)(t.lineColor),u=t.lineAlpha,l=s[0]*u,c=s[1]*u,h=s[2]*u;for(r=1;r<a;r++){var f=n[2*(r-1)],d=n[2*(r-1)+1],p=n[2*r],v=n[2*r+1];o.push(f,d),o.push(l,c,h,u),o.push(p,v),o.push(l,c,h,u)}}(t,r):function(t,e){var r=t.points;if(0===r.length)return;var o=new n.Point(r[0],r[1]),a=new n.Point(r[r.length-2],r[r.length-1]);if(o.x===a.x&&o.y===a.y){(r=r.slice()).pop(),r.pop();var s=(a=new n.Point(r[r.length-2],r[r.length-1])).x+.5*(o.x-a.x),u=a.y+.5*(o.y-a.y);r.unshift(s,u),r.push(s,u)}var l=e.points,c=e.indices,h=r.length/2,f=r.length,d=l.length/6,p=t.lineWidth/2,v=(0,i.hex2rgb)(t.lineColor),_=t.lineAlpha,g=v[0]*_,y=v[1]*_,m=v[2]*_,x=r[0],E=r[1],b=r[2],T=r[3],R=0,O=0,S=-(E-T),C=x-b,w=0,A=0,P=0,M=0,I=Math.sqrt(S*S+C*C);S/=I,C/=I,S*=p,C*=p;var D=t.lineAlignment,L=2*(1-D),U=2*D;l.push(x-S*L,E-C*L,g,y,m,_),l.push(x+S*U,E+C*U,g,y,m,_);for(var N=1;N<h-1;++N){x=r[2*(N-1)],E=r[2*(N-1)+1],b=r[2*N],T=r[2*N+1],R=r[2*(N+1)],O=r[2*(N+1)+1],S=-(E-T),C=x-b,I=Math.sqrt(S*S+C*C),S/=I,C/=I,S*=p,C*=p,w=-(T-O),A=b-R,I=Math.sqrt(w*w+A*A),w/=I,A/=I;var F=-C+E-(-C+T),j=-S+b-(-S+x),k=(-S+x)*(-C+T)-(-S+b)*(-C+E),B=-(A*=p)+O-(-A+T),H=-(w*=p)+b-(-w+R),W=(-w+R)*(-A+T)-(-w+b)*(-A+O),G=F*H-B*j;if(Math.abs(G)<.1)G+=10.1,l.push(b-S*L,T-C*L,g,y,m,_),l.push(b+S*U,T+C*U,g,y,m,_);else{var X=(j*W-H*k)/G,z=(B*k-F*W)/G;(X-b)*(X-b)+(z-T)*(z-T)>196*p*p?(P=S-w,M=C-A,I=Math.sqrt(P*P+M*M),P/=I,M/=I,P*=p,M*=p,l.push(b-P*L,T-M*L),l.push(g,y,m,_),l.push(b+P*U,T+M*U),l.push(g,y,m,_),l.push(b-P*U*L,T-M*L),l.push(g,y,m,_),f++):(l.push(b+(X-b)*L,T+(z-T)*L),l.push(g,y,m,_),l.push(b-(X-b)*U,T-(z-T)*U),l.push(g,y,m,_))}}x=r[2*(h-2)],E=r[2*(h-2)+1],b=r[2*(h-1)],T=r[2*(h-1)+1],S=-(E-T),C=x-b,I=Math.sqrt(S*S+C*C),S/=I,C/=I,S*=p,C*=p,l.push(b-S*L,T-C*L),l.push(g,y,m,_),l.push(b+S*U,T+C*U),l.push(g,y,m,_),c.push(d);for(var Y=0;Y<f;++Y)c.push(d++);c.push(d-1)}(t,e)};var n=r(6),i=r(4)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;n(this,t),this.x=e,this.y=r}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copy=function(t){this.set(t.x,t.y)},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)},t}();e.default=i},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(25),a=(n=o)&&n.__esModule?n:{default:n},s=r(2);function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var l=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;u(this,t),this.a=e,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a,this.array=null}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,r,n,i,o){return this.a=t,this.b=e,this.c=r,this.d=n,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new a.default;var r=t.x,n=t.y;return e.x=this.a*r+this.c*n+this.tx,e.y=this.b*r+this.d*n+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new a.default;var r=1/(this.a*this.d+this.c*-this.b),n=t.x,i=t.y;return e.x=this.d*r*n+-this.c*r*i+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*i+-this.b*r*n+(-this.ty*this.a+this.tx*this.b)*r,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),n=this.a,i=this.c,o=this.tx;return this.a=n*e-this.b*r,this.b=n*r+this.b*e,this.c=i*e-this.d*r,this.d=i*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,n=this.c,i=this.d;return this.a=t.a*e+t.b*n,this.b=t.a*r+t.b*i,this.c=t.c*e+t.d*n,this.d=t.c*r+t.d*i,this.tx=t.tx*e+t.ty*n+this.tx,this.ty=t.tx*r+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,r,n,i,o,a,s,u){return this.a=Math.cos(a+u)*i,this.b=Math.sin(a+u)*i,this.c=-Math.sin(a-s)*o,this.d=Math.cos(a-s)*o,this.tx=t-(r*this.a+n*this.c),this.ty=e-(r*this.b+n*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,n=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=n*t.a+this.d*t.c,this.d=n*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,r=this.b,n=this.c,i=this.d,o=-Math.atan2(-n,i),a=Math.atan2(r,e),u=Math.abs(o+a);return u<1e-5||Math.abs(s.PI_2-u)<1e-5?(t.rotation=a,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=o,t.skew.y=a),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(n*n+i*i),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,n=this.d,i=this.tx,o=t*n-e*r;return this.a=n/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-n*i)/o,this.ty=-(t*this.ty-e*i)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},i(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();e.default=l},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(2);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;o(this,t),this.x=Number(e),this.y=Number(r),this.width=Number(n),this.height=Number(a),this.type=i.SHAPES.RECT}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e},t.prototype.fit=function(t){var e=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),n=Math.max(this.y,t.y),i=Math.min(this.y+this.height,t.y+t.height);this.x=e,this.width=Math.max(r-e,0),this.y=n,this.height=Math.max(i-n,0)},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),n=Math.min(this.y,t.y),i=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=r-e,this.y=n,this.height=i-n},t.prototype.ceil=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.001,r=Math.ceil((this.x+this.width-e)*t)/t,n=Math.ceil((this.y+this.height-e)*t)/t;this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=r-this.x,this.height=n-this.y},n(t,[{key:"left",get:function(){return this.x}},{key:"right",get:function(){return this.x+this.width}},{key:"top",get:function(){return this.y}},{key:"bottom",get:function(){return this.y+this.height}}],[{key:"EMPTY",get:function(){return new t(0,0,0,0)}}]),t}();e.default=a},function(t,e){var r=null,n={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};t.exports=function(t,e){if(!r){var i=Object.keys(n);r={};for(var o=0;o<i.length;++o){var a=i[o];r[t[a]]=n[a]}}return r[e]}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(6);var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?n.Rectangle.EMPTY:((t=t||new n.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,r=this.minY,n=this.maxX,i=this.maxY,o=t[0],a=t[1];e=o<e?o:e,r=a<r?a:r,n=o>n?o:n,i=a>i?a:i,e=(o=t[2])<e?o:e,r=(a=t[3])<r?a:r,n=o>n?o:n,i=a>i?a:i,e=(o=t[4])<e?o:e,r=(a=t[5])<r?a:r,n=o>n?o:n,i=a>i?a:i,e=(o=t[6])<e?o:e,r=(a=t[7])<r?a:r,n=o>n?o:n,i=a>i?a:i,this.minX=e,this.minY=r,this.maxX=n,this.maxY=i},t.prototype.addFrame=function(t,e,r,n,i){var o=t.worldTransform,a=o.a,s=o.b,u=o.c,l=o.d,c=o.tx,h=o.ty,f=this.minX,d=this.minY,p=this.maxX,v=this.maxY,_=a*e+u*r+c,g=s*e+l*r+h;f=_<f?_:f,d=g<d?g:d,p=_>p?_:p,v=g>v?g:v,f=(_=a*n+u*r+c)<f?_:f,d=(g=s*n+l*r+h)<d?g:d,p=_>p?_:p,v=g>v?g:v,f=(_=a*e+u*i+c)<f?_:f,d=(g=s*e+l*i+h)<d?g:d,p=_>p?_:p,v=g>v?g:v,f=(_=a*n+u*i+c)<f?_:f,d=(g=s*n+l*i+h)<d?g:d,p=_>p?_:p,v=g>v?g:v,this.minX=f,this.minY=d,this.maxX=p,this.maxY=v},t.prototype.addVertices=function(t,e,r,n){for(var i=t.worldTransform,o=i.a,a=i.b,s=i.c,u=i.d,l=i.tx,c=i.ty,h=this.minX,f=this.minY,d=this.maxX,p=this.maxY,v=r;v<n;v+=2){var _=e[v],g=e[v+1],y=o*_+s*g+l,m=u*g+a*_+c;h=y<h?y:h,f=m<f?m:f,d=y>d?y:d,p=m>p?m:p}this.minX=h,this.minY=f,this.maxX=d,this.maxY=p},t.prototype.addBounds=function(t){var e=this.minX,r=this.minY,n=this.maxX,i=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>n?t.maxX:n,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,n=t.minY>e.minY?t.minY:e.minY,i=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(r<=i&&n<=o){var a=this.minX,s=this.minY,u=this.maxX,l=this.maxY;this.minX=r<a?r:a,this.minY=n<s?n:s,this.maxX=i>u?i:u,this.maxY=o>l?o:l}},t.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,n=t.minY>e.y?t.minY:e.y,i=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(r<=i&&n<=o){var a=this.minX,s=this.minY,u=this.maxX,l=this.maxY;this.minX=r<a?r:a,this.minY=n<s?n:s,this.maxX=i>u?i:u,this.maxY=o>l?o:l}},t}();e.default=i},function(t,e,r){var n,i,o;!function(r){var a=/iPhone/i,s=/iPod/i,u=/iPad/i,l=/\bAndroid(?:.+)Mobile\b/i,c=/Android/i,h=/\bAndroid(?:.+)SD4930UR\b/i,f=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,d=/Windows Phone/i,p=/\bWindows(?:.+)ARM\b/i,v=/BlackBerry/i,_=/BB10/i,g=/Opera Mini/i,y=/\b(CriOS|Chrome)(?:.+)Mobile/i,m=/Mobile(?:.+)Firefox\b/i;function x(t,e){return t.test(e)}function E(t){var e=t||("undefined"!=typeof navigator?navigator.userAgent:""),r=e.split("[FBAN");void 0!==r[1]&&(e=r[0]),void 0!==(r=e.split("Twitter"))[1]&&(e=r[0]);var n={apple:{phone:x(a,e)&&!x(d,e),ipod:x(s,e),tablet:!x(a,e)&&x(u,e)&&!x(d,e),device:(x(a,e)||x(s,e)||x(u,e))&&!x(d,e)},amazon:{phone:x(h,e),tablet:!x(h,e)&&x(f,e),device:x(h,e)||x(f,e)},android:{phone:!x(d,e)&&x(h,e)||!x(d,e)&&x(l,e),tablet:!x(d,e)&&!x(h,e)&&!x(l,e)&&(x(f,e)||x(c,e)),device:!x(d,e)&&(x(h,e)||x(f,e)||x(l,e)||x(c,e))||x(/\bokhttp\b/i,e)},windows:{phone:x(d,e),tablet:x(p,e),device:x(d,e)||x(p,e)},other:{blackberry:x(v,e),blackberry10:x(_,e),opera:x(g,e),firefox:x(m,e),chrome:x(y,e),device:x(v,e)||x(_,e)||x(g,e)||x(m,e)||x(y,e)}};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}t.exports&&"undefined"==typeof window?t.exports=E:t.exports&&"undefined"!=typeof window?(t.exports=E(),t.exports.isMobile=E):(i=[],n=r.isMobile=E(),void 0===(o="function"==typeof n?n.apply(e,i):n)||(t.exports=o))}(this)},function(t,e,r){"use strict";e.__esModule=!0;var n=r(6);var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.worldTransform=new n.Matrix,this.localTransform=new n.Matrix,this._worldID=0,this._parentID=0}return t.prototype.updateLocalTransform=function(){},t.prototype.updateTransform=function(t){var e=t.worldTransform,r=this.worldTransform,n=this.localTransform;r.a=n.a*e.a+n.b*e.c,r.b=n.a*e.b+n.b*e.d,r.c=n.c*e.a+n.d*e.c,r.d=n.c*e.b+n.d*e.d,r.tx=n.tx*e.a+n.ty*e.c+e.tx,r.ty=n.tx*e.b+n.ty*e.d+e.ty,this._worldID++},t}();e.default=i,i.prototype.updateWorldTransform=i.prototype.updateTransform,i.IDENTITY=new i},function(t,e,r){"use strict";function n(t,e,r){r=r||2;var n,o,s,u,l,c,d,p=e&&e.length,_=p?e[0]*r:t.length,g=i(t,0,_,r,!0),y=[];if(!g||g.next===g.prev)return y;if(p&&(g=function(t,e,r,n){var o,a,s,u,l,c=[];for(o=0,a=e.length;o<a;o++)s=e[o]*n,u=o<a-1?e[o+1]*n:t.length,(l=i(t,s,u,n,!1))===l.next&&(l.steiner=!0),c.push(v(l));for(c.sort(h),o=0;o<c.length;o++)r=f(c[o],r);return r}(t,e,g,r)),t.length>80*r){n=s=t[0],o=u=t[1];for(var m=r;m<_;m+=r)(l=t[m])<n&&(n=l),(c=t[m+1])<o&&(o=c),l>s&&(s=l),c>u&&(u=c);d=0!==(d=Math.max(s-n,u-o))?32767/d:0}return a(g,y,r,n,o,d,0),y}function i(t,e,r,n,i){var o,a;if(i===w(t,e,r,n)>0)for(o=e;o<r;o+=n)a=O(o,t[o],t[o+1],a);else for(o=r-n;o>=e;o-=n)a=O(o,t[o],t[o+1],a);return a&&m(a,a.next)&&(S(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!m(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(S(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function a(t,e,r,n,i,h,f){if(t){!f&&h&&function(t,e,r,n){var i=t;do{0===i.z&&(i.z=p(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,a,s,u,l=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e<l&&(s++,n=n.nextZ);e++);for(u=l;s>0||u>0&&n;)0!==s&&(0===u||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,l*=2}while(a>1)}(i)}(t,n,i,h);for(var d,v,_=t;t.prev!==t.next;)if(d=t.prev,v=t.next,h?u(t,n,i,h):s(t))e.push(d.i/r|0),e.push(t.i/r|0),e.push(v.i/r|0),S(t),t=v.next,_=v.next;else if((t=v)===_){f?1===f?a(t=l(o(t),e,r),e,r,n,i,h,2):2===f&&c(t,e,r,n,i,h):a(o(t),e,r,n,i,h,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(y(e,r,n)>=0)return!1;for(var i=e.x,o=r.x,a=n.x,s=e.y,u=r.y,l=n.y,c=i<o?i<a?i:a:o<a?o:a,h=s<u?s<l?s:l:u<l?u:l,f=i>o?i>a?i:a:o>a?o:a,d=s>u?s>l?s:l:u>l?u:l,p=n.next;p!==e;){if(p.x>=c&&p.x<=f&&p.y>=h&&p.y<=d&&_(i,s,o,u,a,l,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function u(t,e,r,n){var i=t.prev,o=t,a=t.next;if(y(i,o,a)>=0)return!1;for(var s=i.x,u=o.x,l=a.x,c=i.y,h=o.y,f=a.y,d=s<u?s<l?s:l:u<l?u:l,v=c<h?c<f?c:f:h<f?h:f,g=s>u?s>l?s:l:u>l?u:l,m=c>h?c>f?c:f:h>f?h:f,x=p(d,v,e,r,n),E=p(g,m,e,r,n),b=t.prevZ,T=t.nextZ;b&&b.z>=x&&T&&T.z<=E;){if(b.x>=d&&b.x<=g&&b.y>=v&&b.y<=m&&b!==i&&b!==a&&_(s,c,u,h,l,f,b.x,b.y)&&y(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,T.x>=d&&T.x<=g&&T.y>=v&&T.y<=m&&T!==i&&T!==a&&_(s,c,u,h,l,f,T.x,T.y)&&y(T.prev,T,T.next)>=0)return!1;T=T.nextZ}for(;b&&b.z>=x;){if(b.x>=d&&b.x<=g&&b.y>=v&&b.y<=m&&b!==i&&b!==a&&_(s,c,u,h,l,f,b.x,b.y)&&y(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;T&&T.z<=E;){if(T.x>=d&&T.x<=g&&T.y>=v&&T.y<=m&&T!==i&&T!==a&&_(s,c,u,h,l,f,T.x,T.y)&&y(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function l(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!m(i,a)&&x(i,n,n.next,a)&&T(i,a)&&T(a,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(a.i/r|0),S(n),S(n.next),n=t=a),n=n.next}while(n!==t);return o(n)}function c(t,e,r,n,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&g(u,l)){var c=R(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,r,n,i,s,0),void a(c,e,r,n,i,s,0)}l=l.next}u=u.next}while(u!==t)}function h(t,e){return t.x-e.x}function f(t,e){var r=function(t,e){var r,n=e,i=t.x,o=t.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a&&(a=s,r=n.x<n.next.x?n:n.next,s===i))return r}n=n.next}while(n!==e);if(!r)return null;var u,l=r,c=r.x,h=r.y,f=1/0;n=r;do{i>=n.x&&n.x>=c&&i!==n.x&&_(o<h?i:a,o,c,h,o<h?a:i,o,n.x,n.y)&&(u=Math.abs(o-n.y)/(i-n.x),T(n,t)&&(u<f||u===f&&(n.x>r.x||n.x===r.x&&d(r,n)))&&(r=n,f=u)),n=n.next}while(n!==l);return r}(t,e);if(!r)return e;var n=R(r,t);return o(n,n.next),o(r,r.next)}function d(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function p(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function v(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function _(t,e,r,n,i,o,a,s){return(i-a)*(e-s)>=(t-a)*(o-s)&&(t-a)*(n-s)>=(r-a)*(e-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function g(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&x(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||m(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,r,n){var i=b(y(t,e,r)),o=b(y(t,e,n)),a=b(y(r,n,t)),s=b(y(r,n,e));return i!==o&&a!==s||(!(0!==i||!E(t,r,e))||(!(0!==o||!E(t,n,e))||(!(0!==a||!E(r,t,n))||!(0!==s||!E(r,e,n)))))}function E(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function b(t){return t>0?1:t<0?-1:0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function R(t,e){var r=new C(t.i,t.x,t.y),n=new C(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function O(t,e,r,n){var i=new C(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function C(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function w(t,e,r,n){for(var i=0,o=e,a=r-n;o<r;o+=n)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}t.exports=n,t.exports.default=n,n.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,a=Math.abs(w(t,0,o,r));if(i)for(var s=0,u=e.length;s<u;s++){var l=e[s]*r,c=s<u-1?e[s+1]*r:t.length;a-=Math.abs(w(t,l,c,r))}var h=0;for(s=0;s<n.length;s+=3){var f=n[s]*r,d=n[s+1]*r,p=n[s+2]*r;h+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[i][o][a]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(6),o=r(4),a=r(2),s=l(r(10)),u=l(r(13));function l(t){return t&&t.__esModule?t:{default:t}}var c=new i.Point,h=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return n._anchor=new i.ObservablePoint(n._onAnchorUpdate,n,r?r.defaultAnchor.x:0,r?r.defaultAnchor.y:0),n._texture=null,n._width=0,n._height=0,n._tint=null,n._tintRGB=null,n.tint=16777215,n.blendMode=a.BLEND_MODES.NORMAL,n.shader=null,n.cachedTint=16777215,n.texture=r||s.default.EMPTY,n.vertexData=new Float32Array(8),n.vertexTrimmedData=null,n._transformID=-1,n._textureID=-1,n._transformTrimmedID=-1,n._textureTrimmedID=-1,n.pluginName="sprite",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this.cachedTint=16777215,this._width&&(this.scale.x=(0,o.sign)(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=(0,o.sign)(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID||this._textureID!==this._texture._updateID){this._transformID=this.transform._worldID,this._textureID=this._texture._updateID;var t=this._texture,e=this.transform.worldTransform,r=e.a,n=e.b,i=e.c,o=e.d,a=e.tx,s=e.ty,u=this.vertexData,l=t.trim,c=t.orig,h=this._anchor,f=0,d=0,p=0,v=0;l?(f=(d=l.x-h._x*c.width)+l.width,p=(v=l.y-h._y*c.height)+l.height):(f=(d=-h._x*c.width)+c.width,p=(v=-h._y*c.height)+c.height),u[0]=r*d+i*v+a,u[1]=o*v+n*d+s,u[2]=r*f+i*v+a,u[3]=o*v+n*f+s,u[4]=r*f+i*p+a,u[5]=o*p+n*f+s,u[6]=r*d+i*p+a,u[7]=o*p+n*d+s}},e.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,r=t.orig,n=this._anchor,i=this.transform.worldTransform,o=i.a,a=i.b,s=i.c,u=i.d,l=i.tx,c=i.ty,h=-n._x*r.width,f=h+r.width,d=-n._y*r.height,p=d+r.height;e[0]=o*h+s*d+l,e[1]=u*d+a*h+c,e[2]=o*f+s*d+l,e[3]=u*d+a*f+c,e[4]=o*f+s*p+l,e[5]=u*p+a*f+c,e[6]=o*h+s*p+l,e[7]=u*p+a*h+c},e.prototype._renderWebGL=function(t){this.calculateVertices(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new i.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,c);var e=this._texture.orig.width,r=this._texture.orig.height,n=-e*this.anchor.x,i=0;return c.x>=n&&c.x<n+e&&(i=-r*this.anchor.y,c.y>=i&&c.y<i+r)},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,"boolean"==typeof e?e:e&&e.texture){var r="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!r)}this._texture=null,this.shader=null},e.from=function(t){return new e(s.default.from(t))},e.fromFrame=function(t){var r=o.TextureCache[t];if(!r)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return new e(r)},e.fromImage=function(t,r,n){return new e(s.default.fromImage(t,r,n))},n(e,[{key:"width",get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=(0,o.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=(0,o.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"anchor",get:function(){return this._anchor},set:function(t){this._anchor.copy(t)}},{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t||s.default.EMPTY,this.cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),e}(u.default);e.default=h},function(t,e,r){"use strict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)},e.isPow2=function(t){return!(t&t-1||!t)},e.log2=function(t){var e,r;return e=(t>65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=n,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<<i&255}}(i),e.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},function(t,e,r){"use strict";e.__esModule=!0,e.Ticker=e.shared=void 0;var n,i=r(121),o=(n=i)&&n.__esModule?n:{default:n};var a=new o.default;a.autoStart=!0,a.destroy=function(){},e.shared=a,e.Ticker=o.default},function(t,e,r){"use strict";e.__esModule=!0;var n=i(r(60));function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(r,i){o(this,e);var s=null;if(!(r instanceof n.default)){var u=arguments[1],l=arguments[2],c=arguments[3],h=arguments[4];console.warn("Please use RenderTexture.create("+u+", "+l+") instead of the ctor directly."),s=arguments[0],i=null,r=new n.default(u,l,c,h)}var f=a(this,t.call(this,r,i));return f.legacyRenderer=s,f.valid=!0,f._updateUvs(),f}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.resize=function(t,e,r){t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r||this.baseTexture.resize(t,e),this._updateUvs()},e.create=function(t,r,i,o){return new e(new n.default(t,r,i,o))},e}(i(r(10)).default);e.default=s},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){for(var e=6*t,r=new Uint16Array(e),n=0,i=0;n<e;n+=6,i+=4)r[n+0]=i+0,r[n+1]=i+1,r[n+2]=i+2,r[n+3]=i+0,r[n+4]=i+2,r[n+5]=i+3;return r}},function(t,e,r){"use strict";e.__esModule=!0,e.Resource=void 0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=a(r(85)),o=a(r(84));function a(t){return t&&t.__esModule?t:{default:t}}var s=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),u=null;function l(){}var c=e.Resource=function(){function t(e,r,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"string"!=typeof e||"string"!=typeof r)throw new Error("Both name and url are required for constructing a resource.");n=n||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===r.indexOf("data:")),this.name=e,this.url=r,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===n.crossOrigin?"anonymous":n.crossOrigin,this.timeout=n.timeout||0,this.loadType=n.loadType||this._determineLoadType(),this.xhrType=n.xhrType,this.metadata=n.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=l,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new o.default,this.onProgress=new o.default,this.onComplete=new o.default,this.onAfterMiddleware=new o.default}return t.setExtensionLoadType=function(e,r){h(t._loadTypeMap,e,r)},t.setExtensionXhrType=function(e,r){h(t._xhrTypeMap,e,r)},t.prototype.complete=function(){this._clearEvents(),this._finish()},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this._finish()}},t.prototype.load=function(e){var r=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout((function(){return e(r)}),1);else switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:s&&this.crossOrigin?this._loadXdr():this._loadXhr()}},t.prototype._hasFlag=function(t){return 0!=(this._flags&t)},t.prototype._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},t.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},t.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},t.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==window.Audio?this.data=new Audio:this.data=document.createElement(t),null!==this.data){if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,r=0;r<this.url.length;++r)this.data.appendChild(this._createSource(t,this.url[r],Array.isArray(e)?e[r]:e));else{var n=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(n)?n[0]:n))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: "+t)},t.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),e.timeout=this.timeout,this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},t.prototype._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=this.timeout||5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXhrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout((function(){return t.send()}),1)},t.prototype._createSource=function(t,e,r){r||(r=t+"/"+this._getExtension(e));var n=document.createElement("source");return n.src=e,n.type=r,n},t.prototype._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},t.prototype._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},t.prototype._onTimeout=function(){this.abort("Load timed out.")},t.prototype._xhrOnError=function(){var t=this.xhr;this.abort(f(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},t.prototype._xhrOnTimeout=function(){var t=this.xhr;this.abort(f(t)+" Request timed out.")},t.prototype._xhrOnAbort=function(){var t=this.xhr;this.abort(f(t)+" Request was aborted by the user.")},t.prototype._xhrOnLoad=function(){var e=this.xhr,r="",n=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(r=e.responseText),0===n&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?n=200:1223===n&&(n=204),2===(n/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(r,"text/xml")}else{var o=document.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||r;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,u||(u=document.createElement("a")),u.href=t;var r=!(t=(0,i.default)(u.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,n=t.protocol?t.protocol+":":"";return t.host===e.hostname&&r&&n===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var n=t.indexOf("?"),i=t.indexOf("#"),o=Math.min(n>-1?n:t.length,i>-1?i:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},n(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();function h(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function f(t){return t.toString().replace("object ","")}c.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},c.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},c.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},c.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},c._loadTypeMap={gif:c.LOAD_TYPE.IMAGE,png:c.LOAD_TYPE.IMAGE,bmp:c.LOAD_TYPE.IMAGE,jpg:c.LOAD_TYPE.IMAGE,jpeg:c.LOAD_TYPE.IMAGE,tif:c.LOAD_TYPE.IMAGE,tiff:c.LOAD_TYPE.IMAGE,webp:c.LOAD_TYPE.IMAGE,tga:c.LOAD_TYPE.IMAGE,svg:c.LOAD_TYPE.IMAGE,"svg+xml":c.LOAD_TYPE.IMAGE,mp3:c.LOAD_TYPE.AUDIO,ogg:c.LOAD_TYPE.AUDIO,wav:c.LOAD_TYPE.AUDIO,mp4:c.LOAD_TYPE.VIDEO,webm:c.LOAD_TYPE.VIDEO},c._xhrTypeMap={xhtml:c.XHR_RESPONSE_TYPE.DOCUMENT,html:c.XHR_RESPONSE_TYPE.DOCUMENT,htm:c.XHR_RESPONSE_TYPE.DOCUMENT,xml:c.XHR_RESPONSE_TYPE.DOCUMENT,tmx:c.XHR_RESPONSE_TYPE.DOCUMENT,svg:c.XHR_RESPONSE_TYPE.DOCUMENT,tsx:c.XHR_RESPONSE_TYPE.DOCUMENT,gif:c.XHR_RESPONSE_TYPE.BLOB,png:c.XHR_RESPONSE_TYPE.BLOB,bmp:c.XHR_RESPONSE_TYPE.BLOB,jpg:c.XHR_RESPONSE_TYPE.BLOB,jpeg:c.XHR_RESPONSE_TYPE.BLOB,tif:c.XHR_RESPONSE_TYPE.BLOB,tiff:c.XHR_RESPONSE_TYPE.BLOB,webp:c.XHR_RESPONSE_TYPE.BLOB,tga:c.XHR_RESPONSE_TYPE.BLOB,json:c.XHR_RESPONSE_TYPE.JSON,text:c.XHR_RESPONSE_TYPE.TEXT,txt:c.XHR_RESPONSE_TYPE.TEXT,ttf:c.XHR_RESPONSE_TYPE.BUFFER,otf:c.XHR_RESPONSE_TYPE.BUFFER},c.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",t.exports.default=c},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=r(91),a=(n=o)&&n.__esModule?n:{default:n};var s=i.ticker.shared;i.settings.UPLOADS_PER_FRAME=4;var u=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.limiter=new a.default(i.settings.UPLOADS_PER_FRAME),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){r.queue&&r.prepareItems()},this.registerFindHook(p),this.registerFindHook(v),this.registerFindHook(l),this.registerFindHook(c),this.registerFindHook(h),this.registerUploadHook(f),this.registerUploadHook(d)}return t.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,s.addOnce(this.tick,this,i.UPDATE_PRIORITY.UTILITY))):e&&e()},t.prototype.tick=function(){setTimeout(this.delayedTick,0)},t.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var r=0,n=this.uploadHooks.length;r<n;r++)if(this.uploadHooks[r](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)s.addOnce(this.tick,this,i.UPDATE_PRIORITY.UTILITY);else{this.ticking=!1;var o=this.completes.slice(0);this.completes.length=0;for(var a=0,u=o.length;a<u;a++)o[a]()}},t.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},t.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},t.prototype.add=function(t){for(var e=0,r=this.addHooks.length;e<r&&!this.addHooks[e](t,this.queue);e++);if(t instanceof i.Container)for(var n=t.children.length-1;n>=0;n--)this.add(t.children[n]);return this},t.prototype.destroy=function(){this.ticking&&s.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();function l(t,e){var r=!1;if(t&&t._textures&&t._textures.length)for(var n=0;n<t._textures.length;n++)if(t._textures[n]instanceof i.Texture){var o=t._textures[n].baseTexture;-1===e.indexOf(o)&&(e.push(o),r=!0)}return r}function c(t,e){return t instanceof i.BaseTexture&&(-1===e.indexOf(t)&&e.push(t),!0)}function h(t,e){if(t._texture&&t._texture instanceof i.Texture){var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function f(t,e){return e instanceof i.Text&&(e.updateText(!0),!0)}function d(t,e){if(e instanceof i.TextStyle){var r=e.toFontString();return i.TextMetrics.measureFont(r),!0}return!1}function p(t,e){if(t instanceof i.Text){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function v(t,e){return t instanceof i.TextStyle&&(-1===e.indexOf(t)&&e.push(t),!0)}e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;i(this,t),this._x=n,this._y=o,this.cb=e,this.scope=r}return t.prototype.clone=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e||this.cb,i=r||this.scope;return new t(n,i,this._x,this._y)},t.prototype.set=function(t,e){var r=t||0,n=e||(0!==e?r:0);this._x===r&&this._y===n||(this._x=r,this._y=n,this.cb.call(this.scope))},t.prototype.copy=function(t){this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope))},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},n(t,[{key:"x",get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},{key:"y",get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}]),t}();e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(26),o=(n=i)&&n.__esModule?n:{default:n};var a=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],s=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],u=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],l=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],c=[],h=[];function f(t){return t<0?-1:t>0?1:0}!function(){for(var t=0;t<16;t++){var e=[];h.push(e);for(var r=0;r<16;r++)for(var n=f(a[t]*a[r]+u[t]*s[r]),i=f(s[t]*a[r]+l[t]*s[r]),d=f(a[t]*u[r]+u[t]*l[r]),p=f(s[t]*u[r]+l[t]*l[r]),v=0;v<16;v++)if(a[v]===n&&s[v]===i&&u[v]===d&&l[v]===p){e.push(v);break}}for(var _=0;_<16;_++){var g=new o.default;g.set(a[_],s[_],u[_],l[_],0,0),c.push(g)}}();var d={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(t){return a[t]},uY:function(t){return s[t]},vX:function(t){return u[t]},vY:function(t){return l[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return h[t][e]},sub:function(t,e){return h[t][d.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?d.S:d.N:2*Math.abs(e)<=Math.abs(t)?t>0?d.E:d.W:e>0?t>0?d.SE:d.SW:t>0?d.NE:d.NW},matrixAppendRotationInv:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=c[d.inv(e)];i.tx=r,i.ty=n,t.append(i)}};e.default=d},function(t,e){t.exports=function(t,e,r){var n;if(r){var i=r.tempAttribState,o=r.attribState;for(n=0;n<i.length;n++)i[n]=!1;for(n=0;n<e.length;n++)i[e[n].attribute.location]=!0;for(n=0;n<o.length;n++)o[n]!==i[n]&&(o[n]=i[n],r.attribState[n]?t.enableVertexAttribArray(n):t.disableVertexAttribArray(n))}else for(n=0;n<e.length;n++){var a=e[n];t.enableVertexAttribArray(a.attribute.location)}}},function(t,e){var r=function(t,e,r,n,i){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=r||-1,this.format=n||t.RGBA,this.type=i||t.UNSIGNED_BYTE};r.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var r=t.videoWidth||t.width,n=t.videoHeight||t.height;n!==this.height||r!==this.width?e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t):e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.format,this.type,t),this.width=r,this.height=n};var n=!1;r.prototype.uploadData=function(t,e,r){this.bind();var i=this.gl;if(t instanceof Float32Array){if(!n){if(!i.getExtension("OES_texture_float"))throw new Error("floating point textures not available");n=!0}this.type=i.FLOAT}else this.type=this.type||i.UNSIGNED_BYTE;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||r!==this.height?i.texImage2D(i.TEXTURE_2D,0,this.format,e,r,0,this.format,this.type,t||null):i.texSubImage2D(i.TEXTURE_2D,0,0,0,e,r,this.format,this.type,t||null),this.width=e,this.height=r},r.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},r.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},r.prototype.minFilter=function(t){var e=this.gl;this.bind(),this.mipmap?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR:e.NEAREST)},r.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},r.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},r.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},r.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},r.prototype.enableWrapClamp=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},r.prototype.enableWrapRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)},r.prototype.enableWrapMirrorRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.MIRRORED_REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.MIRRORED_REPEAT)},r.prototype.destroy=function(){this.gl.deleteTexture(this.texture)},r.fromSource=function(t,e,n){var i=new r(t);return i.premultiplyAlpha=n||!1,i.upload(e),i},r.fromData=function(t,e,n,i){var o=new r(t);return o.uploadData(e,n,i),o},t.exports=r},function(t,e){var r=function(t,e,r){var n=t.createShader(e);return t.shaderSource(n,r),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS)?n:(console.log(t.getShaderInfoLog(n)),null)};t.exports=function(t,e,n,i){var o=r(t,t.VERTEX_SHADER,e),a=r(t,t.FRAGMENT_SHADER,n),s=t.createProgram();if(t.attachShader(s,o),t.attachShader(s,a),i)for(var u in i)t.bindAttribLocation(s,i[u],u);return t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(s,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(s)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(s)),t.deleteProgram(s),s=null),t.deleteShader(o),t.deleteShader(a),s}},function(t,e,r){var n=r(28),i=r(46),o=function(t,e,r,n){gl.vertexAttribPointer(this.location,this.size,t||gl.FLOAT,e||!1,r||0,n||0)};t.exports=function(t,e){for(var r={},a=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),s=0;s<a;s++){var u=t.getActiveAttrib(e,s),l=n(t,u.type);r[u.name]={type:l,size:i(l),location:t.getAttribLocation(e,u.name),pointer:o}}return r}},function(t,e){var r={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};t.exports=function(t){return r[t]}},function(t,e,r){var n=r(28),i=r(48);t.exports=function(t,e){for(var r={},o=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),a=0;a<o;a++){var s=t.getActiveUniform(e,a),u=s.name.replace(/\[.*?\]/,""),l=n(t,s.type);r[u]={type:l,size:s.size,location:t.getUniformLocation(e,u),value:i(l,s.size)}}return r}},function(t,e){var r=function(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e};t.exports=function(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return r(2*e);case"bvec3":return r(3*e);case"bvec4":return r(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}}},function(t,e){t.exports=function(t,e){return"precision"!==t.substring(0,9)?"precision "+e+" float;\n"+t:t}},function(t,e){var r=function(t){return function(){return this.data[t].value}},n={float:function(t,e,r){t.uniform1f(e,r)},vec2:function(t,e,r){t.uniform2f(e,r[0],r[1])},vec3:function(t,e,r){t.uniform3f(e,r[0],r[1],r[2])},vec4:function(t,e,r){t.uniform4f(e,r[0],r[1],r[2],r[3])},int:function(t,e,r){t.uniform1i(e,r)},ivec2:function(t,e,r){t.uniform2i(e,r[0],r[1])},ivec3:function(t,e,r){t.uniform3i(e,r[0],r[1],r[2])},ivec4:function(t,e,r){t.uniform4i(e,r[0],r[1],r[2],r[3])},bool:function(t,e,r){t.uniform1i(e,r)},bvec2:function(t,e,r){t.uniform2i(e,r[0],r[1])},bvec3:function(t,e,r){t.uniform3i(e,r[0],r[1],r[2])},bvec4:function(t,e,r){t.uniform4i(e,r[0],r[1],r[2],r[3])},mat2:function(t,e,r){t.uniformMatrix2fv(e,!1,r)},mat3:function(t,e,r){t.uniformMatrix3fv(e,!1,r)},mat4:function(t,e,r){t.uniformMatrix4fv(e,!1,r)},sampler2D:function(t,e,r){t.uniform1i(e,r)}},i={float:function(t,e,r){t.uniform1fv(e,r)},vec2:function(t,e,r){t.uniform2fv(e,r)},vec3:function(t,e,r){t.uniform3fv(e,r)},vec4:function(t,e,r){t.uniform4fv(e,r)},int:function(t,e,r){t.uniform1iv(e,r)},ivec2:function(t,e,r){t.uniform2iv(e,r)},ivec3:function(t,e,r){t.uniform3iv(e,r)},ivec4:function(t,e,r){t.uniform4iv(e,r)},bool:function(t,e,r){t.uniform1iv(e,r)},bvec2:function(t,e,r){t.uniform2iv(e,r)},bvec3:function(t,e,r){t.uniform3iv(e,r)},bvec4:function(t,e,r){t.uniform4iv(e,r)},sampler2D:function(t,e,r){t.uniform1iv(e,r)}};function o(t,e){return function(r){this.data[t].value=r;var o=this.data[t].location;1===e.size?n[e.type](this.gl,o,r):i[e.type](this.gl,o,r)}}function a(t,e){for(var r=e,n=0;n<t.length-1;n++){var i=r[t[n]]||{data:{}};r[t[n]]=i,r=i}return r}t.exports=function(t,e){var n={data:{}};n.gl=t;for(var i=Object.keys(e),s=0;s<i.length;s++){var u=i[s],l=u.split("."),c=l[l.length-1],h=a(l,n),f=e[u];h.data[c]=f,h.gl=t,Object.defineProperty(h,c,{get:r(c),set:o(c,f)})}return n}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=h(r(11)),o=r(2),a=h(r(5)),s=h(r(52)),u=h(r(53)),l=h(r(29)),c=r(6);function h(t){return t&&t.__esModule?t:{default:t}}var f=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this)),n=a.default.TRANSFORM_MODE===o.TRANSFORM_MODE.STATIC?s.default:u.default;return r.tempDisplayObjectParent=null,r.transform=new n,r.alpha=1,r.visible=!0,r.renderable=!0,r.parent=null,r.worldAlpha=1,r.filterArea=null,r._filters=null,r._enabledFilters=null,r._bounds=new l.default,r._boundsID=0,r._lastBoundsID=-1,r._boundsRect=null,r._localBoundsRect=null,r._mask=null,r._destroyed=!1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds(),e||(this._boundsRect||(this._boundsRect=new c.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new c.Rectangle),t=this._localBoundsRect);var n=this.getBounds(!1,t);return this.parent=r,this.transform=e,n},e.prototype.toGlobal=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,r,n){return e&&(t=e.toGlobal(t,r,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},e.prototype.renderWebGL=function(t){},e.prototype.renderCanvas=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;return this.position.x=t,this.position.y=e,this.scale.x=r||1,this.scale.y=n||1,this.rotation=i,this.skew.x=o,this.skew.y=a,this.pivot.x=s,this.pivot.y=u,this},e.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},n(e,[{key:"_tempDisplayObjectParent",get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent}},{key:"x",get:function(){return this.position.x},set:function(t){this.transform.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.transform.position.y=t}},{key:"worldTransform",get:function(){return this.transform.worldTransform}},{key:"localTransform",get:function(){return this.transform.localTransform}},{key:"position",get:function(){return this.transform.position},set:function(t){this.transform.position.copy(t)}},{key:"scale",get:function(){return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},{key:"pivot",get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},{key:"skew",get:function(){return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},{key:"rotation",get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t}},{key:"worldVisible",get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},{key:"mask",get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0,this._mask.isMask=!1),this._mask=t,this._mask&&(this._mask.renderable=!1,this._mask.isMask=!0)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}]),e}(i.default);e.default=f,f.prototype.displayObjectUpdateTransform=f.prototype.updateTransform},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(6),a=r(31);var s=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.position=new o.ObservablePoint(r.onChange,r,0,0),r.scale=new o.ObservablePoint(r.onChange,r,1,1),r.pivot=new o.ObservablePoint(r.onChange,r,0,0),r.skew=new o.ObservablePoint(r.updateSkew,r,0,0),r._rotation=0,r._cx=1,r._sx=0,r._cy=0,r._sy=1,r._localID=0,r._currentLocalID=0,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x),this._localID++},e.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale._x,t.b=this._sx*this.scale._x,t.c=this._cy*this.scale._y,t.d=this._sy*this.scale._y,t.tx=this.position._x-(this.pivot._x*t.a+this.pivot._y*t.c),t.ty=this.position._y-(this.pivot._x*t.b+this.pivot._y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale._x,e.b=this._sx*this.scale._x,e.c=this._cy*this.scale._y,e.d=this._sy*this.scale._y,e.tx=this.position._x-(this.pivot._x*e.a+this.pivot._y*e.c),e.ty=this.position._y-(this.pivot._x*e.b+this.pivot._y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,n=this.worldTransform;n.a=e.a*r.a+e.b*r.c,n.b=e.a*r.b+e.b*r.d,n.c=e.c*r.a+e.d*r.c,n.d=e.c*r.b+e.d*r.d,n.tx=e.tx*r.a+e.ty*r.c+r.tx,n.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}},e.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},i(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())}}]),e}(((n=a)&&n.__esModule?n:{default:n}).default);e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(6),a=r(31);var s=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.position=new o.Point(0,0),r.scale=new o.Point(1,1),r.skew=new o.ObservablePoint(r.updateSkew,r,0,0),r.pivot=new o.Point(0,0),r._rotation=0,r._cx=1,r._sx=0,r._cy=0,r._sy=1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x)},e.prototype.updateLocalTransform=function(){var t=this.localTransform;t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d)},e.prototype.updateTransform=function(t){var e=this.localTransform;e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d);var r=t.worldTransform,n=this.worldTransform;n.a=e.a*r.a+e.b*r.c,n.b=e.a*r.b+e.b*r.d,n.c=e.c*r.a+e.d*r.c,n.d=e.c*r.b+e.d*r.d,n.tx=e.tx*r.a+e.ty*r.c+r.tx,n.ty=e.tx*r.b+e.ty*r.d+r.ty,this._worldID++},e.prototype.setFromMatrix=function(t){t.decompose(this)},i(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}(((n=a)&&n.__esModule?n:{default:n}).default);e.default=s},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location;if(0===t.indexOf("data:"))return"";e=e||window.location,a||(a=document.createElement("a"));a.href=t;var r=!(t=o.default.parse(a.href)).port&&""===e.port||t.port===e.port;if(t.hostname!==e.hostname||!r||t.protocol!==e.protocol)return"anonymous";return""};var n,i=r(55),o=(n=i)&&n.__esModule?n:{default:n};var a=void 0},function(t,e,r){"use strict";var n=r(116),i=r(117);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=m,e.resolve=function(t,e){return m(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?m(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=m(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),h=["%","/","?",";","#"].concat(c),f=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(118);function m(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o<t.indexOf("#")?"?":"#",l=t.split(s);l[0]=l[0].replace(/\\/g,"/");var m=t=l.join(s);if(m=m.trim(),!r&&1===t.split("#").length){var x=u.exec(m);if(x)return this.path=m,this.href=m,this.pathname=x[1],x[2]?(this.search=x[2],this.query=e?y.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var E=a.exec(m);if(E){var b=(E=E[0]).toLowerCase();this.protocol=b,m=m.substr(E.length)}if(r||E||m.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===m.substr(0,2);!T||E&&_[E]||(m=m.substr(2),this.slashes=!0)}if(!_[E]&&(T||E&&!g[E])){for(var R,O,S=-1,C=0;C<f.length;C++){-1!==(w=m.indexOf(f[C]))&&(-1===S||w<S)&&(S=w)}-1!==(O=-1===S?m.lastIndexOf("@"):m.lastIndexOf("@",S))&&(R=m.slice(0,O),m=m.slice(O+1),this.auth=decodeURIComponent(R)),S=-1;for(C=0;C<h.length;C++){var w;-1!==(w=m.indexOf(h[C]))&&(-1===S||w<S)&&(S=w)}-1===S&&(S=m.length),this.host=m.slice(0,S),m=m.slice(S),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var P=this.hostname.split(/\./),M=(C=0,P.length);C<M;C++){var I=P[C];if(I&&!I.match(d)){for(var D="",L=0,U=I.length;L<U;L++)I.charCodeAt(L)>127?D+="x":D+=I[L];if(!D.match(d)){var N=P.slice(0,C),F=P.slice(C+1),j=I.match(p);j&&(N.push(j[1]),F.unshift(j[2])),F.length&&(m="/"+F.join(".")+m),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=n.toASCII(this.hostname));var k=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+k,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==m[0]&&(m="/"+m))}if(!v[b])for(C=0,M=c.length;C<M;C++){var H=c[C];if(-1!==m.indexOf(H)){var W=encodeURIComponent(H);W===H&&(W=escape(H)),m=m.split(H).join(W)}}var G=m.indexOf("#");-1!==G&&(this.hash=m.substr(G),m=m.slice(0,G));var X=m.indexOf("?");if(-1!==X?(this.search=m.substr(X),this.query=m.substr(X+1),e&&(this.query=y.parse(this.query)),m=m.slice(0,X)):e&&(this.search="",this.query={}),m&&(this.pathname=m),g[b]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var z=this.search||"";this.path=k+z}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,a="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=y.stringify(this.query));var s=this.search||a&&"?"+a||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||g[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),e+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+n},o.prototype.resolve=function(t){return this.resolveObject(m(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),l=0;l<u.length;l++){var c=u[l];"protocol"!==c&&(r[c]=t[c])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!g[t.protocol]){for(var h=Object.keys(t),f=0;f<h.length;f++){var d=h[f];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||_[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var v=r.pathname||"",y=r.search||"";r.path=v+y}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var m=r.pathname&&"/"===r.pathname.charAt(0),x=t.host||t.pathname&&"/"===t.pathname.charAt(0),E=x||m||r.host&&t.pathname,b=E,T=r.pathname&&r.pathname.split("/")||[],R=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(R&&(r.hostname="",r.port=null,r.host&&(""===T[0]?T[0]=r.host:T.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),E=E&&(""===p[0]||""===T[0])),x)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,T=p;else if(p.length)T||(T=[]),T.pop(),T=T.concat(p),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(R)r.hostname=r.host=T.shift(),(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift());return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!T.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var O=T.slice(-1)[0],S=(r.host||t.host||T.length>1)&&("."===O||".."===O)||""===O,C=0,w=T.length;w>=0;w--)"."===(O=T[w])?T.splice(w,1):".."===O?(T.splice(w,1),C++):C&&(T.splice(w,1),C--);if(!E&&!b)for(;C--;C)T.unshift("..");!E||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),S&&"/"!==T.join("/").substr(-1)&&T.push("");var A,P=""===T[0]||T[0]&&"/"===T[0].charAt(0);R&&(r.hostname=r.host=P?"":T.length?T.shift():"",(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift()));return(E=E||r.host&&T.length)&&!P&&T.unshift(""),T.length?r.pathname=T.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=l(r(12)),o=r(4),a=r(35),s=r(2),u=l(r(54));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var f=function(t){function e(r,n){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(c(this,e),!r)throw new Error("No video source element specified.");(r.readyState===r.HAVE_ENOUGH_DATA||r.readyState===r.HAVE_FUTURE_DATA)&&r.width&&r.height&&(r.complete=!0);var o=h(this,t.call(this,r,n));return o.width=r.videoWidth,o.height=r.videoHeight,o._autoUpdate=!0,o._isAutoUpdating=!1,o.autoPlay=i,o.update=o.update.bind(o),o._onCanPlay=o._onCanPlay.bind(o),r.addEventListener("play",o._onPlayStart.bind(o)),r.addEventListener("pause",o._onPlayStop.bind(o)),o.hasLoaded=!1,o.__loaded=!1,o._isSourceReady()?o._onCanPlay():(r.addEventListener("canplay",o._onCanPlay),r.addEventListener("canplaythrough",o._onCanPlay)),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(a.shared.add(this.update,this,s.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(a.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.__loaded||(this.__loaded=!0,this.emit("loaded",this)),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.source.play())},e.prototype.destroy=function(){this._isAutoUpdating&&a.shared.remove(this.update,this),this.source&&this.source._pixiId&&(i.default.removeFromCache(this.source._pixiId),delete this.source._pixiId,this.source.pause(),this.source.src="",this.source.load()),t.prototype.destroy.call(this)},e.fromVideo=function(t,r,n){t._pixiId||(t._pixiId="video_"+(0,o.uid)());var a=o.BaseTextureCache[t._pixiId];return a||(a=new e(t,r,n),i.default.addToCache(a,t._pixiId)),a},e.fromUrl=function(t,r,n,i){var o=document.createElement("video");o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline","");var a=Array.isArray(t)?t[0].src||t[0]:t.src||t;if(void 0===n&&0!==a.indexOf("data:")?o.crossOrigin=(0,u.default)(a):n&&(o.crossOrigin="string"==typeof n?n:"anonymous"),Array.isArray(t))for(var s=0;s<t.length;++s)o.appendChild(d(t[s].src||t[s],t[s].mime));else o.appendChild(d(a,t.mime));return o.load(),e.fromVideo(o,r,i)},n(e,[{key:"autoUpdate",get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(a.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(a.shared.add(this.update,this,s.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0))}}]),e}(i.default);function d(t,e){if(!e){var r=t.split("?").shift().toLowerCase();e="video/"+r.substr(r.lastIndexOf(".")+1)}var n=document.createElement("source");return n.src=t,n.type=e,n}e.default=f,f.fromUrls=f.fromUrl},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(41),o=(n=i)&&n.__esModule?n:{default:n};var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}return t.prototype.set=function(t,e,r){var n=e.width,i=e.height;if(r){var a=t.width/2/n,s=t.height/2/i,u=t.x/n+a,l=t.y/i+s;r=o.default.add(r,o.default.NW),this.x0=u+a*o.default.uX(r),this.y0=l+s*o.default.uY(r),r=o.default.add(r,2),this.x1=u+a*o.default.uX(r),this.y1=l+s*o.default.uY(r),r=o.default.add(r,2),this.x2=u+a*o.default.uX(r),this.y2=l+s*o.default.uY(r),r=o.default.add(r,2),this.x3=u+a*o.default.uX(r),this.y3=l+s*o.default.uY(r)}else this.x0=t.x/n,this.y0=t.y/i,this.x1=(t.x+t.width)/n,this.y1=t.y/i,this.x2=(t.x+t.width)/n,this.y2=(t.y+t.height)/i,this.x3=t.x/n,this.y3=(t.y+t.height)/i;this.uvsUint32[0]=(65535&Math.round(65535*this.y0))<<16|65535&Math.round(65535*this.x0),this.uvsUint32[1]=(65535&Math.round(65535*this.y1))<<16|65535&Math.round(65535*this.x1),this.uvsUint32[2]=(65535&Math.round(65535*this.y2))<<16|65535&Math.round(65535*this.x2),this.uvsUint32[3]=(65535&Math.round(65535*this.y3))<<16|65535&Math.round(65535*this.x3)},t}();e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(4),o=r(6),a=r(2),s=h(r(5)),u=h(r(13)),l=h(r(36)),c=h(r(11));function h(t){return t&&t.__esModule?t:{default:t}}var f=new o.Matrix,d=function(t){function e(r,n,l,c){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var h=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return(0,i.sayHello)(r),"number"==typeof n&&(n=Object.assign({width:n,height:l||s.default.RENDER_OPTIONS.height},c)),n=Object.assign({},s.default.RENDER_OPTIONS,n),h.options=n,h.type=a.RENDERER_TYPE.UNKNOWN,h.screen=new o.Rectangle(0,0,n.width,n.height),h.view=n.view||document.createElement("canvas"),h.resolution=n.resolution||s.default.RESOLUTION,h.transparent=n.transparent,h.autoResize=n.autoResize||!1,h.blendModes=null,h.preserveDrawingBuffer=n.preserveDrawingBuffer,h.clearBeforeRender=n.clearBeforeRender,h.roundPixels=n.roundPixels,h._backgroundColor=0,h._backgroundColorRgba=[0,0,0,0],h._backgroundColorString="#000000",h.backgroundColor=n.backgroundColor||h._backgroundColor,h._tempDisplayObjectParent=new u.default,h._lastObjectRendered=h._tempDisplayObjectParent,h}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoResize&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},e.prototype.generateTexture=function(t,e,r,n){n=n||t.getLocalBounds();var i=l.default.create(0|n.width,0|n.height,e,r);return f.tx=-n.x,f.ty=-n.y,this.render(t,i,!1,f,!!t.parent),i},e.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=a.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},n(e,[{key:"width",get:function(){return this.view.width}},{key:"height",get:function(){return this.view.height}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=(0,i.hex2string)(t),(0,i.hex2rgb)(t,this._backgroundColorRgba)}}]),e}(c.default);e.default=d},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(12)),i=o(r(5));function o(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,o=arguments[2],u=arguments[3];a(this,e);var l=s(this,t.call(this,null,o));return l.resolution=u||i.default.RESOLUTION,l.width=Math.ceil(r),l.height=Math.ceil(n),l.realWidth=l.width*l.resolution,l.realHeight=l.height*l.resolution,l.scaleMode=void 0!==o?o:i.default.SCALE_MODE,l.hasLoaded=!0,l._glRenderTargets={},l._canvasRenderTarget=null,l.valid=!1,l}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.resize=function(t,e){t=Math.ceil(t),e=Math.ceil(e),t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.renderer=null},e}(n.default);e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(5),a=(n=o)&&n.__esModule?n:{default:n};var s=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=n||a.default.RESOLUTION,this.resize(e,r)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},i(t,[{key:"width",get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},{key:"height",get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}]),t}();e.default=s},function(t,e,r){"use strict";function n(t){var e=document.createElement("canvas");e.width=6,e.height=1;var r=e.getContext("2d");return r.fillStyle=t,r.fillRect(0,0,6,1),e}e.__esModule=!0,e.default=function(){if("undefined"==typeof document)return!1;var t=n("#ff00ff"),e=n("#ffff00"),r=document.createElement("canvas");r.width=6,r.height=1;var i=r.getContext("2d");i.globalCompositeOperation="multiply",i.drawImage(t,0,0),i.drawImage(e,2,0);var o=i.getImageData(2,0,1,1);if(!o)return!1;var a=o.data;return 255===a[0]&&0===a[1]&&0===a[2]}},function(t,e,r){"use strict";e.__esModule=!0;var n=a(r(64)),i=r(6),o=(r(9),a(r(65)));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=new i.Matrix,o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n\n original *= (masky.r * masky.a * alpha * clip);\n\n gl_FragColor = original;\n}\n"));return r.renderable=!1,o.maskSprite=r,o.maskMatrix=n,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.apply=function(t,e,r,n){var i=this.maskSprite,a=this.maskSprite.texture;a.valid&&(a.transform||(a.transform=new o.default(a,0)),a.transform.update(),this.uniforms.mask=a,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,i).prepend(a.transform.mapCoord),this.uniforms.alpha=i.worldAlpha,this.uniforms.maskClamp=a.transform.uClampFrame,t.applyFilter(this,e,r,n))},e}(n.default);e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=u(r(128)),o=r(4),a=r(2),s=u(r(5));function u(t){return t&&t.__esModule?t:{default:t}}var l={},c=function(){function t(e,r,n){for(var u in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=r||t.defaultFragmentSrc,this._blendMode=a.BLEND_MODES.NORMAL,this.uniformData=n||(0,i.default)(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={},this.uniformData)this.uniforms[u]=this.uniformData[u].value,this.uniformData[u].type&&(this.uniformData[u].type=this.uniformData[u].type.toLowerCase());this.glShaders={},l[this.vertexSrc+this.fragmentSrc]||(l[this.vertexSrc+this.fragmentSrc]=(0,o.uid)()),this.glShaderKey=l[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=s.default.FILTER_RESOLUTION,this.enabled=!0,this.autoFit=!0}return t.prototype.apply=function(t,e,r,n,i){t.applyFilter(this,e,r,n)},n(t,[{key:"blendMode",get:function(){return this._blendMode},set:function(t){this._blendMode=t}}],[{key:"defaultVertexSrc",get:function(){return["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 projectionMatrix;","uniform mat3 filterMatrix;","varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;"," vTextureCoord = aTextureCoord ;","}"].join("\n")}},{key:"defaultFragmentSrc",get:function(){return["varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","uniform sampler2D uSampler;","uniform sampler2D filterSampler;","void main(void){"," vec4 masky = texture2D(filterSampler, vFilterCoord);"," vec4 sample = texture2D(uSampler, vTextureCoord);"," vec4 color;"," if(mod(vFilterCoord.x, 1.0) > 0.5)"," {"," color = vec4(1.0, 0.0, 0.0, 1.0);"," }"," else"," {"," color = vec4(0.0, 1.0, 0.0, 1.0);"," }"," gl_FragColor = mix(sample, masky, 0.5);"," gl_FragColor *= sample.a;","}"].join("\n")}}]),t}();e.default=c},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(26),a=(n=o)&&n.__esModule?n:{default:n};var s=new a.default,u=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._texture=e,this.mapCoord=new a.default,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._lastTextureID=-1,this.clampOffset=0,this.clampMargin=void 0===r?.5:r}return t.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var r=this.mapCoord,n=0;n<t.length;n+=2){var i=t[n],o=t[n+1];e[n]=i*r.a+o*r.c+r.tx,e[n+1]=i*r.b+o*r.d+r.ty}return e},t.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._lastTextureID===e._updateID)return!1;this._lastTextureID=e._updateID;var r=e._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var n=e.orig,i=e.trim;i&&(s.set(n.width/i.width,0,0,n.height/i.height,-i.x/i.width,-i.y/i.height),this.mapCoord.append(s));var o=e.baseTexture,a=this.uClampFrame,u=this.clampMargin/o.resolution,l=this.clampOffset;return a[0]=(e._frame.x+u+l)/o.width,a[1]=(e._frame.y+u+l)/o.height,a[2]=(e._frame.x+e._frame.width-u+l)/o.width,a[3]=(e._frame.y+e._frame.height-u+l)/o.height,this.uClampOffset[0]=l/o.realWidth,this.uClampOffset[1]=l/o.realHeight,!0},i(t,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture=t,this._lastTextureID=-1}}]),t}();e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(7)),i=o(r(37));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.interleaved=new Float32Array(16);for(var o=0;o<4;o++)this.interleaved[4*o]=this.vertices[2*o],this.interleaved[4*o+1]=this.vertices[2*o+1],this.interleaved[4*o+2]=this.uvs[2*o],this.interleaved[4*o+3]=this.uvs[2*o+1];this.indices=(0,i.default)(1),this.vertexBuffer=n.default.GLBuffer.createVertexBuffer(e,this.interleaved,e.STATIC_DRAW),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.vao=new n.default.VertexArrayObject(e,r)}return t.prototype.initVao=function(t){this.vao.clear().addIndex(this.indexBuffer).addAttribute(this.vertexBuffer,t.attributes.aVertexPosition,this.gl.FLOAT,!1,16,0).addAttribute(this.vertexBuffer,t.attributes.aTextureCoord,this.gl.FLOAT,!1,16,8)},t.prototype.map=function(t,e){var r=0,n=0;return this.uvs[0]=r,this.uvs[1]=n,this.uvs[2]=r+e.width/t.width,this.uvs[3]=n,this.uvs[4]=r+e.width/t.width,this.uvs[5]=n+e.height/t.height,this.uvs[6]=r,this.uvs[7]=n+e.height/t.height,r=e.x,n=e.y,this.vertices[0]=r,this.vertices[1]=n,this.vertices[2]=r+e.width,this.vertices[3]=n,this.vertices[4]=r+e.width,this.vertices[5]=n+e.height,this.vertices[6]=r,this.vertices[7]=n+e.height,this},t.prototype.upload=function(){for(var t=0;t<4;t++)this.interleaved[4*t]=this.vertices[2*t],this.interleaved[4*t+1]=this.vertices[2*t+1],this.interleaved[4*t+2]=this.uvs[2*t],this.interleaved[4*t+3]=this.uvs[2*t+1];return this.vertexBuffer.upload(this.interleaved),this},t.prototype.destroy=function(){var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t}();e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(2),o=r(4);var a={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:i.TEXT_GRADIENT.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},s=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.styleID=0,this.reset(),h(this,e,e)}return t.prototype.clone=function(){var e={};return h(e,this,a),new t(e)},t.prototype.reset=function(){h(this,a,a)},t.prototype.toFontString=function(){var t="number"==typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var r=e.length-1;r>=0;r--){var n=e[r].trim();!/([\"\'])[^\'\"]+\1/.test(n)&&s.indexOf(n)<0&&(n='"'+n+'"'),e[r]=n}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},n(t,[{key:"align",get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)}},{key:"breakWords",get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}},{key:"dropShadow",get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}},{key:"dropShadowAlpha",get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)}},{key:"dropShadowAngle",get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}},{key:"dropShadowBlur",get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}},{key:"dropShadowColor",get:function(){return this._dropShadowColor},set:function(t){var e=c(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}},{key:"dropShadowDistance",get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}},{key:"fill",get:function(){return this._fill},set:function(t){var e=c(t);this._fill!==e&&(this._fill=e,this.styleID++)}},{key:"fillGradientType",get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}},{key:"fillGradientStops",get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0})(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)}},{key:"fontFamily",get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}},{key:"fontSize",get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}},{key:"fontStyle",get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}},{key:"fontVariant",get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)}},{key:"leading",get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=t,this.styleID++)}},{key:"lineJoin",get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)}},{key:"miterLimit",get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)}},{key:"padding",get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)}},{key:"stroke",get:function(){return this._stroke},set:function(t){var e=c(t);this._stroke!==e&&(this._stroke=e,this.styleID++)}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)}},{key:"textBaseline",get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)}},{key:"trim",get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)}},{key:"whiteSpace",get:function(){return this._whiteSpace},set:function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)}},{key:"wordWrap",get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)}},{key:"wordWrapWidth",get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)}}]),t}();function l(t){return"number"==typeof t?(0,o.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function c(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=l(t[e]);return t}return l(t)}function h(t,e,r){for(var n in r)Array.isArray(e[n])?t[n]=e[n].slice():t[n]=e[n]}e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e,r,n,i,o,a,s,u,l){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.text=e,this.style=r,this.width=n,this.height=i,this.lines=o,this.lineWidths=a,this.lineHeight=s,this.maxLineWidth=u,this.fontProperties=l}return t.measureText=function(e,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t._canvas;n=null==n?r.wordWrap:n;var o=r.toFontString(),a=t.measureFont(o),s=i.getContext("2d");s.font=o;for(var u=n?t.wordWrap(e,r,i):e,l=u.split(/(?:\r\n|\r|\n)/),c=new Array(l.length),h=0,f=0;f<l.length;f++){var d=s.measureText(l[f]).width+(l[f].length-1)*r.letterSpacing;c[f]=d,h=Math.max(h,d)}var p=h+r.strokeThickness;r.dropShadow&&(p+=r.dropShadowDistance);var v=r.lineHeight||a.fontSize+r.strokeThickness,_=Math.max(v,a.fontSize+r.strokeThickness)+(l.length-1)*(v+r.leading);return r.dropShadow&&(_+=r.dropShadowDistance),new t(e,r,p,_,l,c,v+r.leading,h,a)},t.wordWrap=function(e,r){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t._canvas,i=n.getContext("2d"),o=0,a="",s="",u={},l=r.letterSpacing,c=r.whiteSpace,h=t.collapseSpaces(c),f=t.collapseNewlines(c),d=!h,p=r.wordWrapWidth+l,v=t.tokenize(e),_=0;_<v.length;_++){var g=v[_];if(t.isNewline(g)){if(!f){s+=t.addLine(a),d=!h,a="",o=0;continue}g=" "}if(h){var y=t.isBreakingSpace(g),m=t.isBreakingSpace(a[a.length-1]);if(y&&m)continue}var x=t.getFromCache(g,l,u,i);if(x>p)if(""!==a&&(s+=t.addLine(a),a="",o=0),t.canBreakWords(g,r.breakWords))for(var E=g.split(""),b=0;b<E.length;b++){for(var T=E[b],R=1;E[b+R];){var O=E[b+R],S=T[T.length-1];if(t.canBreakChars(S,O,g,b,r.breakWords))break;T+=O,R++}b+=T.length-1;var C=t.getFromCache(T,l,u,i);C+o>p&&(s+=t.addLine(a),d=!1,a="",o=0),a+=T,o+=C}else{a.length>0&&(s+=t.addLine(a),a="",o=0);var w=_===v.length-1;s+=t.addLine(g,!w),d=!1,a="",o=0}else x+o>p&&(d=!1,s+=t.addLine(a),a="",o=0),(a.length>0||!t.isBreakingSpace(g)||d)&&(a+=g,o+=x)}return s+=t.addLine(a,!1)},t.addLine=function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=t.trimRight(e),e=r?e+"\n":e},t.getFromCache=function(t,e,r,n){var i=r[t];if(void 0===i){var o=t.length*e;i=n.measureText(t).width+o,r[t]=i}return i},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!=typeof e)return"";for(var r=e.length-1;r>=0;r--){var n=e[r];if(!t.isBreakingSpace(n))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"==typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e){return"string"==typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],n="";if("string"!=typeof e)return r;for(var i=0;i<e.length;i++){var o=e[i];t.isBreakingSpace(o)||t.isNewline(o)?(""!==n&&(r.push(n),n=""),r.push(o)):n+=o}return""!==n&&r.push(n),r},t.canBreakWords=function(t,e){return e},t.canBreakChars=function(t,e,r,n,i){return!0},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var r={},n=t._canvas,i=t._context;i.font=e;var o=t.METRICS_STRING+t.BASELINE_SYMBOL,a=Math.ceil(i.measureText(o).width),s=Math.ceil(i.measureText(t.BASELINE_SYMBOL).width),u=2*s;s=s*t.BASELINE_MULTIPLIER|0,n.width=a,n.height=u,i.fillStyle="#f00",i.fillRect(0,0,a,u),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,s);var l=i.getImageData(0,0,a,u).data,c=l.length,h=4*a,f=0,d=0,p=!1;for(f=0;f<s;++f){for(var v=0;v<h;v+=4)if(255!==l[d+v]){p=!0;break}if(p)break;d+=h}for(r.ascent=s-f,d=c-h,p=!1,f=u;f>s;--f){for(var _=0;_<h;_+=4)if(255!==l[d+_]){p=!0;break}if(p)break;d-=h}return r.descent=f-s,r.fontSize=r.ascent+r.descent,t._fonts[e]=r,r},t.clearMetrics=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e?delete t._fonts[e]:t._fonts={}},t}();e.default=n;var i=document.createElement("canvas");i.width=i.height=10,n._canvas=i,n._context=i.getContext("2d"),n._fonts={},n.METRICS_STRING="|Éq",n.BASELINE_SYMBOL="M",n.BASELINE_MULTIPLIER=1.4,n._newlines=[10,13],n._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e,r,n,i,o,a,s,u,l){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.lineWidth=e,this.lineAlignment=l,this.nativeLines=s,this.lineColor=r,this.lineAlpha=n,this._lineTint=r,this.fillColor=i,this.fillAlpha=o,this._fillTint=i,this.fill=a,this.holes=[],this.shape=u,this.type=u.type}return t.prototype.clone=function(){return new t(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.nativeLines,this.shape,this.lineAlignment)},t.prototype.addHole=function(t){this.holes.push(t)},t.prototype.destroy=function(){this.shape=null,this.holes=null},t}();e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(71),o=l(r(13)),a=r(35),s=l(r(5)),u=r(2);function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(e,r,n,u,l){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"number"==typeof e&&(e=Object.assign({width:e,height:r||s.default.RENDER_OPTIONS.height,forceCanvas:!!u,sharedTicker:!!l},n)),this._options=e=Object.assign({autoStart:!0,sharedTicker:!1,forceCanvas:!1,sharedLoader:!1},e),this.renderer=(0,i.autoDetectRenderer)(e),this.stage=new o.default,this._ticker=null,this.ticker=e.sharedTicker?a.shared:new a.Ticker,e.autoStart&&this.start()}return t.prototype.render=function(){this.renderer.render(this.stage)},t.prototype.stop=function(){this._ticker.stop()},t.prototype.start=function(){this._ticker.start()},t.prototype.destroy=function(t,e){if(this._ticker){var r=this._ticker;this.ticker=null,r.destroy()}this.stage.destroy(e),this.stage=null,this.renderer.destroy(t),this.renderer=null,this._options=null},n(t,[{key:"ticker",set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,u.UPDATE_PRIORITY.LOW)},get:function(){return this._ticker}},{key:"view",get:function(){return this.renderer.view}},{key:"screen",get:function(){return this.renderer.screen}}]),t}();e.default=c},function(t,e,r){"use strict";e.__esModule=!0,e.autoDetectRenderer=function(t,e,r,a){var s=t&&t.forceCanvas;void 0!==a&&(s=a);if(!s&&n.isWebGLSupported())return new o.default(t,e,r);return new i.default(t,e,r)};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(4)),i=a(r(14)),o=a(r(22));function a(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";e.__esModule=!0,e.default={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1}},function(t,e,r){"use strict";e.__esModule=!0,e.BitmapText=e.TilingSpriteRenderer=e.TilingSprite=e.AnimatedSprite=void 0;var n=r(161);Object.defineProperty(e,"AnimatedSprite",{enumerable:!0,get:function(){return s(n).default}});var i=r(162);Object.defineProperty(e,"TilingSprite",{enumerable:!0,get:function(){return s(i).default}});var o=r(163);Object.defineProperty(e,"TilingSpriteRenderer",{enumerable:!0,get:function(){return s(o).default}});var a=r(164);function s(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"BitmapText",{enumerable:!0,get:function(){return s(a).default}}),r(165),r(166),r(167)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=u(r(75)),a=u(r(76)),s=u(r(77));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(r,n,s,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),u=u||5;var l=(0,o.default)(u,!0),c=(0,a.default)(u),h=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,l,c));return h.resolution=s||i.settings.RESOLUTION,h._quality=0,h.quality=n||4,h.strength=r||8,h.firstRun=!0,h}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.apply=function(t,e,r,n){if(this.firstRun){var i=t.renderer.gl,u=(0,s.default)(i);this.vertexSrc=(0,o.default)(u,!0),this.fragmentSrc=(0,a.default)(u),this.firstRun=!1}if(this.uniforms.strength=1/r.size.width*(r.size.width/e.size.width),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,n);else{for(var l=t.getRenderTarget(!0),c=e,h=l,f=0;f<this.passes-1;f++){t.applyFilter(this,c,h,!0);var d=h;h=c,c=d}t.applyFilter(this,c,r,n),t.returnRenderTarget(l)}},n(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(i.Filter);e.default=l},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){var r=Math.ceil(t/2),i=n,o="",a=void 0;a=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;s<t;s++){var u=a.replace("%index%",s);u=u.replace("%sampleIndex%",s-(r-1)+".0"),o+=u,o+="\n"}return i=(i=i.replace("%blur%",o)).replace("%size%",t)};var n=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform float strength;","uniform mat3 projectionMatrix;","varying vec2 vBlurTexCoords[%size%];","void main(void)","{","gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);","%blur%","}"].join("\n")},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){for(var e=n[t],r=e.length,o=i,a="",s=void 0,u=0;u<t;u++){var l="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",u);s=u,u>=r&&(s=t-u-1),l=l.replace("%value%",e[s]),a+=l,a+="\n"}return o=(o=o.replace("%blur%",a)).replace("%size%",t)};var n={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},i=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n")},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=t.getParameter(t.MAX_VARYING_VECTORS),r=15;for(;r>e;)r-=2;return r}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=u(r(75)),a=u(r(76)),s=u(r(77));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(r,n,s,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),u=u||5;var l=(0,o.default)(u,!1),c=(0,a.default)(u),h=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,l,c));return h.resolution=s||i.settings.RESOLUTION,h._quality=0,h.quality=n||4,h.strength=r||8,h.firstRun=!0,h}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.apply=function(t,e,r,n){if(this.firstRun){var i=t.renderer.gl,u=(0,s.default)(i);this.vertexSrc=(0,o.default)(u,!1),this.fragmentSrc=(0,a.default)(u),this.firstRun=!1}if(this.uniforms.strength=1/r.size.height*(r.size.height/e.size.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,n);else{for(var l=t.getRenderTarget(!0),c=e,h=l,f=0;f<this.passes-1;f++){t.applyFilter(this,c,h,!0);var d=h;h=c,c=d}t.applyFilter(this,c,r,n),t.returnRenderTarget(l)}},n(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(i.Filter);e.default=l},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.global=new i.Point,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return t.prototype.getLocalPosition=function(t,e,r){return t.worldTransform.applyInverse(r||this.global,e)},t.prototype.copyEvent=function(t){t.isPrimary&&(this.isPrimary=!0),this.button=t.button,this.buttons=Number.isInteger(t.buttons)?t.buttons:t.which,this.width=t.width,this.height=t.height,this.tiltX=t.tiltX,this.tiltY=t.tiltY,this.pointerType=t.pointerType,this.pressure=t.pressure,this.rotationAngle=t.rotationAngle,this.twist=t.twist||0,this.tangentialPressure=t.tangentialPressure||0},t.prototype.reset=function(){this.isPrimary=!1},n(t,[{key:"pointerId",get:function(){return this.identifier}}]),t}();e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.stopped=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0},t.prototype.reset=function(){this.stopped=!1,this.currentTarget=null,this.target=null},t}();e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},n(t,[{key:"pointerId",get:function(){return this._pointerId}},{key:"flags",get:function(){return this._flags},set:function(t){this._flags=t}},{key:"none",get:function(){return this._flags===this.constructor.FLAGS.NONE}},{key:"over",get:function(){return 0!=(this._flags&this.constructor.FLAGS.OVER)},set:function(t){this._doSet(this.constructor.FLAGS.OVER,t)}},{key:"rightDown",get:function(){return 0!=(this._flags&this.constructor.FLAGS.RIGHT_DOWN)},set:function(t){this._doSet(this.constructor.FLAGS.RIGHT_DOWN,t)}},{key:"leftDown",get:function(){return 0!=(this._flags&this.constructor.FLAGS.LEFT_DOWN)},set:function(t){this._doSet(this.constructor.FLAGS.LEFT_DOWN,t)}}]),t}();e.default=i,i.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4})},function(t,e,r){"use strict";e.__esModule=!0,e.default={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0}},function(t,e,r){"use strict";e.__esModule=!0,e.parse=a,e.default=function(){return function(t,e){if(t.data&&t.type===i.Resource.TYPE.XML)if(0!==t.data.getElementsByTagName("page").length&&0!==t.data.getElementsByTagName("info").length&&null!==t.data.getElementsByTagName("info")[0].getAttribute("face")){var r=t.isDataUrl?"":n.dirname(t.url);t.isDataUrl&&("."===r&&(r=""),this.baseUrl&&r&&"/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(r+="/")),(r=r.replace(this.baseUrl,""))&&"/"!==r.charAt(r.length-1)&&(r+="/");for(var o=t.data.getElementsByTagName("page"),s={},u=function(r){s[r.metadata.pageFile]=r.texture,Object.keys(s).length===o.length&&(a(t,s),e())},l=0;l<o.length;++l){var c=o[l].getAttribute("file"),h=r+c,f=!1;for(var d in this.resources){var p=this.resources[d];if(p.url===h){p.metadata.pageFile=c,p.texture?u(p):p.onAfterMiddleware.add(u),f=!0;break}}if(!f){var v={crossOrigin:t.crossOrigin,loadType:i.Resource.LOAD_TYPE.IMAGE,metadata:Object.assign({pageFile:c},t.metadata.imageMetadata),parentResource:t};this.add(h,v,u)}}}else e();else e()}};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(9)),i=r(17),o=r(73);function a(t,e){t.bitmapFont=o.BitmapText.registerFont(t.data,e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(e,r,n){void 0===r&&(r=!1),i(this,t),this._fn=e,this._once=r,this._thisArg=n,this._next=this._prev=this._owner=null}return n(t,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),t}();function a(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var s=function(){function t(){i(this,t),this._head=this._tail=void 0}return n(t,[{key:"handlers",value:function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=this._head;if(t)return!!e;for(var r=[];e;)r.push(e),e=e._next;return r}},{key:"has",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function(){var t=this._head;if(!t)return!1;for(;t;)t._once&&this.detach(t),t._fn.apply(t._thisArg,arguments),t=t._next;return!0}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return a(this,new o(t,!1,e))}},{key:"once",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return a(this,new o(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return t._owner!==this||(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null),this}},{key:"detachAll",value:function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this}}]),t}();s.MiniSignalBinding=o,e.default=s,t.exports=e.default},function(t,e,r){"use strict";t.exports=(t,e={})=>{if(!t)return;const r={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?))?((((?:[^?#/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#/]*\.[^?#/.]+(?:[?#]|$)))*\/?)?([^?#/]*))(?:\?([^#]*))?(?:#(.*))?)/}},n=r.parser[e.strictMode?"strict":"loose"].exec(t),i={};let o=14;for(;o--;)i[r.key[o]]=n[o]||"";return i[r.q.name]={},i[r.key[12]].replace(r.q.parser,(function(t,e,n){e&&(i[r.q.name][e]=n)})),i}},function(t,e,r){"use strict";function n(){}function i(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}e.__esModule=!0,e.eachSeries=function(t,e,r,n){var i=0,o=t.length;!function a(s){s||i===o?r&&r(s):n?setTimeout((function(){e(t[i++],a)}),1):e(t[i++],a)}()},e.queue=function(t,e){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var r=0,o={_tasks:[],concurrency:e,saturated:n,unsaturated:n,buffer:e/4,empty:n,drain:n,error:n,started:!1,paused:!1,push:function(t,e){a(t,!1,e)},kill:function(){r=0,o.drain=n,o.started=!1,o._tasks=[]},unshift:function(t,e){a(t,!0,e)},process:function(){for(;!o.paused&&r<o.concurrency&&o._tasks.length;){var e=o._tasks.shift();0===o._tasks.length&&o.empty(),(r+=1)===o.concurrency&&o.saturated(),t(e.data,i(s(e)))}},length:function(){return o._tasks.length},running:function(){return r},idle:function(){return o._tasks.length+r===0},pause:function(){!0!==o.paused&&(o.paused=!0)},resume:function(){if(!1!==o.paused){o.paused=!1;for(var t=1;t<=o.concurrency;t++)o.process()}}};function a(t,e,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(o.started=!0,null==t&&o.idle())setTimeout((function(){return o.drain()}),1);else{var i={data:t,callback:"function"==typeof r?r:n};e?o._tasks.unshift(i):o._tasks.push(i),setTimeout((function(){return o.process()}),1)}}function s(t){return function(){r-=1,t.callback.apply(t,arguments),null!=arguments[0]&&o.error(arguments[0],t.data),r<=o.concurrency-o.buffer&&o.unsaturated(),o.idle()&&o.drain(),o.process()}}return o}},function(t,e,r){"use strict";e.__esModule=!0,e.encodeBinary=n;function n(t){for(var e="",r=0;r<t.length;){for(var n=[0,0,0],i=[0,0,0,0],o=0;o<n.length;++o)r<t.length?n[o]=255&t.charCodeAt(r++):n[o]=0;switch(i[0]=n[0]>>2,i[1]=(3&n[0])<<4|n[1]>>4,i[2]=(15&n[1])<<2|n[2]>>6,i[3]=63&n[2],r-(t.length-1)){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64}for(var a=0;a<i.length;++a)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(i[a])}return e}t.exports.default=n},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){return function(t,e){var r=t.name+"_image";if(t.data&&t.type===i.Resource.TYPE.JSON&&t.data.frames&&!this.resources[r]){var n={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata,parentResource:t},o=u(t,this.baseUrl);this.add(r,o,n,(function(r){if(r.error)e(r.error);else{var n=new s.Spritesheet(r.texture.baseTexture,t.data,t.url);n.parse((function(){t.spritesheet=n,t.textures=n.textures,e()}))}}))}else e()}},e.getResourcePath=u;var n,i=r(17),o=r(55),a=(n=o)&&n.__esModule?n:{default:n},s=r(3);function u(t,e){return t.isDataUrl?t.data.meta.image:a.default.resolve(t.url.replace(e,""),t.data.meta.image)}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){return function(t,e){t.data&&t.type===i.Resource.TYPE.IMAGE&&(t.texture=a.default.fromLoader(t.data,t.url,t.name)),e()}};var n,i=r(17),o=r(10),a=(n=o)&&n.__esModule?n:{default:n}},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(18),o=(n=i)&&n.__esModule?n:{default:n};var a=function(t){function e(r,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return a._ready=!0,a.verticesX=n||10,a.verticesY=i||10,a.drawMode=o.default.DRAW_MODES.TRIANGLES,a.refresh(),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._refresh=function(){for(var t=this._texture,e=this.verticesX*this.verticesY,r=[],n=[],i=[],o=this.verticesX-1,a=this.verticesY-1,s=t.width/o,u=t.height/a,l=0;l<e;l++){var c=l%this.verticesX,h=l/this.verticesX|0;r.push(c*s,h*u),n.push(c/o,h/a)}for(var f=o*a,d=0;d<f;d++){var p=d%o,v=d/o|0,_=v*this.verticesX+p,g=v*this.verticesX+p+1,y=(v+1)*this.verticesX+p,m=(v+1)*this.verticesX+p+1;i.push(_,g,y),i.push(g,m,y)}this.vertices=new Float32Array(r),this.uvs=new Float32Array(n),this.colors=new Float32Array([]),this.indices=new Uint16Array(i),this.dirty++,this.indexDirty++,this.multiplyUvs()},e.prototype._onTextureUpdate=function(){o.default.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},e}(o.default);e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.maxItemsPerFrame=e,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();e.default=n},function(t,e){var r={utf8:{stringToBytes:function(t){return r.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(r.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}};t.exports=r},function(t,e,r){var n,i,o,a,s;n=r(196),i=r(92).utf8,o=r(197),a=r(92).bin,(s=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?a.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var r=n.bytesToWords(t),u=8*t.length,l=1732584193,c=-271733879,h=-1732584194,f=271733878,d=0;d<r.length;d++)r[d]=16711935&(r[d]<<8|r[d]>>>24)|4278255360&(r[d]<<24|r[d]>>>8);r[u>>>5]|=128<<u%32,r[14+(u+64>>>9<<4)]=u;var p=s._ff,v=s._gg,_=s._hh,g=s._ii;for(d=0;d<r.length;d+=16){var y=l,m=c,x=h,E=f;l=p(l,c,h,f,r[d+0],7,-680876936),f=p(f,l,c,h,r[d+1],12,-389564586),h=p(h,f,l,c,r[d+2],17,606105819),c=p(c,h,f,l,r[d+3],22,-1044525330),l=p(l,c,h,f,r[d+4],7,-176418897),f=p(f,l,c,h,r[d+5],12,1200080426),h=p(h,f,l,c,r[d+6],17,-1473231341),c=p(c,h,f,l,r[d+7],22,-45705983),l=p(l,c,h,f,r[d+8],7,1770035416),f=p(f,l,c,h,r[d+9],12,-1958414417),h=p(h,f,l,c,r[d+10],17,-42063),c=p(c,h,f,l,r[d+11],22,-1990404162),l=p(l,c,h,f,r[d+12],7,1804603682),f=p(f,l,c,h,r[d+13],12,-40341101),h=p(h,f,l,c,r[d+14],17,-1502002290),l=v(l,c=p(c,h,f,l,r[d+15],22,1236535329),h,f,r[d+1],5,-165796510),f=v(f,l,c,h,r[d+6],9,-1069501632),h=v(h,f,l,c,r[d+11],14,643717713),c=v(c,h,f,l,r[d+0],20,-373897302),l=v(l,c,h,f,r[d+5],5,-701558691),f=v(f,l,c,h,r[d+10],9,38016083),h=v(h,f,l,c,r[d+15],14,-660478335),c=v(c,h,f,l,r[d+4],20,-405537848),l=v(l,c,h,f,r[d+9],5,568446438),f=v(f,l,c,h,r[d+14],9,-1019803690),h=v(h,f,l,c,r[d+3],14,-187363961),c=v(c,h,f,l,r[d+8],20,1163531501),l=v(l,c,h,f,r[d+13],5,-1444681467),f=v(f,l,c,h,r[d+2],9,-51403784),h=v(h,f,l,c,r[d+7],14,1735328473),l=_(l,c=v(c,h,f,l,r[d+12],20,-1926607734),h,f,r[d+5],4,-378558),f=_(f,l,c,h,r[d+8],11,-2022574463),h=_(h,f,l,c,r[d+11],16,1839030562),c=_(c,h,f,l,r[d+14],23,-35309556),l=_(l,c,h,f,r[d+1],4,-1530992060),f=_(f,l,c,h,r[d+4],11,1272893353),h=_(h,f,l,c,r[d+7],16,-155497632),c=_(c,h,f,l,r[d+10],23,-1094730640),l=_(l,c,h,f,r[d+13],4,681279174),f=_(f,l,c,h,r[d+0],11,-358537222),h=_(h,f,l,c,r[d+3],16,-722521979),c=_(c,h,f,l,r[d+6],23,76029189),l=_(l,c,h,f,r[d+9],4,-640364487),f=_(f,l,c,h,r[d+12],11,-421815835),h=_(h,f,l,c,r[d+15],16,530742520),l=g(l,c=_(c,h,f,l,r[d+2],23,-995338651),h,f,r[d+0],6,-198630844),f=g(f,l,c,h,r[d+7],10,1126891415),h=g(h,f,l,c,r[d+14],15,-1416354905),c=g(c,h,f,l,r[d+5],21,-57434055),l=g(l,c,h,f,r[d+12],6,1700485571),f=g(f,l,c,h,r[d+3],10,-1894986606),h=g(h,f,l,c,r[d+10],15,-1051523),c=g(c,h,f,l,r[d+1],21,-2054922799),l=g(l,c,h,f,r[d+8],6,1873313359),f=g(f,l,c,h,r[d+15],10,-30611744),h=g(h,f,l,c,r[d+6],15,-1560198380),c=g(c,h,f,l,r[d+13],21,1309151649),l=g(l,c,h,f,r[d+4],6,-145523070),f=g(f,l,c,h,r[d+11],10,-1120210379),h=g(h,f,l,c,r[d+2],15,718787259),c=g(c,h,f,l,r[d+9],21,-343485551),l=l+y>>>0,c=c+m>>>0,h=h+x>>>0,f=f+E>>>0}return n.endian([l,c,h,f])})._ff=function(t,e,r,n,i,o,a){var s=t+(e&r|~e&n)+(i>>>0)+a;return(s<<o|s>>>32-o)+e},s._gg=function(t,e,r,n,i,o,a){var s=t+(e&n|r&~n)+(i>>>0)+a;return(s<<o|s>>>32-o)+e},s._hh=function(t,e,r,n,i,o,a){var s=t+(e^r^n)+(i>>>0)+a;return(s<<o|s>>>32-o)+e},s._ii=function(t,e,r,n,i,o,a){var s=t+(r^(e|~n))+(i>>>0)+a;return(s<<o|s>>>32-o)+e},s._blocksize=16,s._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);var r=n.wordsToBytes(s(t,e));return e&&e.asBytes?r:e&&e.asString?a.bytesToString(r):n.bytesToHex(r)}},function(t,e,r){"use strict";r(95),r(97),r(98),r(99),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},function(t,e,r){"use strict";var n,i=r(96),o=(n=i)&&n.__esModule?n:{default:n};Object.assign||(Object.assign=o.default)},function(t,e,r){"use strict";
|
|
33
10
|
/*
|
|
34
11
|
object-assign
|
|
35
12
|
(c) Sindre Sorhus
|
|
36
13
|
@license MIT
|
|
37
|
-
*/var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var l in r=Object(arguments[u]))i.call(r,l)&&(s[l]=r[l]);if(n){a=n(r);for(var c=0;c<a.length;c++)o.call(r,a[c])&&(s[a[c]]=r[a[c]])}}return s}},function(t,e,r){"use strict";(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var r=Date.now(),n=["ms","moz","webkit","o"],i=0;i<n.length&&!t.requestAnimationFrame;++i){var o=n[i];t.requestAnimationFrame=t[o+"RequestAnimationFrame"],t.cancelAnimationFrame=t[o+"CancelAnimationFrame"]||t[o+"CancelRequestAnimationFrame"]}t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),n=16+r-e;return n<0&&(n=0),r=e,setTimeout(function(){r=Date.now(),t(performance.now())},n)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){return clearTimeout(t)})}).call(this,r(19))},function(t,e,r){"use strict";Math.sign||(Math.sign=function(t){return 0===(t=Number(t))||isNaN(t)?t:t>0?1:-1})},function(t,e,r){"use strict";Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(26)),i=r(2);var o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=e,this.y=r,this.radius=n,this.type=i.SHAPES.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var r=this.radius*this.radius,n=this.x-t,i=this.y-e;return(n*=n)+(i*=i)<=r},t.prototype.getBounds=function(){return new n.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}();e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(26)),i=r(2);var o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=e,this.y=r,this.width=n,this.height=o,this.type=i.SHAPES.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var r=(t-this.x)/this.width,n=(e-this.y)/this.height;return(r*=r)+(n*=n)<=1},t.prototype.getBounds=function(){return new n.default(this.x-this.width,this.y-this.height,this.width,this.height)},t}();e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(24)),i=r(2);var o=function(){function t(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Array.isArray(r[0])&&(r=r[0]),r[0]instanceof n.default){for(var a=[],s=0,u=r.length;s<u;s++)a.push(r[s].x,r[s].y);r=a}this.closed=!0,this.points=r,this.type=i.SHAPES.POLY}return t.prototype.clone=function(){return new t(this.points.slice())},t.prototype.close=function(){var t=this.points;t[0]===t[t.length-2]&&t[1]===t[t.length-1]||t.push(t[0],t[1])},t.prototype.contains=function(t,e){for(var r=!1,n=this.points.length/2,i=0,o=n-1;i<n;o=i++){var a=this.points[2*i],s=this.points[2*i+1],u=this.points[2*o],l=this.points[2*o+1];s>e!=l>e&&t<(e-s)/(l-s)*(u-a)+a&&(r=!r)}return r},t}();e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=r(2);var i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=e,this.y=r,this.width=i,this.height=o,this.radius=a,this.type=n.SHAPES.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var r=t-(this.x+this.radius),n=e-(this.y+this.radius),i=this.radius*this.radius;if(r*r+n*n<=i)return!0;if((r=t-(this.x+this.width-this.radius))*r+n*n<=i)return!0;if(r*r+(n=e-(this.y+this.height-this.radius))*n<=i)return!0;if((r=t-(this.x+this.radius))*r+n*n<=i)return!0}return!1},t}();e.default=i},function(t,e){t.exports=function(t,e){var r=t.getContext("webgl",e)||t.getContext("experimental-webgl",e);if(!r)throw new Error("This browser does not support webGL. Try using the canvas renderer");return r}},function(t,e){var r=new ArrayBuffer(0),n=function(t,e,n,i){this.gl=t,this.buffer=t.createBuffer(),this.type=e||t.ARRAY_BUFFER,this.drawType=i||t.STATIC_DRAW,this.data=r,n&&this.upload(n),this._updateID=0};n.prototype.upload=function(t,e,r){r||this.bind();var n=this.gl;t=t||this.data,e=e||0,this.data.byteLength>=t.byteLength?n.bufferSubData(this.type,e,t):n.bufferData(this.type,t,this.drawType),this.data=t},n.prototype.bind=function(){this.gl.bindBuffer(this.type,this.buffer)},n.createVertexBuffer=function(t,e,r){return new n(t,t.ARRAY_BUFFER,e,r)},n.createIndexBuffer=function(t,e,r){return new n(t,t.ELEMENT_ARRAY_BUFFER,e,r)},n.create=function(t,e,r,i){return new n(t,e,r,i)},n.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},t.exports=n},function(t,e,r){var n=r(43),i=function(t,e,r){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=r||100};i.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new n(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},i.prototype.enableStencil=function(){if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},i.prototype.clear=function(t,e,r,n){this.bind();var i=this.gl;i.clearColor(t,e,r,n),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT)},i.prototype.bind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},i.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},i.prototype.resize=function(t,e){var r=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,this.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e))},i.prototype.destroy=function(){var t=this.gl;this.texture&&this.texture.destroy(),t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},i.createRGBA=function(t,e,r,o){var a=n.fromData(t,null,e,r);a.enableNearestScaling(),a.enableWrapClamp();var s=new i(t,e,r);return s.enableTexture(a),s.unbind(),s},i.createFloat32=function(t,e,r,o){var a=new n.fromData(t,o,e,r);a.enableNearestScaling(),a.enableWrapClamp();var s=new i(t,e,r);return s.enableTexture(a),s.unbind(),s},t.exports=i},function(t,e,r){var n=r(44),i=r(45),o=r(47),a=r(49),s=r(50),u=function(t,e,r,u,l){this.gl=t,u&&(e=a(e,u),r=a(r,u)),this.program=n(t,e,r,l),this.attributes=i(t,this.program),this.uniformData=o(t,this.program),this.uniforms=s(t,this.uniformData)};u.prototype.bind=function(){return this.gl.useProgram(this.program),this},u.prototype.destroy=function(){this.attributes=null,this.uniformData=null,this.uniforms=null,this.gl.deleteProgram(this.program)},t.exports=u},function(t,e,r){var n=r(42);function i(t,e){if(this.nativeVaoExtension=null,i.FORCE_NATIVE||(this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=e,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES();var r=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(r),attribState:new Array(r)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}i.prototype.constructor=i,t.exports=i,i.FORCE_NATIVE=!1,i.prototype.bind=function(){if(this.nativeVao){if(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty)return this.dirty=!1,this.activate(),this;this.indexBuffer&&this.indexBuffer.bind()}else this.activate();return this},i.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},i.prototype.activate=function(){for(var t=this.gl,e=null,r=0;r<this.attributes.length;r++){var i=this.attributes[r];e!==i.buffer&&(i.buffer.bind(),e=i.buffer),t.vertexAttribPointer(i.attribute.location,i.attribute.size,i.type||t.FLOAT,i.normalized||!1,i.stride||0,i.start||0)}return n(t,this.attributes,this.nativeState),this.indexBuffer&&this.indexBuffer.bind(),this},i.prototype.addAttribute=function(t,e,r,n,i,o){return this.attributes.push({buffer:t,attribute:e,location:e.location,type:r||this.gl.FLOAT,normalized:n||!1,stride:i||0,start:o||0}),this.dirty=!0,this},i.prototype.addIndex=function(t){return this.indexBuffer=t,this.dirty=!0,this},i.prototype.clear=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.attributes.length=0,this.indexBuffer=null,this},i.prototype.draw=function(t,e,r){var n=this.gl;return this.indexBuffer?n.drawElements(t,e||this.indexBuffer.data.length,n.UNSIGNED_SHORT,2*(r||0)):n.drawArrays(t,r,e||this.getSize()),this},i.prototype.destroy=function(){this.gl=null,this.indexBuffer=null,this.attributes=null,this.nativeState=null,this.nativeVao&&this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao),this.nativeVaoExtension=null,this.nativeVao=null},i.prototype.getSize=function(){var t=this.attributes[0];return t.buffer.data.length/(t.stride/4||t.attribute.size)}},function(t,e,r){t.exports={compileProgram:r(44),defaultValue:r(48),extractAttributes:r(45),extractUniforms:r(47),generateUniformAccessObject:r(50),setPrecision:r(49),mapSize:r(46),mapType:r(27)}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){if(n.default.tablet||n.default.phone)return 4;return t};var n=function(t){return t&&t.__esModule?t:{default:t}}(r(29))},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){return!(navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))}},function(t,e,r){"use strict";e.__esModule=!0,e.default={mixin:function(t){!function(t){t.__plugins={},t.registerPlugin=function(e,r){t.__plugins[e]=r},t.prototype.initPlugins=function(){for(var e in this.plugins=this.plugins||{},t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null}}(t)}}},function(t,e,r){"use strict";function n(t,e){if(t&&e)for(var r=Object.keys(e),n=0;n<r.length;++n){var i=r[n];Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}}e.__esModule=!0,e.mixin=n,e.delayMixin=function(t,e){i.push(t,e)},e.performMixins=function(){for(var t=0;t<i.length;t+=2)n(i[t],i[t+1]);i.length=0};var i=[]},function(t,e,r){"use strict";t.exports=function(t,e,r){var n,i=t.length;if(!(e>=i||0===r)){var o=i-(r=e+r>i?i-e:r);for(n=e;n<o;++n)t[n]=t[n+r];t.length=o}}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[n.BLEND_MODES.NORMAL_NPM]=n.BLEND_MODES.NORMAL,t[n.BLEND_MODES.ADD_NPM]=n.BLEND_MODES.ADD,t[n.BLEND_MODES.SCREEN_NPM]=n.BLEND_MODES.SCREEN,e[n.BLEND_MODES.NORMAL]=n.BLEND_MODES.NORMAL_NPM,e[n.BLEND_MODES.ADD]=n.BLEND_MODES.ADD_NPM,e[n.BLEND_MODES.SCREEN]=n.BLEND_MODES.SCREEN_NPM;var i=[];return i.push(e),i.push(t),i};var n=r(2)},function(t,e,r){(function(t,n){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){"object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType;var a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,l=36,c=1,h=26,f=38,d=700,p=72,_=128,v="-",g=/^xn--/,y=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=l-c,b=Math.floor,T=String.fromCharCode;function R(t){throw new RangeError(E[t])}function O(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function S(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+O((t=t.replace(m,".")).split("."),e).join(".")}function w(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function C(t){return O(t,function(t){var e="";return t>65535&&(e+=T((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=T(t)}).join("")}function A(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l}function I(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function P(t,e,r){var n=0;for(t=r?b(t/d):t>>1,t+=b(t/e);t>x*h>>1;n+=l)t=b(t/x);return b(n+(x+1)*t/(t+f))}function M(t){var e,r,n,i,o,a,s,f,d,g,y=[],m=t.length,E=0,x=_,T=p;for((r=t.lastIndexOf(v))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&R("not-basic"),y.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<m;){for(o=E,a=1,s=l;i>=m&&R("invalid-input"),((f=A(t.charCodeAt(i++)))>=l||f>b((u-E)/a))&&R("overflow"),E+=f*a,!(f<(d=s<=T?c:s>=T+h?h:s-T));s+=l)a>b(u/(g=l-d))&&R("overflow"),a*=g;T=P(E-o,e=y.length+1,0==o),b(E/e)>u-x&&R("overflow"),x+=b(E/e),E%=e,y.splice(E++,0,x)}return C(y)}function D(t){var e,r,n,i,o,a,s,f,d,g,y,m,E,x,O,S=[];for(m=(t=w(t)).length,e=_,r=0,o=p,a=0;a<m;++a)(y=t[a])<128&&S.push(T(y));for(n=i=S.length,i&&S.push(v);n<m;){for(s=u,a=0;a<m;++a)(y=t[a])>=e&&y<s&&(s=y);for(s-e>b((u-r)/(E=n+1))&&R("overflow"),r+=(s-e)*E,e=s,a=0;a<m;++a)if((y=t[a])<e&&++r>u&&R("overflow"),y==e){for(f=r,d=l;!(f<(g=d<=o?c:d>=o+h?h:d-o));d+=l)O=f-g,x=l-g,S.push(T(I(g+O%x,0))),f=b(O/x);S.push(T(I(f,0))),o=P(r,E,n==i),r=0,++n}++r,++e}return S.join("")}s={version:"1.4.1",ucs2:{decode:w,encode:C},decode:M,encode:D,toASCII:function(t){return S(t,function(t){return y.test(t)?"xn--"+D(t):t})},toUnicode:function(t){return S(t,function(t){return g.test(t)?M(t.slice(4).toLowerCase()):t})}},void 0===(i=function(){return s}.call(e,r,e,t))||(t.exports=i)}()}).call(this,r(56)(t),r(19))},function(t,e,r){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){"use strict";e.decode=e.parse=r(119),e.encode=e.stringify=r(120)},function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,o){e=e||"&",r=r||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=t.length;u>0&&l>u&&(l=u);for(var c=0;c<l;++c){var h,f,d,p,_=t[c].replace(s,"%20"),v=_.indexOf(r);v>=0?(h=_.substr(0,v),f=_.substr(v+1)):(h=_,f=""),d=decodeURIComponent(h),p=decodeURIComponent(f),n(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,s){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?o(a(t),function(a){var s=encodeURIComponent(n(a))+r;return i(t[a])?o(t[a],function(t){return s+encodeURIComponent(n(t))}).join(e):s+encodeURIComponent(n(t[a]))}).join(e):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var a=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=s(r(5)),o=r(2),a=s(r(122));function s(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._head=new a.default(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/i.default.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&null===e._requestId&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new a.default(t,e,r))},t.prototype.addOnce=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new a.default(t,e,r,!0))},t.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null},t.prototype.update=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now(),e=void 0;if(t>this.lastTime){(e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*i.default.TARGET_FPMS*this.speed;for(var r=this._head,n=r.next;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.elapsedMS=0;this.lastTime=t},n(t,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,i.default.TARGET_FPMS);this._maxElapsedMS=1/e}}]),t}();e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.fn=e,this.context=r,this.priority=n,this.once=i,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return e=e||null,this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}();e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=s(r(14)),i=r(2),o=r(6),a=s(r(36));function s(t){return t&&t.__esModule?t:{default:t}}var u=new o.Matrix,l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,r=this.renderer,n=e._frame.width,s=e._frame.height,l=t.transform.worldTransform,c=0,h=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(r.setBlendMode(t.blendMode),e.valid)){r.context.globalAlpha=t.worldAlpha;var f=e.baseTexture.scaleMode===i.SCALE_MODES.LINEAR;r.smoothProperty&&r.context[r.smoothProperty]!==f&&(r.context[r.smoothProperty]=f),e.trim?(c=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,h=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(c=(.5-t.anchor.x)*e.orig.width,h=(.5-t.anchor.y)*e.orig.height),e.rotate&&(l.copy(u),l=u,o.GroupD8.matrixAppendRotationInv(l,e.rotate,c,h),c=0,h=0),c-=n/2,h-=s/2,r.roundPixels?(r.context.setTransform(l.a,l.b,l.c,l.d,l.tx*r.resolution|0,l.ty*r.resolution|0),c|=0,h|=0):r.context.setTransform(l.a,l.b,l.c,l.d,l.tx*r.resolution,l.ty*r.resolution);var d=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint===t.tint&&t.tintedTexture.tintId===t._texture._updateID||(t.cachedTint=t.tint,t.tintedTexture=a.default.getTintedTexture(t,t.tint)),r.context.drawImage(t.tintedTexture,0,0,n*d,s*d,c*r.resolution,h*r.resolution,n*r.resolution,s*r.resolution)):r.context.drawImage(e.baseTexture.source,e._frame.x*d,e._frame.y*d,n*d,s*d,c*r.resolution,h*r.resolution,n*r.resolution,s*r.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();e.default=l,n.default.registerPlugin("sprite",l)},function(t,e,r){"use strict";e.__esModule=!0;var n=r(2);var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.pushMask=function(t){var e=this.renderer;e.context.save();var r=t.alpha,n=t.transform.worldTransform,i=e.resolution;e.context.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i,n.ty*i),t._texture||(this.renderGraphicsShape(t),e.context.clip()),t.worldAlpha=r},t.prototype.renderGraphicsShape=function(t){var e=this.renderer.context,r=t.graphicsData.length;if(0!==r){e.beginPath();for(var i=0;i<r;i++){var o=t.graphicsData[i],a=o.shape;if(o.type===n.SHAPES.POLY){var s=a.points;e.moveTo(s[0],s[1]);for(var u=1;u<s.length/2;u++)e.lineTo(s[2*u],s[2*u+1]);s[0]===s[s.length-2]&&s[1]===s[s.length-1]&&e.closePath()}else if(o.type===n.SHAPES.RECT)e.rect(a.x,a.y,a.width,a.height),e.closePath();else if(o.type===n.SHAPES.CIRC)e.arc(a.x,a.y,a.radius,0,2*Math.PI),e.closePath();else if(o.type===n.SHAPES.ELIP){var l=2*a.width,c=2*a.height,h=a.x-l/2,f=a.y-c/2,d=l/2*.5522848,p=c/2*.5522848,_=h+l,v=f+c,g=h+l/2,y=f+c/2;e.moveTo(h,y),e.bezierCurveTo(h,y-p,g-d,f,g,f),e.bezierCurveTo(g+d,f,_,y-p,_,y),e.bezierCurveTo(_,y+p,g+d,v,g,v),e.bezierCurveTo(g-d,v,h,y+p,h,y),e.closePath()}else if(o.type===n.SHAPES.RREC){var m=a.x,E=a.y,x=a.width,b=a.height,T=a.radius,R=Math.min(x,b)/2|0;T=T>R?R:T,e.moveTo(m,E+T),e.lineTo(m,E+b-T),e.quadraticCurveTo(m,E+b,m+T,E+b),e.lineTo(m+x-T,E+b),e.quadraticCurveTo(m+x,E+b,m+x,E+b-T),e.lineTo(m+x,E+T),e.quadraticCurveTo(m+x,E,m+x-T,E),e.lineTo(m+T,E),e.quadraticCurveTo(m,E,m,E+T),e.closePath()}}}},t.prototype.popMask=function(t){t.context.restore(),t.invalidateBlendMode()},t.prototype.destroy=function(){},t}();e.default=i},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,i.default)()?(t[n.BLEND_MODES.NORMAL]="source-over",t[n.BLEND_MODES.ADD]="lighter",t[n.BLEND_MODES.MULTIPLY]="multiply",t[n.BLEND_MODES.SCREEN]="screen",t[n.BLEND_MODES.OVERLAY]="overlay",t[n.BLEND_MODES.DARKEN]="darken",t[n.BLEND_MODES.LIGHTEN]="lighten",t[n.BLEND_MODES.COLOR_DODGE]="color-dodge",t[n.BLEND_MODES.COLOR_BURN]="color-burn",t[n.BLEND_MODES.HARD_LIGHT]="hard-light",t[n.BLEND_MODES.SOFT_LIGHT]="soft-light",t[n.BLEND_MODES.DIFFERENCE]="difference",t[n.BLEND_MODES.EXCLUSION]="exclusion",t[n.BLEND_MODES.HUE]="hue",t[n.BLEND_MODES.SATURATION]="saturate",t[n.BLEND_MODES.COLOR]="color",t[n.BLEND_MODES.LUMINOSITY]="luminosity"):(t[n.BLEND_MODES.NORMAL]="source-over",t[n.BLEND_MODES.ADD]="lighter",t[n.BLEND_MODES.MULTIPLY]="source-over",t[n.BLEND_MODES.SCREEN]="source-over",t[n.BLEND_MODES.OVERLAY]="source-over",t[n.BLEND_MODES.DARKEN]="source-over",t[n.BLEND_MODES.LIGHTEN]="source-over",t[n.BLEND_MODES.COLOR_DODGE]="source-over",t[n.BLEND_MODES.COLOR_BURN]="source-over",t[n.BLEND_MODES.HARD_LIGHT]="source-over",t[n.BLEND_MODES.SOFT_LIGHT]="source-over",t[n.BLEND_MODES.DIFFERENCE]="source-over",t[n.BLEND_MODES.EXCLUSION]="source-over",t[n.BLEND_MODES.HUE]="source-over",t[n.BLEND_MODES.SATURATION]="source-over",t[n.BLEND_MODES.COLOR]="source-over",t[n.BLEND_MODES.LUMINOSITY]="source-over");return t[n.BLEND_MODES.NORMAL_NPM]=t[n.BLEND_MODES.NORMAL],t[n.BLEND_MODES.ADD_NPM]=t[n.BLEND_MODES.ADD],t[n.BLEND_MODES.SCREEN_NPM]=t[n.BLEND_MODES.SCREEN],t};var n=r(2),i=function(t){return t&&t.__esModule?t:{default:t}}(r(62))},function(t,e,r){"use strict";e.__esModule=!0;var n=d(r(20)),i=d(r(21)),o=d(r(37)),a=d(r(139)),s=d(r(140)),u=d(r(141)),l=d(r(5)),c=r(4),h=d(r(7)),f=d(r(33));function d(t){return t&&t.__esModule?t:{default:t}}var p=0,_=0,v=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));n.vertSize=5,n.vertByteSize=4*n.vertSize,n.size=l.default.SPRITE_BATCH_SIZE,n.buffers=[];for(var i=1;i<=f.default.nextPow2(n.size);i*=2)n.buffers.push(new u.default(4*i*n.vertByteSize));n.indices=(0,o.default)(n.size),n.shader=null,n.currentIndex=0,n.groups=[];for(var a=0;a<n.size;a++)n.groups[a]={textures:[],textureCount:0,ids:[],size:0,start:0,blend:0};return n.sprites=[],n.vertexBuffers=[],n.vaos=[],n.vaoMax=2,n.vertexCount=0,n.renderer.on("prerender",n.onPrerender,n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.renderer.legacy?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),l.default.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(0,s.default)(this.MAX_TEXTURES,t)),this.shader=(0,a.default)(t,this.MAX_TEXTURES),this.indexBuffer=h.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.renderer.bindVao(null);for(var e=this.shader.attributes,r=0;r<this.vaoMax;r++){var n=this.vertexBuffers[r]=h.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),i=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(n,e.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(n,e.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(n,e.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);e.aTextureId&&i.addAttribute(n,e.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[r]=i}this.vao=this.vaos[0],this.currentBlendMode=99999,this.boundTextures=new Array(this.MAX_TEXTURES)},e.prototype.onPrerender=function(){this.vertexCount=0},e.prototype.render=function(t){this.currentIndex>=this.size&&this.flush(),t._texture._uvs&&(this.sprites[this.currentIndex++]=t)},e.prototype.flush=function(){if(0!==this.currentIndex){var t=this.renderer.gl,e=this.MAX_TEXTURES,r=f.default.nextPow2(this.currentIndex),n=f.default.log2(r),i=this.buffers[n],o=this.sprites,a=this.groups,s=i.float32View,u=i.uint32View,d=this.boundTextures,v=this.renderer.boundTextures,g=this.renderer.textureGC.count,y=0,m=void 0,E=void 0,x=1,b=0,T=a[0],R=void 0,O=void 0,S=c.premultiplyBlendMode[o[0]._texture.baseTexture.premultipliedAlpha?1:0][o[0].blendMode];T.textureCount=0,T.start=0,T.blend=S,p++;var w=void 0;for(w=0;w<e;++w){var C=v[w];C._enabled!==p?(d[w]=C,C._virtalBoundId=w,C._enabled=p):d[w]=this.renderer.emptyTextures[w]}for(p++,w=0;w<this.currentIndex;++w){var A=o[w];o[w]=null,m=A._texture.baseTexture;var I=c.premultiplyBlendMode[Number(m.premultipliedAlpha)][A.blendMode];if(S!==I&&(S=I,E=null,b=e,p++),E!==m&&(E=m,m._enabled!==p)){if(b===e&&(p++,T.size=w-T.start,b=0,(T=a[x++]).blend=S,T.textureCount=0,T.start=w),m.touched=g,-1===m._virtalBoundId)for(var P=0;P<e;++P){var M=(P+_)%e,D=d[M];if(D._enabled!==p){_++,D._virtalBoundId=-1,m._virtalBoundId=M,d[M]=m;break}}m._enabled=p,T.textureCount++,T.ids[b]=m._virtalBoundId,T.textures[b++]=m}if(R=A.vertexData,O=A._texture._uvs.uvsUint32,this.renderer.roundPixels){var L=this.renderer.resolution;s[y]=(R[0]*L|0)/L,s[y+1]=(R[1]*L|0)/L,s[y+5]=(R[2]*L|0)/L,s[y+6]=(R[3]*L|0)/L,s[y+10]=(R[4]*L|0)/L,s[y+11]=(R[5]*L|0)/L,s[y+15]=(R[6]*L|0)/L,s[y+16]=(R[7]*L|0)/L}else s[y]=R[0],s[y+1]=R[1],s[y+5]=R[2],s[y+6]=R[3],s[y+10]=R[4],s[y+11]=R[5],s[y+15]=R[6],s[y+16]=R[7];u[y+2]=O[0],u[y+7]=O[1],u[y+12]=O[2],u[y+17]=O[3];var U=Math.min(A.worldAlpha,1),N=U<1&&m.premultipliedAlpha?(0,c.premultiplyTint)(A._tintRGB,U):A._tintRGB+(255*U<<24);u[y+3]=u[y+8]=u[y+13]=u[y+18]=N,s[y+4]=s[y+9]=s[y+14]=s[y+19]=m._virtalBoundId,y+=20}if(T.size=w-T.start,l.default.CAN_UPLOAD_SAME_BUFFER)this.vertexBuffers[this.vertexCount].upload(i.vertices,0,!0);else{if(this.vaoMax<=this.vertexCount){this.vaoMax++;var F=this.shader.attributes,j=this.vertexBuffers[this.vertexCount]=h.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),k=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(j,F.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(j,F.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(j,F.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);F.aTextureId&&k.addAttribute(j,F.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[this.vertexCount]=k}this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].upload(i.vertices,0,!1),this.vertexCount++}for(w=0;w<e;++w)v[w]._virtalBoundId=-1;for(w=0;w<x;++w){for(var B=a[w],H=B.textureCount,X=0;X<H;X++)E=B.textures[X],v[B.ids[X]]!==E&&this.renderer.bindTexture(E,B.ids[X],!0),E._virtalBoundId=-1;this.renderer.state.setBlendMode(B.blend),t.drawElements(t.TRIANGLES,6*B.size,t.UNSIGNED_SHORT,6*B.start*2)}this.currentIndex=0}},e.prototype.start=function(){this.renderer.bindShader(this.shader),l.default.CAN_UPLOAD_SAME_BUFFER&&(this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].bind())},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this.vaoMax;e++)this.vertexBuffers[e]&&this.vertexBuffers[e].destroy(),this.vaos[e]&&this.vaos[e].destroy();this.indexBuffer&&this.indexBuffer.destroy(),this.renderer.off("prerender",this.onPrerender,this),t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null;for(var r=0;r<this.buffers.length;++r)this.buffers[r].destroy()},e}(n.default);e.default=v,i.default.registerPlugin("sprite",v)},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(15)),i=o(r(63));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.scissor=!1,n.scissorData=null,n.scissorRenderTarget=null,n.enableScissor=!0,n.alphaMaskPool=[],n.alphaMaskIndex=0,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.pushMask=function(t,e){if(e.texture)this.pushSpriteMask(t,e);else if(this.enableScissor&&!this.scissor&&this.renderer._activeRenderTarget.root&&!this.renderer.stencilManager.stencilMaskStack.length&&e.isFastRect()){var r=e.worldTransform,n=Math.atan2(r.b,r.a);(n=Math.round(n*(180/Math.PI)))%90?this.pushStencilMask(e):this.pushScissorMask(t,e)}else this.pushStencilMask(e)},e.prototype.popMask=function(t,e){e.texture?this.popSpriteMask(t,e):this.enableScissor&&!this.renderer.stencilManager.stencilMaskStack.length?this.popScissorMask(t,e):this.popStencilMask(t,e)},e.prototype.pushSpriteMask=function(t,e){var r=this.alphaMaskPool[this.alphaMaskIndex];r||(r=this.alphaMaskPool[this.alphaMaskIndex]=[new i.default(e)]),r[0].resolution=this.renderer.resolution,r[0].maskSprite=e,t.filterArea=e.getBounds(!0),this.renderer.filterManager.pushFilter(t,r),this.alphaMaskIndex++},e.prototype.popSpriteMask=function(){this.renderer.filterManager.popFilter(),this.alphaMaskIndex--},e.prototype.pushStencilMask=function(t){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.pushStencil(t)},e.prototype.popStencilMask=function(){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.popStencil()},e.prototype.pushScissorMask=function(t,e){e.renderable=!0;var r=this.renderer._activeRenderTarget,n=e.getBounds();n.fit(r.size),e.renderable=!1,this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);var i=this.renderer.resolution;this.renderer.gl.scissor(n.x*i,(r.root?r.size.height-n.y-n.height:n.y)*i,n.width*i,n.height*i),this.scissorRenderTarget=r,this.scissorData=e,this.scissor=!0},e.prototype.popScissorMask=function(){this.scissorRenderTarget=null,this.scissorData=null,this.scissor=!1;var t=this.renderer.gl;t.disable(t.SCISSOR_TEST)},e}(n.default);e.default=a},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){var n=i(t),o=i(e);return Object.assign(n,o)};var n=function(t){return t&&t.__esModule?t:{default:t}}(r(7)).default.shader.defaultValue;function i(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),r={},i=void 0,o=t.replace(/\s+/g," ").split(/\s*;\s*/),a=0;a<o.length;a++){var s=o[a].trim();if(s.indexOf("uniform")>-1){var u=s.split(" "),l=u[1],c=u[2],h=1;c.indexOf("[")>-1&&(c=(i=c.split(/\[|]/))[0],h*=Number(i[1])),c.match(e)||(r[c]={value:n(l,h),name:c,type:l})}}return r}},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,l=[],c=!1,h=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):h=-1,l.length&&d())}function d(){if(!c){var t=s(f);c=!0;for(var e=l.length;e;){for(u=l,l=[];++h<e;)u&&u[h].run();h=-1,e=l.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function _(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new p(t,e)),1!==l.length||c||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=_,i.addListener=_,i.once=_,i.off=_,i.removeListener=_,i.removeAllListeners=_,i.emit=_,i.prependListener=_,i.prependOnceListener=_,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(15));var i=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.stencilMaskStack=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.setMaskStack=function(t){this.stencilMaskStack=t;var e=this.renderer.gl;0===t.length?e.disable(e.STENCIL_TEST):e.enable(e.STENCIL_TEST)},e.prototype.pushStencil=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.renderer._activeRenderTarget.attachStencilBuffer();var e=this.renderer.gl,r=this.stencilMaskStack.length;0===r&&e.enable(e.STENCIL_TEST),this.stencilMaskStack.push(t),e.colorMask(!1,!1,!1,!1),e.stencilFunc(e.EQUAL,r,this._getBitwiseMask()),e.stencilOp(e.KEEP,e.KEEP,e.INCR),this.renderer.plugins.graphics.render(t),this._useCurrent()},e.prototype.popStencil=function(){this.renderer.setObjectRenderer(this.renderer.plugins.graphics);var t=this.renderer.gl,e=this.stencilMaskStack.pop();0===this.stencilMaskStack.length?(t.disable(t.STENCIL_TEST),t.clear(t.STENCIL_BUFFER_BIT),t.clearStencil(0)):(t.colorMask(!1,!1,!1,!1),t.stencilOp(t.KEEP,t.KEEP,t.DECR),this.renderer.plugins.graphics.render(e),this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.stencilMaskStack.length,this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<<this.stencilMaskStack.length)-1},e.prototype.destroy=function(){n.default.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},e}(n.default);e.default=i},function(t,e,r){"use strict";e.__esModule=!0;var n=c(r(15)),i=c(r(22)),o=c(r(66)),a=r(6),s=c(r(16)),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(132)),l=c(r(33));function c(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var f=function(){function t(){h(this,t),this.renderTarget=null,this.target=null,this.resolution=1,this.sourceFrame=new a.Rectangle,this.destinationFrame=new a.Rectangle,this.filters=[]}return t.prototype.clear=function(){this.filters=null,this.target=null,this.renderTarget=null},t}(),d=function(t){function e(r){h(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.gl=n.renderer.gl,n.quad=new o.default(n.gl,r.state.attribState),n.shaderCache={},n.pool={},n.filterData=null,n.managedFilters=[],n.renderer.on("prerender",n.onPrerender,n),n._screenWidth=r.view.width,n._screenHeight=r.view.height,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.pushFilter=function(t,e){var r=this.renderer,n=this.filterData;if(!n){n=this.renderer._activeRenderTarget.filterStack;var i=new f;i.sourceFrame=i.destinationFrame=this.renderer._activeRenderTarget.size,i.renderTarget=r._activeRenderTarget,this.renderer._activeRenderTarget.filterData=n={index:0,stack:[i]},this.filterData=n}var o=n.stack[++n.index],a=n.stack[0].destinationFrame;o||(o=n.stack[n.index]=new f);var s=t.filterArea&&0===t.filterArea.x&&0===t.filterArea.y&&t.filterArea.width===r.screen.width&&t.filterArea.height===r.screen.height,u=e[0].resolution,l=0|e[0].padding,c=s?r.screen:t.filterArea||t.getBounds(!0),h=o.sourceFrame,d=o.destinationFrame;h.x=(c.x*u|0)/u,h.y=(c.y*u|0)/u,h.width=(c.width*u|0)/u,h.height=(c.height*u|0)/u,s||(n.stack[0].renderTarget.transform||e[0].autoFit&&h.fit(a),h.pad(l)),d.width=h.width,d.height=h.height;var p=this.getPotRenderTarget(r.gl,h.width,h.height,u);o.target=t,o.filters=e,o.resolution=u,o.renderTarget=p,p.setFrame(d,h),r.bindRenderTarget(p),p.clear()},e.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],r=t.stack[t.index];this.quad.map(r.renderTarget.size,r.sourceFrame).upload();var n=r.filters;if(1===n.length)n[0].apply(this,r.renderTarget,e.renderTarget,!1,r),this.freePotRenderTarget(r.renderTarget);else{var i=r.renderTarget,o=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,r.resolution);o.setFrame(r.destinationFrame,r.sourceFrame),o.clear();var a=0;for(a=0;a<n.length-1;++a){n[a].apply(this,i,o,!0,r);var s=i;i=o,o=s}n[a].apply(this,i,e.renderTarget,!1,r),this.freePotRenderTarget(i),this.freePotRenderTarget(o)}r.clear(),t.index--,0===t.index&&(this.filterData=null)},e.prototype.applyFilter=function(t,e,r,n){var i=this.renderer,o=i.gl,a=t.glShaders[i.CONTEXT_UID];a||(t.glShaderKey?(a=this.shaderCache[t.glShaderKey])||(a=new s.default(this.gl,t.vertexSrc,t.fragmentSrc),t.glShaders[i.CONTEXT_UID]=this.shaderCache[t.glShaderKey]=a,this.managedFilters.push(t)):(a=t.glShaders[i.CONTEXT_UID]=new s.default(this.gl,t.vertexSrc,t.fragmentSrc),this.managedFilters.push(t)),i.bindVao(null),this.quad.initVao(a)),i.bindVao(this.quad.vao),i.bindRenderTarget(r),n&&(o.disable(o.SCISSOR_TEST),i.clear(),o.enable(o.SCISSOR_TEST)),r===i.maskManager.scissorRenderTarget&&i.maskManager.pushScissorMask(null,i.maskManager.scissorData),i.bindShader(a);var u=this.renderer.emptyTextures[0];this.renderer.boundTextures[0]=u,this.syncUniforms(a,t),i.state.setBlendMode(t.blendMode),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,e.texture.texture),this.quad.vao.draw(this.renderer.gl.TRIANGLES,6,0),o.bindTexture(o.TEXTURE_2D,u._glTextures[this.renderer.CONTEXT_UID].texture)},e.prototype.syncUniforms=function(t,e){var r=e.uniformData,n=e.uniforms,i=1,o=void 0;if(t.uniforms.filterArea){o=this.filterData.stack[this.filterData.index];var a=t.uniforms.filterArea;a[0]=o.renderTarget.size.width,a[1]=o.renderTarget.size.height,a[2]=o.sourceFrame.x,a[3]=o.sourceFrame.y,t.uniforms.filterArea=a}if(t.uniforms.filterClamp){o=o||this.filterData.stack[this.filterData.index];var s=t.uniforms.filterClamp;s[0]=0,s[1]=0,s[2]=(o.sourceFrame.width-1)/o.renderTarget.size.width,s[3]=(o.sourceFrame.height-1)/o.renderTarget.size.height,t.uniforms.filterClamp=s}for(var u in r){var l=r[u].type;if("sampler2d"===l&&0!==n[u]){if(n[u].baseTexture)t.uniforms[u]=this.renderer.bindTexture(n[u].baseTexture,i);else{t.uniforms[u]=i;var c=this.renderer.gl;this.renderer.boundTextures[i]=this.renderer.emptyTextures[i],c.activeTexture(c.TEXTURE0+i),n[u].texture.bind()}i++}else if("mat3"===l)void 0!==n[u].a?t.uniforms[u]=n[u].toArray(!0):t.uniforms[u]=n[u];else if("vec2"===l)if(void 0!==n[u].x){var h=t.uniforms[u]||new Float32Array(2);h[0]=n[u].x,h[1]=n[u].y,t.uniforms[u]=h}else t.uniforms[u]=n[u];else"float"===l?t.uniforms.data[u].value!==r[u]&&(t.uniforms[u]=n[u]):t.uniforms[u]=n[u]}},e.prototype.getRenderTarget=function(t,e){var r=this.filterData.stack[this.filterData.index],n=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,e||r.resolution);return n.setFrame(r.destinationFrame,r.sourceFrame),n},e.prototype.returnRenderTarget=function(t){this.freePotRenderTarget(t)},e.prototype.calculateScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return u.calculateScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size)},e.prototype.calculateNormalizedScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return u.calculateNormalizedScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size,e.destinationFrame)},e.prototype.calculateSpriteMatrix=function(t,e){var r=this.filterData.stack[this.filterData.index];return u.calculateSpriteMatrix(t,r.sourceFrame,r.renderTarget.size,e)},e.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.renderer,r=this.managedFilters;e.off("prerender",this.onPrerender,this);for(var n=0;n<r.length;n++)t||r[n].glShaders[e.CONTEXT_UID].destroy(),delete r[n].glShaders[e.CONTEXT_UID];this.shaderCache={},t?this.pool={}:this.emptyPool()},e.prototype.getPotRenderTarget=function(t,e,r,n){var o="screen";r*=n,(e*=n)===this._screenWidth&&r===this._screenHeight||(o=(65535&(e=l.default.nextPow2(e)))<<16|65535&(r=l.default.nextPow2(r))),this.pool[o]||(this.pool[o]=[]);var a=this.pool[o].pop();if(!a){var s=this.renderer.boundTextures[0];t.activeTexture(t.TEXTURE0),a=new i.default(t,e,r,null,1),t.bindTexture(t.TEXTURE_2D,s._glTextures[this.renderer.CONTEXT_UID].texture)}return a.resolution=n,a.defaultFrame.width=a.size.width=e/n,a.defaultFrame.height=a.size.height=r/n,a.filterPoolKey=o,a},e.prototype.emptyPool=function(){for(var t in this.pool){var e=this.pool[t];if(e)for(var r=0;r<e.length;r++)e[r].destroy(!0)}this.pool={}},e.prototype.freePotRenderTarget=function(t){this.pool[t.filterPoolKey].push(t)},e.prototype.onPrerender=function(){if(this._screenWidth!==this.renderer.view.width||this._screenHeight!==this.renderer.view.height){this._screenWidth=this.renderer.view.width,this._screenHeight=this.renderer.view.height;var t=this.pool.screen;if(t)for(var e=0;e<t.length;e++)t[e].destroy(!0);this.pool.screen=[]}},e}(n.default);e.default=d},function(t,e,r){"use strict";e.__esModule=!0,e.calculateScreenSpaceMatrix=function(t,e,r){var n=t.identity();return n.translate(e.x/r.width,e.y/r.height),n.scale(r.width,r.height),n},e.calculateNormalizedScreenSpaceMatrix=function(t,e,r){var n=t.identity();n.translate(e.x/r.width,e.y/r.height);var i=r.width/e.width,o=r.height/e.height;return n.scale(i,o),n},e.calculateSpriteMatrix=function(t,e,r,i){var o=i._texture.orig,a=t.set(r.width,0,0,r.height,e.x,e.y),s=i.worldTransform.copy(n.Matrix.TEMP_MATRIX);return s.invert(),a.prepend(s),a.scale(1/o.width,1/o.height),a.translate(i.anchor.x,i.anchor.y),a};var n=r(6)},function(t,e,r){"use strict";e.__esModule=!0;var n=r(7),i=r(2),o=function(t){return t&&t.__esModule?t:{default:t}}(r(22)),a=r(4);var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.gl=e.gl,this._managedTextures=[]}return t.prototype.bindTexture=function(){},t.prototype.getTexture=function(){},t.prototype.updateTexture=function(t,e){var r=this.gl,a=!!t._glRenderTargets;if(!t.hasLoaded)return null;var s=this.renderer.boundTextures;if(void 0===e){e=0;for(var u=0;u<s.length;++u)if(s[u]===t){e=u;break}}s[e]=t,r.activeTexture(r.TEXTURE0+e);var l=t._glTextures[this.renderer.CONTEXT_UID];if(l)a?t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width,t.height):l.upload(t.source);else{if(a){var c=new o.default(this.gl,t.width,t.height,t.scaleMode,t.resolution);c.resize(t.width,t.height),t._glRenderTargets[this.renderer.CONTEXT_UID]=c,l=c.texture}else(l=new n.GLTexture(this.gl,null,null,null,null)).bind(e),l.premultiplyAlpha=!0,l.upload(t.source);t._glTextures[this.renderer.CONTEXT_UID]=l,t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this),this._managedTextures.push(t),t.isPowerOfTwo?(t.mipmap&&l.enableMipmap(),t.wrapMode===i.WRAP_MODES.CLAMP?l.enableWrapClamp():t.wrapMode===i.WRAP_MODES.REPEAT?l.enableWrapRepeat():l.enableWrapMirrorRepeat()):l.enableWrapClamp(),t.scaleMode===i.SCALE_MODES.NEAREST?l.enableNearestScaling():l.enableLinearScaling()}return l},t.prototype.destroyTexture=function(t,e){if((t=t.baseTexture||t).hasLoaded){var r=this.renderer.CONTEXT_UID,n=t._glTextures,i=t._glRenderTargets;if(n[r]&&(this.renderer.unbindTexture(t),n[r].destroy(),t.off("update",this.updateTexture,this),t.off("dispose",this.destroyTexture,this),delete n[r],!e)){var o=this._managedTextures.indexOf(t);-1!==o&&(0,a.removeItems)(this._managedTextures,o,1)}i&&i[r]&&(i[r].destroy(),delete i[r])}},t.prototype.removeAll=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];e._glTextures[this.renderer.CONTEXT_UID]&&delete e._glTextures[this.renderer.CONTEXT_UID]}},t.prototype.destroy=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];this.destroyTexture(e,!0),e.off("update",this.updateTexture,this),e.off("dispose",this.destroyTexture,this)}this._managedTextures=null},t}();e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n=r(2),i=function(t){return t&&t.__esModule?t:{default:t}}(r(5));var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=i.default.GC_MAX_IDLE,this.checkCountMax=i.default.GC_MAX_CHECK_COUNT,this.mode=i.default.GC_MODE}return t.prototype.update=function(){this.count++,this.mode!==n.GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run()))},t.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,r=!1,n=0;n<e.length;n++){var i=e[n];!i._glRenderTargets&&this.count-i.touched>this.maxIdle&&(t.destroyTexture(i,!0),e[n]=null,r=!0)}if(r){for(var o=0,a=0;a<e.length;a++)null!==e[a]&&(e[o++]=e[a]);e.length=o}},t.prototype.unload=function(t){var e=this.renderer.textureManager;t._texture&&t._texture._glRenderTargets&&e.destroyTexture(t._texture,!0);for(var r=t.children.length-1;r>=0;r--)this.unload(t.children[r])},t}();e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(136));var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=e,this.maxAttribs=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=(0,n.default)(e),this.nativeVaoExtension=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object")}return t.prototype.push=function(){var t=this.stack[this.stackIndex];t||(t=this.stack[this.stackIndex]=new Uint8Array(16)),++this.stackIndex;for(var e=0;e<this.activeState.length;e++)t[e]=this.activeState[e]},t.prototype.pop=function(){var t=this.stack[--this.stackIndex];this.setState(t)},t.prototype.setState=function(t){this.setBlend(t[0]),this.setDepthTest(t[1]),this.setFrontFace(t[2]),this.setCullFace(t[3]),this.setBlendMode(t[4])},t.prototype.setBlend=function(t){t=t?1:0,this.activeState[0]!==t&&(this.activeState[0]=t,this.gl[t?"enable":"disable"](this.gl.BLEND))},t.prototype.setBlendMode=function(t){if(t!==this.activeState[4]){this.activeState[4]=t;var e=this.blendModes[t];2===e.length?this.gl.blendFunc(e[0],e[1]):this.gl.blendFuncSeparate(e[0],e[1],e[2],e[3])}},t.prototype.setDepthTest=function(t){t=t?1:0,this.activeState[1]!==t&&(this.activeState[1]=t,this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST))},t.prototype.setCullFace=function(t){t=t?1:0,this.activeState[3]!==t&&(this.activeState[3]=t,this.gl[t?"enable":"disable"](this.gl.CULL_FACE))},t.prototype.setFrontFace=function(t){t=t?1:0,this.activeState[2]!==t&&(this.activeState[2]=t,this.gl.frontFace(this.gl[t?"CW":"CCW"]))},t.prototype.resetAttributes=function(){for(var t=0;t<this.attribState.tempAttribState.length;t++)this.attribState.tempAttribState[t]=0;for(var e=0;e<this.attribState.attribState.length;e++)this.attribState.attribState[e]=0;for(var r=1;r<this.maxAttribs;r++)this.gl.disableVertexAttribArray(r)},t.prototype.resetToDefault=function(){this.nativeVaoExtension&&this.nativeVaoExtension.bindVertexArrayOES(null),this.resetAttributes();for(var t=0;t<this.activeState.length;++t)this.activeState[t]=32;this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.setState(this.defaultState)},t}();e.default=i},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e[n.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.ADD]=[t.ONE,t.DST_ALPHA],e[n.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR],e[n.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.ADD_NPM]=[t.SRC_ALPHA,t.DST_ALPHA,t.ONE,t.DST_ALPHA],e[n.BLEND_MODES.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_COLOR],e};var n=r(2)},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e[n.DRAW_MODES.POINTS]=t.POINTS,e[n.DRAW_MODES.LINES]=t.LINES,e[n.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,e[n.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,e[n.DRAW_MODES.TRIANGLES]=t.TRIANGLES,e[n.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,e[n.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN,e};var n=r(2)},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){var r=i;r=(r=r.replace(/%count%/gi,e)).replace(/%forloop%/gi,function(t){var e="";e+="\n",e+="\n";for(var r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(textureId == "+r+".0)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+r+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"}(e));for(var o=new n.default(t,"precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor;\n}\n",r),a=[],s=0;s<e;s++)a[s]=s;return o.bind(),o.uniforms.uSamplers=a,o};var n=function(t){return t&&t.__esModule?t:{default:t}}(r(16));r(9);var i=["varying vec2 vTextureCoord;","varying vec4 vColor;","varying float vTextureId;","uniform sampler2D uSamplers[%count%];","void main(void){","vec4 color;","float textureId = floor(vTextureId+0.5);","%forloop%","gl_FragColor = color * vColor;","}"].join("\n")},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){var r=!e;if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");if(r){var a=document.createElement("canvas");a.width=1,a.height=1,e=n.default.createContext(a)}var s=e.createShader(e.FRAGMENT_SHADER);for(;;){var u=i.replace(/%forloop%/gi,o(t));if(e.shaderSource(s,u),e.compileShader(s),e.getShaderParameter(s,e.COMPILE_STATUS))break;t=t/2|0}r&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext();return t};var n=function(t){return t&&t.__esModule?t:{default:t}}(r(7));var i=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function o(t){for(var e="",r=0;r<t;++r)r>0&&(e+="\nelse "),r<t-1&&(e+="if(test == "+r+".0){}");return e}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.vertices=new ArrayBuffer(e),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)}return t.prototype.destroy=function(){this.vertices=null,this.positions=null,this.uvs=null,this.colors=null},t}();e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=d(r(32)),o=d(r(10)),a=r(6),s=r(4),u=r(2),l=d(r(5)),c=d(r(67)),h=d(r(68)),f=d(r(143));function d(t){return t&&t.__esModule?t:{default:t}}var p={texture:!0,children:!1,baseTexture:!0},_=function(t){function e(r,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=i||document.createElement("canvas")).width=3,i.height=3;var s=o.default.fromCanvas(i,l.default.SCALE_MODE,"text");s.orig=new a.Rectangle,s.trim=new a.Rectangle;var u=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,s));return o.default.addToCache(u._texture,u._texture.baseTexture.textureCacheIds[0]),u.canvas=i,u.context=u.canvas.getContext("2d"),u.resolution=l.default.RESOLUTION,u._text=null,u._style=null,u._styleListener=null,u._font="",u.text=r,u.style=n,u.localStyleID=-1,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){this._font=this._style.toFontString();var r=this.context,n=h.default.measureText(this._text,this._style,this._style.wordWrap,this.canvas),i=n.width,o=n.height,a=n.lines,s=n.lineHeight,u=n.lineWidths,l=n.maxLineWidth,c=n.fontProperties;this.canvas.width=Math.ceil((Math.max(1,i)+2*e.padding)*this.resolution),this.canvas.height=Math.ceil((Math.max(1,o)+2*e.padding)*this.resolution),r.scale(this.resolution,this.resolution),r.clearRect(0,0,this.canvas.width,this.canvas.height),r.font=this._font,r.strokeStyle=e.stroke,r.lineWidth=e.strokeThickness,r.textBaseline=e.textBaseline,r.lineJoin=e.lineJoin,r.miterLimit=e.miterLimit;var f=void 0,d=void 0;if(e.dropShadow){r.fillStyle=e.dropShadowColor,r.globalAlpha=e.dropShadowAlpha,r.shadowBlur=e.dropShadowBlur,e.dropShadowBlur>0&&(r.shadowColor=e.dropShadowColor);for(var p=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,_=Math.sin(e.dropShadowAngle)*e.dropShadowDistance,v=0;v<a.length;v++)f=e.strokeThickness/2,d=e.strokeThickness/2+v*s+c.ascent,"right"===e.align?f+=l-u[v]:"center"===e.align&&(f+=(l-u[v])/2),e.fill&&(this.drawLetterSpacing(a[v],f+p+e.padding,d+_+e.padding),e.stroke&&e.strokeThickness&&(r.strokeStyle=e.dropShadowColor,this.drawLetterSpacing(a[v],f+p+e.padding,d+_+e.padding,!0),r.strokeStyle=e.stroke))}r.shadowBlur=0,r.globalAlpha=1,r.fillStyle=this._generateFillStyle(e,a);for(var g=0;g<a.length;g++)f=e.strokeThickness/2,d=e.strokeThickness/2+g*s+c.ascent,"right"===e.align?f+=l-u[g]:"center"===e.align&&(f+=(l-u[g])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(a[g],f+e.padding,d+e.padding,!0),e.fill&&this.drawLetterSpacing(a[g],f+e.padding,d+e.padding);this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this._style.letterSpacing;if(0!==i)for(var o=String.prototype.split.call(t,""),a=e,s=0,u="";s<t.length;)u=o[s++],n?this.context.strokeText(u,a,r):this.context.fillText(u,a,r),a+=this.context.measureText(u).width+i;else n?this.context.strokeText(t,e,r):this.context.fillText(t,e,r)},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=(0,f.default)(t);t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0)}var r=this._texture,n=this._style,i=n.trim?0:n.padding,o=r.baseTexture;o.hasLoaded=!0,o.resolution=this.resolution,o.realWidth=t.width,o.realHeight=t.height,o.width=t.width/this.resolution,o.height=t.height/this.resolution,r.trim.width=r._frame.width=t.width/this.resolution,r.trim.height=r._frame.height=t.height/this.resolution,r.trim.x=-i,r.trim.y=-i,r.orig.width=r._frame.width-2*i,r.orig.height=r._frame.height-2*i,this._onTextureUpdate(),o.emit("update",o),this.dirty=!1},e.prototype.renderWebGL=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype.renderWebGL.call(this,e)},e.prototype._renderCanvas=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._renderCanvas.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._onStyleChange=function(){this.dirty=!0},e.prototype._generateFillStyle=function(t,e){if(!Array.isArray(t.fill))return t.fill;if(navigator.isCocoonJS)return t.fill[0];var r=void 0,n=void 0,i=void 0,o=void 0,a=this.canvas.width/this.resolution,s=this.canvas.height/this.resolution,l=t.fill.slice(),c=t.fillGradientStops.slice();if(!c.length)for(var h=l.length+1,f=1;f<h;++f)c.push(f/h);if(l.unshift(t.fill[0]),c.unshift(0),l.push(t.fill[t.fill.length-1]),c.push(1),t.fillGradientType===u.TEXT_GRADIENT.LINEAR_VERTICAL){r=this.context.createLinearGradient(a/2,0,a/2,s),n=(l.length+1)*e.length,i=0;for(var d=0;d<e.length;d++){i+=1;for(var p=0;p<l.length;p++)o="number"==typeof c[p]?c[p]/e.length+d/e.length:i/n,r.addColorStop(o,l[p]),i++}}else{r=this.context.createLinearGradient(0,s/2,a,s/2),n=l.length+1,i=1;for(var _=0;_<l.length;_++)o="number"==typeof c[_]?c[_]:i/n,r.addColorStop(o,l[_]),i++}return r},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},p,e),t.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},n(e,[{key:"width",get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){this.updateText(!0);var e=(0,s.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=(0,s.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"style",get:function(){return this._style},set:function(t){(t=t||{})instanceof c.default?this._style=t:this._style=new c.default(t),this.localStyleID=-1,this.dirty=!0}},{key:"text",get:function(){return this._text},set:function(t){t=String(""===t||null===t||void 0===t?" ":t),this._text!==t&&(this._text=t,this.dirty=!0)}}]),e}(i.default);e.default=_},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=t.width,r=t.height,n=t.getContext("2d"),i=n.getImageData(0,0,e,r).data,o=i.length,a={top:null,left:null,right:null,bottom:null},s=void 0,u=void 0,l=void 0;for(s=0;s<o;s+=4)0!==i[s+3]&&(u=s/4%e,l=~~(s/4/e),null===a.top&&(a.top=l),null===a.left?a.left=u:u<a.left&&(a.left=u),null===a.right?a.right=u+1:a.right<u&&(a.right=u+1),null===a.bottom?a.bottom=l:a.bottom<l&&(a.bottom=l));e=a.right-a.left,r=a.bottom-a.top+1;var c=n.getImageData(a.left,a.top,e,r);return{height:r,width:e,data:c}}},function(t,e,r){"use strict";e.__esModule=!0;var n=p(r(13)),i=p(r(35)),o=p(r(10)),a=p(r(69)),s=p(r(32)),u=r(6),l=r(4),c=r(2),h=p(r(28)),f=p(r(145)),d=p(r(14));function p(t){return t&&t.__esModule?t:{default:t}}var _=void 0,v=new u.Matrix,g=new u.Point,y=new Float32Array(4),m=new Float32Array(4),E=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return n.fillAlpha=1,n.lineWidth=0,n.nativeLines=r,n.lineColor=0,n.lineAlignment=.5,n.graphicsData=[],n.tint=16777215,n._prevTint=16777215,n.blendMode=c.BLEND_MODES.NORMAL,n.currentPath=null,n._webGL={},n.isMask=!1,n.boundsPadding=0,n._localBounds=new h.default,n.dirty=0,n.fastRectDirty=-1,n.clearDirty=0,n.boundsDirty=-1,n.cachedSpriteDirty=!1,n._spriteRect=null,n._fastRect=!1,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.clone=function(){var t=new e;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.lineAlignment=this.lineAlignment,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var r=0;r<this.graphicsData.length;++r)t.graphicsData.push(this.graphicsData[r].clone());return t.currentPath=t.graphicsData[t.graphicsData.length-1],t.updateLocalBounds(),t},e.prototype._quadraticCurveLength=function(t,e,r,n,i,o){var a=t-(2*r+i),s=e-(2*n+o),u=(r-2)*t*2,l=(n-2)*e*2,c=4*(a*a+s*s),h=4*(a*u+s*l),f=u*u+l*l,d=2*Math.sqrt(c+h+f),p=Math.sqrt(c),_=2*c*p,v=2*Math.sqrt(f),g=h/p;return(_*d+p*h*(d-v)+(4*f*c-h*h)*Math.log((2*p+g+d)/(g+v)))/(4*_)},e.prototype._bezierCurveLength=function(t,e,r,n,i,o,a,s){for(var u=0,l=0,c=0,h=0,f=0,d=0,p=0,_=0,v=0,g=0,y=0,m=t,E=e,x=1;x<=10;++x)g=m-(_=(p=(d=(f=1-(l=x/10))*f)*f)*t+3*d*l*r+3*f*(c=l*l)*i+(h=c*l)*a),y=E-(v=p*e+3*d*l*n+3*f*c*o+h*s),m=_,E=v,u+=Math.sqrt(g*g+y*y);return u},e.prototype._segmentsCount=function(t){var r=Math.ceil(t/e.CURVES.maxLength);return r<e.CURVES.minSegments?r=e.CURVES.minSegments:r>e.CURVES.maxSegments&&(r=e.CURVES.maxSegments),r},e.prototype.lineStyle=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;if(this.lineWidth=t,this.lineColor=e,this.lineAlpha=r,this.lineAlignment=n,this.currentPath)if(this.currentPath.shape.points.length){var i=new u.Polygon(this.currentPath.shape.points.slice(-2));i.closed=!1,this.drawShape(i)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha,this.currentPath.lineAlignment=this.lineAlignment;return this},e.prototype.moveTo=function(t,e){var r=new u.Polygon([t,e]);return r.closed=!1,this.drawShape(r),this},e.prototype.lineTo=function(t,e){return this.currentPath.shape.points.push(t,e),this.dirty++,this},e.prototype.quadraticCurveTo=function(t,r,n,i){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var o=this.currentPath.shape.points,a=0,s=0;0===o.length&&this.moveTo(0,0);for(var u=o[o.length-2],l=o[o.length-1],c=e.CURVES.adaptive?this._segmentsCount(this._quadraticCurveLength(u,l,t,r,n,i)):20,h=1;h<=c;++h){var f=h/c;a=u+(t-u)*f,s=l+(r-l)*f,o.push(a+(t+(n-t)*f-a)*f,s+(r+(i-r)*f-s)*f)}return this.dirty++,this},e.prototype.bezierCurveTo=function(t,r,n,i,o,a){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var s=this.currentPath.shape.points,u=s[s.length-2],l=s[s.length-1];s.length-=2;var c=e.CURVES.adaptive?this._segmentsCount(this._bezierCurveLength(u,l,t,r,n,i,o,a)):20;return(0,f.default)(u,l,t,r,n,i,o,a,c,s),this.dirty++,this},e.prototype.arcTo=function(t,e,r,n,i){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var o=this.currentPath.shape.points,a=o[o.length-2],s=o[o.length-1]-e,u=a-t,l=n-e,c=r-t,h=Math.abs(s*c-u*l);if(h<1e-8||0===i)o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e);else{var f=s*s+u*u,d=l*l+c*c,p=s*l+u*c,_=i*Math.sqrt(f)/h,v=i*Math.sqrt(d)/h,g=_*p/f,y=v*p/d,m=_*c+v*u,E=_*l+v*s,x=u*(v+g),b=s*(v+g),T=c*(_+y),R=l*(_+y),O=Math.atan2(b-E,x-m),S=Math.atan2(R-E,T-m);this.arc(m+t,E+e,i,O,S,u*l>c*s)}return this.dirty++,this},e.prototype.arc=function(t,r,n,i,o){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(i===o)return this;!a&&o<=i?o+=c.PI_2:a&&i<=o&&(i+=c.PI_2);var s=o-i,u=e.CURVES.adaptive?this._segmentsCount(Math.abs(s)*n):40*Math.ceil(Math.abs(s)/c.PI_2);if(0===s)return this;var l=t+Math.cos(i)*n,h=r+Math.sin(i)*n,f=this.currentPath?this.currentPath.shape.points:null;f?f[f.length-2]===l&&f[f.length-1]===h||f.push(l,h):(this.moveTo(l,h),f=this.currentPath.shape.points);for(var d=s/(2*u),p=2*d,_=Math.cos(d),v=Math.sin(d),g=u-1,y=g%1/g,m=0;m<=g;++m){var E=d+i+p*(m+y*m),x=Math.cos(E),b=-Math.sin(E);f.push((_*x+v*b)*n+t,(_*-b+v*x)*n+r)}return this.dirty++,this},e.prototype.beginFill=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.filling=!0,this.fillColor=t,this.fillAlpha=e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},e.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},e.prototype.drawRect=function(t,e,r,n){return this.drawShape(new u.Rectangle(t,e,r,n)),this},e.prototype.drawRoundedRect=function(t,e,r,n,i){return this.drawShape(new u.RoundedRectangle(t,e,r,n,i)),this},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new u.Circle(t,e,r)),this},e.prototype.drawEllipse=function(t,e,r,n){return this.drawShape(new u.Ellipse(t,e,r,n)),this},e.prototype.drawPolygon=function(t){var e=t,r=!0;if(e instanceof u.Polygon&&(r=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var n=0;n<e.length;++n)e[n]=arguments[n]}var i=new u.Polygon(e);return i.closed=r,this.drawShape(i),this},e.prototype.drawStar=function(t,e,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;i=i||n/2;for(var a=-1*Math.PI/2+o,s=2*r,u=c.PI_2/s,l=[],h=0;h<s;h++){var f=h%2?i:n,d=h*u+a;l.push(t+f*Math.cos(d),e+f*Math.sin(d))}return this.drawPolygon(l)},e.prototype.clear=function(){return(this.lineWidth||this.filling||this.graphicsData.length>0)&&(this.lineWidth=0,this.lineAlignment=.5,this.filling=!1,this.boundsDirty=-1,this.dirty++,this.clearDirty++,this.graphicsData.length=0),this.currentPath=null,this._spriteRect=null,this},e.prototype.isFastRect=function(){return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===c.SHAPES.RECT&&!this.graphicsData[0].lineWidth},e.prototype._renderWebGL=function(t){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect()),this._fastRect?this._renderSpriteRect(t):(t.setObjectRenderer(t.plugins.graphics),t.plugins.graphics.render(this))},e.prototype._renderSpriteRect=function(t){var e=this.graphicsData[0].shape;this._spriteRect||(this._spriteRect=new s.default(new o.default(o.default.WHITE)));var r=this._spriteRect;if(16777215===this.tint)r.tint=this.graphicsData[0].fillColor;else{var n=y,i=m;(0,l.hex2rgb)(this.graphicsData[0].fillColor,n),(0,l.hex2rgb)(this.tint,i),n[0]*=i[0],n[1]*=i[1],n[2]*=i[2],r.tint=(0,l.rgb2hex)(n)}r.alpha=this.graphicsData[0].fillAlpha,r.worldAlpha=this.worldAlpha*r.alpha,r.blendMode=this.blendMode,r._texture._frame.width=e.width,r._texture._frame.height=e.height,r.transform.worldTransform=this.transform.worldTransform,r.anchor.set(-e.x/e.width,-e.y/e.height),r._onAnchorUpdate(),r._renderWebGL(t)},e.prototype._renderCanvas=function(t){!0!==this.isMask&&t.plugins.graphics.render(this)},e.prototype._calculateBounds=function(){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.cachedSpriteDirty=!0);var t=this._localBounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,g);for(var e=this.graphicsData,r=0;r<e.length;++r){var n=e[r];if(n.fill&&(n.shape&&n.shape.contains(g.x,g.y))){if(n.holes)for(var i=0;i<n.holes.length;i++){if(n.holes[i].contains(g.x,g.y))return!1}return!0}}return!1},e.prototype.updateLocalBounds=function(){var t=1/0,e=-1/0,r=1/0,n=-1/0;if(this.graphicsData.length)for(var i=0,o=0,a=0,s=0,u=0,l=0;l<this.graphicsData.length;l++){var h=this.graphicsData[l],f=h.type,d=h.lineWidth;if(i=h.shape,f===c.SHAPES.RECT||f===c.SHAPES.RREC)o=i.x-d/2,a=i.y-d/2,s=i.width+d,u=i.height+d,t=o<t?o:t,e=o+s>e?o+s:e,r=a<r?a:r,n=a+u>n?a+u:n;else if(f===c.SHAPES.CIRC)o=i.x,a=i.y,s=i.radius+d/2,u=i.radius+d/2,t=o-s<t?o-s:t,e=o+s>e?o+s:e,r=a-u<r?a-u:r,n=a+u>n?a+u:n;else if(f===c.SHAPES.ELIP)o=i.x,a=i.y,s=i.width+d/2,u=i.height+d/2,t=o-s<t?o-s:t,e=o+s>e?o+s:e,r=a-u<r?a-u:r,n=a+u>n?a+u:n;else for(var p=i.points,_=0,v=0,g=0,y=0,m=0,E=0,x=0,b=0,T=0;T+2<p.length;T+=2)o=p[T],a=p[T+1],_=p[T+2],v=p[T+3],g=Math.abs(_-o),y=Math.abs(v-a),u=d,(s=Math.sqrt(g*g+y*y))<1e-9||(E=(u/s*g+y)/2,b=(v+a)/2,t=(x=(_+o)/2)-(m=(u/s*y+g)/2)<t?x-m:t,e=x+m>e?x+m:e,r=b-E<r?b-E:r,n=b+E>n?b+E:n)}else t=0,e=0,r=0,n=0;var R=this.boundsPadding;this._localBounds.minX=t-R,this._localBounds.maxX=e+R,this._localBounds.minY=r-R,this._localBounds.maxY=n+R},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new a.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,this.nativeLines,t,this.lineAlignment);return this.graphicsData.push(e),e.type===c.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty++,e},e.prototype.generateCanvasTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.getLocalBounds(),n=i.default.create(r.width,r.height,t,e);_||(_=new d.default),this.transform.updateLocalTransform(),this.transform.localTransform.copy(v),v.invert(),v.tx-=r.x,v.ty-=r.y,_.render(this,n,!0,v);var a=o.default.fromCanvas(n.baseTexture._canvasRenderTarget.canvas,t,"graphics");return a.baseTexture.resolution=e,a.baseTexture.update(),a},e.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},e.prototype.addHole=function(){var t=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape),this.currentPath=null,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var r=0;r<this.graphicsData.length;++r)this.graphicsData[r].destroy();for(var n in this._webGL)for(var i=0;i<this._webGL[n].data.length;++i)this._webGL[n].data[i].destroy();this._spriteRect&&this._spriteRect.destroy(),this.graphicsData=null,this.currentPath=null,this._webGL=null,this._localBounds=null},e}(n.default);e.default=E,E._SPRITE_TEXTURE=null,E.CURVES={adaptive:!1,maxLength:10,minSegments:8,maxSegments:2048}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r,n,i,o,a,s,u){var l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[],c=0,h=0,f=0,d=0,p=0;l.push(t,e);for(var _=1,v=0;_<=u;++_)f=(h=(c=1-(v=_/u))*c)*c,p=(d=v*v)*v,l.push(f*t+3*h*v*r+3*c*d*i+p*a,f*e+3*h*v*n+3*c*d*o+p*s);return l}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(4),i=r(2),o=d(r(20)),a=d(r(21)),s=d(r(147)),u=d(r(148)),l=d(r(149)),c=d(r(150)),h=d(r(151)),f=d(r(152));function d(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.graphicsDataPool=[],n.primitiveShader=null,n.gl=r.gl,n.CONTEXT_UID=0,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new u.default(this.gl)},e.prototype.destroy=function(){o.default.prototype.destroy.call(this);for(var t=0;t<this.graphicsDataPool.length;++t)this.graphicsDataPool[t].destroy();this.graphicsDataPool=null},e.prototype.render=function(t){var e=this.renderer,r=e.gl,i=void 0,o=t._webGL[this.CONTEXT_UID];o&&t.dirty===o.dirty||(this.updateGraphics(t),o=t._webGL[this.CONTEXT_UID]);var a=this.primitiveShader;e.bindShader(a),e.state.setBlendMode(t.blendMode);for(var s=0,u=o.data.length;s<u;s++){var l=(i=o.data[s]).shader;e.bindShader(l),l.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),l.uniforms.tint=(0,n.hex2rgb)(t.tint),l.uniforms.alpha=t.worldAlpha,e.bindVao(i.vao),i.nativeLines?r.drawArrays(r.LINES,0,i.points.length/6):i.vao.draw(r.TRIANGLE_STRIP,i.indices.length)}},e.prototype.updateGraphics=function(t){var e=this.renderer.gl,r=t._webGL[this.CONTEXT_UID];if(r||(r=t._webGL[this.CONTEXT_UID]={lastIndex:0,data:[],gl:e,clearDirty:-1,dirty:-1}),r.dirty=t.dirty,t.clearDirty!==r.clearDirty){r.clearDirty=t.clearDirty;for(var n=0;n<r.data.length;n++)this.graphicsDataPool.push(r.data[n]);r.data.length=0,r.lastIndex=0}for(var o=void 0,a=void 0,s=r.lastIndex;s<t.graphicsData.length;s++){var u=t.graphicsData[s];o=this.getWebGLData(r,0),u.nativeLines&&u.lineWidth&&(a=this.getWebGLData(r,0,!0),r.lastIndex++),u.type===i.SHAPES.POLY&&(0,l.default)(u,o,a),u.type===i.SHAPES.RECT?(0,c.default)(u,o,a):u.type===i.SHAPES.CIRC||u.type===i.SHAPES.ELIP?(0,f.default)(u,o,a):u.type===i.SHAPES.RREC&&(0,h.default)(u,o,a),r.lastIndex++}this.renderer.bindVao(null);for(var d=0;d<r.data.length;d++)(o=r.data[d]).dirty&&o.upload()},e.prototype.getWebGLData=function(t,e,r){var n=t.data[t.data.length-1];return(!n||n.nativeLines!==r||n.points.length>32e4)&&((n=this.graphicsDataPool.pop()||new s.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState)).nativeLines=r,n.reset(e),t.data.push(n)),n.dirty=!0,n},e}(o.default);e.default=p,a.default.registerPlugin("graphics",p)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(7));var i=function(){function t(e,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=n.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.nativeLines=!1,this.glPoints=null,this.glIndices=null,this.shader=r,this.vao=new n.default.VertexArrayObject(e,i).addIndex(this.indexBuffer).addAttribute(this.buffer,r.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,r.attributes.aColor,e.FLOAT,!1,24,8)}return t.prototype.reset=function(){this.points.length=0,this.indices.length=0},t.prototype.upload=function(){this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},t.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.vao.destroy(),this.buffer.destroy(),this.indexBuffer.destroy(),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null},t}();e.default=i},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n")))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(r(16)).default);e.default=n},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){t.points=t.shape.points.slice();var a=t.points;if(t.fill&&a.length>=6){for(var s=[],u=t.holes,l=0;l<u.length;l++){var c=u[l];s.push(a.length/2),a=a.concat(c.points)}var h=e.points,f=e.indices,d=a.length/2,p=(0,i.hex2rgb)(t.fillColor),_=t.fillAlpha,v=p[0]*_,g=p[1]*_,y=p[2]*_,m=(0,o.default)(a,s,2);if(!m)return;for(var E=h.length/6,x=0;x<m.length;x+=3)f.push(m[x]+E),f.push(m[x]+E),f.push(m[x+1]+E),f.push(m[x+2]+E),f.push(m[x+2]+E);for(var b=0;b<d;b++)h.push(a[2*b],a[2*b+1],v,g,y,_)}t.lineWidth>0&&(0,n.default)(t,e,r)};var n=a(r(23)),i=r(4),o=a(r(31));function a(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){var o=t.shape,a=o.x,s=o.y,u=o.width,l=o.height;if(t.fill){var c=(0,i.hex2rgb)(t.fillColor),h=t.fillAlpha,f=c[0]*h,d=c[1]*h,p=c[2]*h,_=e.points,v=e.indices,g=_.length/6;_.push(a,s),_.push(f,d,p,h),_.push(a+u,s),_.push(f,d,p,h),_.push(a,s+l),_.push(f,d,p,h),_.push(a+u,s+l),_.push(f,d,p,h),v.push(g,g,g+1,g+2,g+3,g+3)}if(t.lineWidth){var y=t.points;t.points=[a,s,a+u,s,a+u,s+l,a,s+l,a,s],(0,n.default)(t,e,r),t.points=y}};var n=function(t){return t&&t.__esModule?t:{default:t}}(r(23)),i=r(4)},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){var a=t.shape,s=a.x,l=a.y,c=a.width,h=a.height,f=a.radius,d=[];if(d.push(s,l+f),u(s,l+h-f,s,l+h,s+f,l+h,d),u(s+c-f,l+h,s+c,l+h,s+c,l+h-f,d),u(s+c,l+f,s+c,l,s+c-f,l,d),u(s+f,l,s,l,s,l+f+1e-10,d),t.fill){for(var p=(0,o.hex2rgb)(t.fillColor),_=t.fillAlpha,v=p[0]*_,g=p[1]*_,y=p[2]*_,m=e.points,E=e.indices,x=m.length/6,b=(0,n.default)(d,null,2),T=0,R=b.length;T<R;T+=3)E.push(b[T]+x),E.push(b[T]+x),E.push(b[T+1]+x),E.push(b[T+2]+x),E.push(b[T+2]+x);for(var O=0,S=d.length;O<S;O++)m.push(d[O],d[++O],v,g,y,_)}if(t.lineWidth){var w=t.points;t.points=d,(0,i.default)(t,e,r),t.points=w}};var n=a(r(31)),i=a(r(23)),o=r(4);function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e,r){return t+(e-t)*r}function u(t,e,r,n,i,o){for(var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],u=0,l=0,c=0,h=0,f=0,d=0,p=0,_=0;p<=20;++p)u=s(t,r,_=p/20),l=s(e,n,_),c=s(r,i,_),h=s(n,o,_),f=s(u,c,_),d=s(l,h,_),a.push(f,d);return a}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){var a=t.shape,s=a.x,u=a.y,l=void 0,c=void 0;t.type===i.SHAPES.CIRC?(l=a.radius,c=a.radius):(l=a.width,c=a.height);if(0===l||0===c)return;var h=Math.floor(30*Math.sqrt(a.radius))||Math.floor(15*Math.sqrt(a.width+a.height)),f=2*Math.PI/h;if(t.fill){var d=(0,o.hex2rgb)(t.fillColor),p=t.fillAlpha,_=d[0]*p,v=d[1]*p,g=d[2]*p,y=e.points,m=e.indices,E=y.length/6;m.push(E);for(var x=0;x<h+1;x++)y.push(s,u,_,v,g,p),y.push(s+Math.sin(f*x)*l,u+Math.cos(f*x)*c,_,v,g,p),m.push(E++,E++);m.push(E-1)}if(t.lineWidth){var b=t.points;t.points=[];for(var T=0;T<h+1;T++)t.points.push(s+Math.sin(f*-T)*l,u+Math.cos(f*-T)*c);(0,n.default)(t,e,r),t.points=b}};var n=function(t){return t&&t.__esModule?t:{default:t}}(r(23)),i=r(2),o=r(4)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r(14)),i=r(2);var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,r=e.context,n=t.worldAlpha,o=t.transform.worldTransform,a=e.resolution;this._prevTint!==this.tint&&(this.dirty=!0),r.setTransform(o.a*a,o.b*a,o.c*a,o.d*a,o.tx*a,o.ty*a),t.dirty&&(this.updateGraphicsTint(t),t.dirty=!1),e.setBlendMode(t.blendMode);for(var s=0;s<t.graphicsData.length;s++){var u=t.graphicsData[s],l=u.shape,c=u._fillTint,h=u._lineTint;if(r.lineWidth=u.lineWidth,u.type===i.SHAPES.POLY){r.beginPath(),this.renderPolygon(l.points,l.closed,r);for(var f=0;f<u.holes.length;f++)this.renderPolygon(u.holes[f].points,!0,r);u.fill&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.stroke())}else if(u.type===i.SHAPES.RECT)(u.fillColor||0===u.fillColor)&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fillRect(l.x,l.y,l.width,l.height)),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.strokeRect(l.x,l.y,l.width,l.height));else if(u.type===i.SHAPES.CIRC)r.beginPath(),r.arc(l.x,l.y,l.radius,0,2*Math.PI),r.closePath(),u.fill&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.stroke());else if(u.type===i.SHAPES.ELIP){var d=2*l.width,p=2*l.height,_=l.x-d/2,v=l.y-p/2;r.beginPath();var g=d/2*.5522848,y=p/2*.5522848,m=_+d,E=v+p,x=_+d/2,b=v+p/2;r.moveTo(_,b),r.bezierCurveTo(_,b-y,x-g,v,x,v),r.bezierCurveTo(x+g,v,m,b-y,m,b),r.bezierCurveTo(m,b+y,x+g,E,x,E),r.bezierCurveTo(x-g,E,_,b+y,_,b),r.closePath(),u.fill&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.stroke())}else if(u.type===i.SHAPES.RREC){var T=l.x,R=l.y,O=l.width,S=l.height,w=l.radius,C=Math.min(O,S)/2|0;w=w>C?C:w,r.beginPath(),r.moveTo(T,R+w),r.lineTo(T,R+S-w),r.quadraticCurveTo(T,R+S,T+w,R+S),r.lineTo(T+O-w,R+S),r.quadraticCurveTo(T+O,R+S,T+O,R+S-w),r.lineTo(T+O,R+w),r.quadraticCurveTo(T+O,R,T+O-w,R),r.lineTo(T+w,R),r.quadraticCurveTo(T,R,T,R+w),r.closePath(),(u.fillColor||0===u.fillColor)&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.stroke())}}},t.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,r=(t.tint>>8&255)/255,n=(255&t.tint)/255,i=0;i<t.graphicsData.length;++i){var o=t.graphicsData[i],a=0|o.fillColor,s=0|o.lineColor;o._fillTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*r*255<<8)+(255&a)/255*n*255,o._lineTint=((s>>16&255)/255*e*255<<16)+((s>>8&255)/255*r*255<<8)+(255&s)/255*n*255}},t.prototype.renderPolygon=function(t,e,r){r.moveTo(t[0],t[1]);for(var n=1;n<t.length/2;++n)r.lineTo(t[2*n],t[2*n+1]);e&&r.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();e.default=o,n.default.registerPlugin("graphics",o)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(3),o=r(4);var a=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.baseTexture=e,this.textures={},this.data=r,this.resolution=this._updateResolution(n||this.baseTexture.imageUrl),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return n(t,null,[{key:"BATCH_SIZE",get:function(){return 1e3}}]),t.prototype._updateResolution=function(t){var e=this.data.meta.scale,r=(0,o.getResolutionOfUrl)(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&(this.baseTexture.resolution=r,this.baseTexture.update()),r},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var r=e,n=t.BATCH_SIZE,o=this.baseTexture.sourceScale;r-e<n&&r<this._frameKeys.length;){var a=this._frameKeys[r],s=this._frames[a],u=s.frame;if(u){var l=null,c=null,h=!1!==s.trimmed&&s.sourceSize?s.sourceSize:s.frame,f=new i.Rectangle(0,0,Math.floor(h.w*o)/this.resolution,Math.floor(h.h*o)/this.resolution);l=s.rotated?new i.Rectangle(Math.floor(u.x*o)/this.resolution,Math.floor(u.y*o)/this.resolution,Math.floor(u.h*o)/this.resolution,Math.floor(u.w*o)/this.resolution):new i.Rectangle(Math.floor(u.x*o)/this.resolution,Math.floor(u.y*o)/this.resolution,Math.floor(u.w*o)/this.resolution,Math.floor(u.h*o)/this.resolution),!1!==s.trimmed&&s.spriteSourceSize&&(c=new i.Rectangle(Math.floor(s.spriteSourceSize.x*o)/this.resolution,Math.floor(s.spriteSourceSize.y*o)/this.resolution,Math.floor(u.w*o)/this.resolution,Math.floor(u.h*o)/this.resolution)),this.textures[a]=new i.Texture(this.baseTexture,l,f,c,s.rotated?2:0),i.Texture.addToCache(this.textures[a],a)}r++}},t.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},t.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout(function(){e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch():e._parseComplete()},0)},t.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];for(var e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&this.baseTexture.destroy(),this.baseTexture=null},t}();e.default=a},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=t.mesh,r=t.particles,n=t.extras,o=t.filters,a=t.prepare,s=t.loaders,u=t.interaction;Object.defineProperties(t,{SpriteBatch:{get:function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")}},AssetLoader:{get:function(){throw new ReferenceError("The loader system was overhauled in PixiJS v3, please see the new PIXI.loaders.Loader class.")}},Stage:{get:function(){return i("You do not need to use a PIXI Stage any more, you can simply render any container."),t.Container}},DisplayObjectContainer:{get:function(){return i("DisplayObjectContainer has been shortened to Container, please use Container from now on."),t.Container}},Strip:{get:function(){return i("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),e.Mesh}},Rope:{get:function(){return i("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),e.Rope}},ParticleContainer:{get:function(){return i("The ParticleContainer class has been moved to particles.ParticleContainer, please use particles.ParticleContainer from now on."),r.ParticleContainer}},MovieClip:{get:function(){return i("The MovieClip class has been moved to extras.AnimatedSprite, please use extras.AnimatedSprite."),n.AnimatedSprite}},TilingSprite:{get:function(){return i("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),n.TilingSprite}},BitmapText:{get:function(){return i("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),n.BitmapText}},blendModes:{get:function(){return i("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),t.BLEND_MODES}},scaleModes:{get:function(){return i("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),t.SCALE_MODES}},BaseTextureCache:{get:function(){return i("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),t.utils.BaseTextureCache}},TextureCache:{get:function(){return i("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),t.utils.TextureCache}},math:{get:function(){return i("The math namespace is deprecated, please access members already accessible on PIXI."),t}},AbstractFilter:{get:function(){return i("AstractFilter has been renamed to Filter, please use PIXI.Filter"),t.Filter}},TransformManual:{get:function(){return i("TransformManual has been renamed to TransformBase, please update your pixi-spine"),t.TransformBase}},TARGET_FPMS:{get:function(){return i("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),t.settings.TARGET_FPMS},set:function(e){i("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),t.settings.TARGET_FPMS=e}},FILTER_RESOLUTION:{get:function(){return i("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),t.settings.FILTER_RESOLUTION},set:function(e){i("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),t.settings.FILTER_RESOLUTION=e}},RESOLUTION:{get:function(){return i("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),t.settings.RESOLUTION},set:function(e){i("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),t.settings.RESOLUTION=e}},MIPMAP_TEXTURES:{get:function(){return i("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),t.settings.MIPMAP_TEXTURES},set:function(e){i("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),t.settings.MIPMAP_TEXTURES=e}},SPRITE_BATCH_SIZE:{get:function(){return i("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),t.settings.SPRITE_BATCH_SIZE},set:function(e){i("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),t.settings.SPRITE_BATCH_SIZE=e}},SPRITE_MAX_TEXTURES:{get:function(){return i("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),t.settings.SPRITE_MAX_TEXTURES},set:function(e){i("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),t.settings.SPRITE_MAX_TEXTURES=e}},RETINA_PREFIX:{get:function(){return i("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),t.settings.RETINA_PREFIX},set:function(e){i("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),t.settings.RETINA_PREFIX=e}},DEFAULT_RENDER_OPTIONS:{get:function(){return i("PIXI.DEFAULT_RENDER_OPTIONS has been deprecated, please use PIXI.settings.DEFAULT_RENDER_OPTIONS"),t.settings.RENDER_OPTIONS}}});for(var l=[{parent:"TRANSFORM_MODE",target:"TRANSFORM_MODE"},{parent:"GC_MODES",target:"GC_MODE"},{parent:"WRAP_MODES",target:"WRAP_MODE"},{parent:"SCALE_MODES",target:"SCALE_MODE"},{parent:"PRECISION",target:"PRECISION_FRAGMENT"}],c=function(e){var r=l[e];Object.defineProperty(t[r.parent],"DEFAULT",{get:function(){return i("PIXI."+r.parent+".DEFAULT has been deprecated, please use PIXI.settings."+r.target),t.settings[r.target]},set:function(e){i("PIXI."+r.parent+".DEFAULT has been deprecated, please use PIXI.settings."+r.target),t.settings[r.target]=e}})},h=0;h<l.length;h++)c(h);Object.defineProperties(t.settings,{PRECISION:{get:function(){return i("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),t.settings.PRECISION_FRAGMENT},set:function(e){i("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),t.settings.PRECISION_FRAGMENT=e}}}),n.AnimatedSprite&&Object.defineProperties(n,{MovieClip:{get:function(){return i("The MovieClip class has been renamed to AnimatedSprite, please use AnimatedSprite from now on."),n.AnimatedSprite}}});n&&Object.defineProperties(n,{TextureTransform:{get:function(){return i("The TextureTransform class has been renamed to TextureMatrix, please use PIXI.TextureMatrix from now on."),t.TextureMatrix}}});t.DisplayObject.prototype.generateTexture=function(t,e,r){return i("generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)"),t.generateTexture(this,e,r)},t.Graphics.prototype.generateTexture=function(t,e){return i("graphics generate texture has moved to the renderer. Or to render a graphics to a texture using canvas please use generateCanvasTexture"),this.generateCanvasTexture(t,e)},t.GroupD8.isSwapWidthHeight=function(e){return i("GroupD8.isSwapWidthHeight was renamed to GroupD8.isVertical"),t.GroupD8.isVertical(e)},t.RenderTexture.prototype.render=function(t,e,r,n){this.legacyRenderer.render(t,this,r,e,!n),i("RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)")},t.RenderTexture.prototype.getImage=function(t){return i("RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)"),this.legacyRenderer.extract.image(t)},t.RenderTexture.prototype.getBase64=function(t){return i("RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)"),this.legacyRenderer.extract.base64(t)},t.RenderTexture.prototype.getCanvas=function(t){return i("RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)"),this.legacyRenderer.extract.canvas(t)},t.RenderTexture.prototype.getPixels=function(t){return i("RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)"),this.legacyRenderer.pixels(t)},t.Sprite.prototype.setTexture=function(t){this.texture=t,i("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},n.BitmapText&&(n.BitmapText.prototype.setText=function(t){this.text=t,i("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")});t.Text.prototype.setText=function(t){this.text=t,i("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},t.Text.calculateFontProperties=function(e){return i("Text.calculateFontProperties is now deprecated, please use the TextMetrics.measureFont"),t.TextMetrics.measureFont(e)},Object.defineProperties(t.Text,{fontPropertiesCache:{get:function(){return i("Text.fontPropertiesCache is deprecated"),t.TextMetrics._fonts}},fontPropertiesCanvas:{get:function(){return i("Text.fontPropertiesCanvas is deprecated"),t.TextMetrics._canvas}},fontPropertiesContext:{get:function(){return i("Text.fontPropertiesContext is deprecated"),t.TextMetrics._context}}}),t.Text.prototype.setStyle=function(t){this.style=t,i("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},t.Text.prototype.determineFontProperties=function(e){return i("determineFontProperties is now deprecated, please use TextMetrics.measureFont method"),t.TextMetrics.measureFont(e)},t.Text.getFontStyle=function(e){return i("getFontStyle is now deprecated, please use TextStyle.toFontString() instead"),(e=e||{})instanceof t.TextStyle||(e=new t.TextStyle(e)),e.toFontString()},Object.defineProperties(t.TextStyle.prototype,{font:{get:function(){i("text style property 'font' is now deprecated, please use the 'fontFamily', 'fontSize', 'fontStyle', 'fontVariant' and 'fontWeight' properties from now on");var t="number"==typeof this._fontSize?this._fontSize+"px":this._fontSize;return this._fontStyle+" "+this._fontVariant+" "+this._fontWeight+" "+t+" "+this._fontFamily},set:function(t){i("text style property 'font' is now deprecated, please use the 'fontFamily','fontSize',fontStyle','fontVariant' and 'fontWeight' properties from now on"),t.indexOf("italic")>1?this._fontStyle="italic":t.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal",t.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";var e=t.split(" "),r=-1;this._fontSize=26;for(var n=0;n<e.length;++n)if(e[n].match(/(px|pt|em|%)/)){r=n,this._fontSize=e[n];break}this._fontWeight="normal";for(var o=0;o<r;++o)if(e[o].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)){this._fontWeight=e[o];break}if(r>-1&&r<e.length-1){this._fontFamily="";for(var a=r+1;a<e.length;++a)this._fontFamily+=e[a]+" ";this._fontFamily=this._fontFamily.slice(0,-1)}else this._fontFamily="Arial";this.styleID++}}}),t.Texture.prototype.setFrame=function(t){this.frame=t,i("setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;")},t.Texture.addTextureToCache=function(e,r){t.Texture.addToCache(e,r),i("Texture.addTextureToCache is deprecated, please use Texture.addToCache from now on.")},t.Texture.removeTextureFromCache=function(e){return i("Texture.removeTextureFromCache is deprecated, please use Texture.removeFromCache from now on. Be aware that Texture.removeFromCache does not automatically its BaseTexture from the BaseTextureCache. For that, use BaseTexture.removeFromCache"),t.BaseTexture.removeFromCache(e),t.Texture.removeFromCache(e)},Object.defineProperties(o,{AbstractFilter:{get:function(){return i("AstractFilter has been renamed to Filter, please use PIXI.Filter"),t.AbstractFilter}},SpriteMaskFilter:{get:function(){return i("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),t.SpriteMaskFilter}},VoidFilter:{get:function(){return i("VoidFilter has been renamed to AlphaFilter, please use PIXI.filters.AlphaFilter"),o.AlphaFilter}}}),t.utils.uuid=function(){return i("utils.uuid() is deprecated, please use utils.uid() from now on."),t.utils.uid()},t.utils.canUseNewCanvasBlendModes=function(){return i("utils.canUseNewCanvasBlendModes() is deprecated, please use CanvasTinter.canUseMultiply from now on"),t.CanvasTinter.canUseMultiply};var f=!0;Object.defineProperty(t.utils,"_saidHello",{set:function(t){t&&(i("PIXI.utils._saidHello is deprecated, please use PIXI.utils.skipHello()"),this.skipHello()),f=t},get:function(){return f}}),a.BasePrepare&&(a.BasePrepare.prototype.register=function(t,e){return i("renderer.plugins.prepare.register is now deprecated, please use renderer.plugins.prepare.registerFindHook & renderer.plugins.prepare.registerUploadHook"),t&&this.registerFindHook(t),e&&this.registerUploadHook(e),this});a.canvas&&Object.defineProperty(a.canvas,"UPLOADS_PER_FRAME",{set:function(){i("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return i("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}});a.webgl&&Object.defineProperty(a.webgl,"UPLOADS_PER_FRAME",{set:function(){i("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return i("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}});if(s.Loader){var d=s.Resource,p=s.Loader;Object.defineProperties(d.prototype,{isJson:{get:function(){return i("The isJson property is deprecated, please use `resource.type === Resource.TYPE.JSON`."),this.type===d.TYPE.JSON}},isXml:{get:function(){return i("The isXml property is deprecated, please use `resource.type === Resource.TYPE.XML`."),this.type===d.TYPE.XML}},isImage:{get:function(){return i("The isImage property is deprecated, please use `resource.type === Resource.TYPE.IMAGE`."),this.type===d.TYPE.IMAGE}},isAudio:{get:function(){return i("The isAudio property is deprecated, please use `resource.type === Resource.TYPE.AUDIO`."),this.type===d.TYPE.AUDIO}},isVideo:{get:function(){return i("The isVideo property is deprecated, please use `resource.type === Resource.TYPE.VIDEO`."),this.type===d.TYPE.VIDEO}}}),Object.defineProperties(p.prototype,{before:{get:function(){return i("The before() method is deprecated, please use pre()."),this.pre}},after:{get:function(){return i("The after() method is deprecated, please use use()."),this.use}}})}u.interactiveTarget&&Object.defineProperty(u.interactiveTarget,"defaultCursor",{set:function(t){i("Property defaultCursor has been replaced with 'cursor'. "),this.cursor=t},get:function(){return i("Property defaultCursor has been replaced with 'cursor'. "),this.cursor}});u.InteractionManager&&(Object.defineProperty(u.InteractionManager,"defaultCursorStyle",{set:function(t){i("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default=t},get:function(){return i("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default}}),Object.defineProperty(u.InteractionManager,"currentCursorStyle",{set:function(t){i("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode=t},get:function(){return i("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode}}))};var n={};function i(t){if(!n[t]){var e=(new Error).stack;void 0===e?console.warn("Deprecation Warning: ",t):(e=e.split("\n").splice(3).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cDeprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t),console.warn(e),console.groupEnd()):(console.warn("Deprecation Warning: ",t),console.warn(e))),n[t]=!0}}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(72);Object.defineProperty(e,"accessibleTarget",{enumerable:!0,get:function(){return o(n).default}});var i=r(157);function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"AccessibilityManager",{enumerable:!0,get:function(){return o(i).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=a(r(29)),o=a(r(72));function a(t){return t&&t.__esModule?t:{default:t}}n.utils.mixins.delayMixin(n.DisplayObject.prototype,o.default);var s=100,u=0,l=0,c=2,h=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!i.default.tablet&&!i.default.phone||navigator.isCocoonJS||this.createTouchHook();var r=document.createElement("div");r.style.width=s+"px",r.style.height=s+"px",r.style.position="absolute",r.style.top=u+"px",r.style.left=l+"px",r.style.zIndex=c,this.div=r,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=e,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessabillity=!1,window.addEventListener("keydown",this._onKeyDown,!1)}return t.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width="1px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.style.zIndex=2,e.style.backgroundColor="#FF0000",e.title="HOOK DIV",e.addEventListener("focus",function(){t.isMobileAccessabillity=!0,t.activate(),document.body.removeChild(e)}),document.body.appendChild(e)},t.prototype.activate=function(){this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},t.prototype.deactivate=function(){this.isActive&&!this.isMobileAccessabillity&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(t){if(t.visible){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,r=0;r<e.length;r++)this.updateAccessibleObjects(e[r])}},t.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,r=t.height/this.renderer.height,i=this.div;i.style.left=t.left+"px",i.style.top=t.top+"px",i.style.width=this.renderer.width+"px",i.style.height=this.renderer.height+"px";for(var o=0;o<this.children.length;o++){var a=this.children[o];if(a.renderId!==this.renderId)a._accessibleActive=!1,n.utils.removeItems(this.children,o,1),this.div.removeChild(a._accessibleDiv),this.pool.push(a._accessibleDiv),a._accessibleDiv=null,o--,0===this.children.length&&this.deactivate();else{i=a._accessibleDiv;var s=a.hitArea,u=a.worldTransform;a.hitArea?(i.style.left=(u.tx+s.x*u.a)*e+"px",i.style.top=(u.ty+s.y*u.d)*r+"px",i.style.width=s.width*u.a*e+"px",i.style.height=s.height*u.d*r+"px"):(s=a.getBounds(),this.capHitArea(s),i.style.left=s.x*e+"px",i.style.top=s.y*r+"px",i.style.width=s.width*e+"px",i.style.height=s.height*r+"px",i.title!==a.accessibleTitle&&null!==a.accessibleTitle&&(i.title=a.accessibleTitle),i.getAttribute("aria-label")!==a.accessibleHint&&null!==a.accessibleHint&&i.setAttribute("aria-label",a.accessibleHint))}}this.renderId++}},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width=s+"px",e.style.height=s+"px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=c,e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.div=null;for(var t=0;t<this.children.length;t++)this.children[t].div=null;window.document.removeEventListener("mousemove",this._onMouseMove),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();e.default=h,n.WebGLRenderer.registerPlugin("accessibility",h),n.CanvasRenderer.registerPlugin("accessibility",h)},function(t,e,r){"use strict";e.__esModule=!0;var n=r(159);Object.defineProperty(e,"webgl",{enumerable:!0,get:function(){return o(n).default}});var i=r(160);function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"canvas",{enumerable:!0,get:function(){return o(i).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));var i=new n.Rectangle,o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,r=void 0,o=void 0,a=void 0,s=!1,u=void 0,l=!1;t&&(t instanceof n.RenderTexture?u=t:(u=this.renderer.generateTexture(t),l=!0)),u?(o=(r=u.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]).resolution,a=u.frame,s=!1):(o=(r=this.renderer.rootRenderTarget).resolution,s=!0,(a=i).width=r.size.width,a.height=r.size.height);var c=a.width*o,h=a.height*o,f=new n.CanvasRenderTarget(c,h);if(r){e.bindRenderTarget(r);var d=new Uint8Array(4*c*h),p=e.gl;p.readPixels(a.x*o,a.y*o,c,h,p.RGBA,p.UNSIGNED_BYTE,d);var _=f.context.getImageData(0,0,c,h);_.data.set(d),f.context.putImageData(_,0,0),s&&(f.context.scale(1,-1),f.context.drawImage(f.canvas,0,-h))}return l&&u.destroy(!0),f.canvas},t.prototype.pixels=function(t){var e=this.renderer,r=void 0,o=void 0,a=void 0,s=void 0,u=!1;t&&(t instanceof n.RenderTexture?s=t:(s=this.renderer.generateTexture(t),u=!0)),s?(o=(r=s.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]).resolution,a=s.frame):(o=(r=this.renderer.rootRenderTarget).resolution,(a=i).width=r.size.width,a.height=r.size.height);var l=a.width*o,c=a.height*o,h=new Uint8Array(4*l*c);if(r){e.bindRenderTarget(r);var f=e.gl;f.readPixels(a.x*o,a.y*o,l,c,f.RGBA,f.UNSIGNED_BYTE,h)}return u&&s.destroy(!0),h},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();e.default=o,n.WebGLRenderer.registerPlugin("extract",o)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));var i=new n.Rectangle,o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,r=void 0,o=void 0,a=void 0,s=void 0;t&&(s=t instanceof n.RenderTexture?t:e.generateTexture(t)),s?(r=s.baseTexture._canvasRenderTarget.context,o=s.baseTexture._canvasRenderTarget.resolution,a=s.frame):(r=e.rootContext,(a=i).width=this.renderer.width,a.height=this.renderer.height);var u=a.width*o,l=a.height*o,c=new n.CanvasRenderTarget(u,l),h=r.getImageData(a.x*o,a.y*o,u,l);return c.context.putImageData(h,0,0),c.canvas},t.prototype.pixels=function(t){var e=this.renderer,r=void 0,o=void 0,a=void 0,s=void 0;return t&&(s=t instanceof n.RenderTexture?t:e.generateTexture(t)),s?(r=s.baseTexture._canvasRenderTarget.context,o=s.baseTexture._canvasRenderTarget.resolution,a=s.frame):(r=e.rootContext,(a=i).width=e.width,a.height=e.height),r.getImageData(0,0,a.width*o,a.height*o).data},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();e.default=o,n.CanvasRenderer.registerPlugin("extract",o)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));var o=function(t){function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r[0]instanceof i.Texture?r[0]:r[0].texture));return o._textures=null,o._durations=null,o.textures=r,o._autoUpdate=!1!==n,o.animationSpeed=1,o.loop=!0,o.onComplete=null,o.onFrameChange=null,o.onLoop=null,o._currentTime=0,o.playing=!1,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.stop=function(){this.playing&&(this.playing=!1,this._autoUpdate&&i.ticker.shared.remove(this.update,this))},e.prototype.play=function(){this.playing||(this.playing=!0,this._autoUpdate&&i.ticker.shared.add(this.update,this,i.UPDATE_PRIORITY.HIGH))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var n=this._currentTime%1*this._durations[this.currentFrame];for(n+=e/60*1e3;n<0;)this._currentTime--,n+=this._durations[this.currentFrame];var i=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);n>=this._durations[this.currentFrame];)n-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=n/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<r?this.onLoop():this.animationSpeed<0&&this.currentFrame>r&&this.onLoop()),this.updateTexture())},e.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.cachedTint=16777215,this.onFrameChange&&this.onFrameChange(this.currentFrame)},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e)},e.fromFrames=function(t){for(var r=[],n=0;n<t.length;++n)r.push(i.Texture.fromFrame(t[n]));return new e(r)},e.fromImages=function(t){for(var r=[],n=0;n<t.length;++n)r.push(i.Texture.fromImage(t[n]));return new e(r)},n(e,[{key:"totalFrames",get:function(){return this._textures.length}},{key:"textures",get:function(){return this._textures},set:function(t){if(t[0]instanceof i.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this.gotoAndStop(0),this.updateTexture()}},{key:"currentFrame",get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}}]),e}(i.Sprite);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=function(t){return t&&t.__esModule?t:{default:t}}(r(36));var a=new i.Point,s=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return a.tileTransform=new i.TransformStatic,a._width=n,a._height=o,a._canvasPattern=null,a.uvTransform=r.transform||new i.TextureMatrix(r),a.pluginName="tilingSprite",a.uvRespectAnchor=!1,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._onTextureUpdate=function(){this.uvTransform&&(this.uvTransform.texture=this._texture),this.cachedTint=16777215},e.prototype._renderWebGL=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvTransform.update(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var r=t.context,n=this.worldTransform,a=t.resolution,s=e.baseTexture,u=s.resolution,l=this.tilePosition.x/this.tileScale.x%e._frame.width*u,c=this.tilePosition.y/this.tileScale.y%e._frame.height*u;if(this._textureID!==this._texture._updateID||this.cachedTint!==this.tint){this._textureID=this._texture._updateID;var h=new i.CanvasRenderTarget(e._frame.width,e._frame.height,u);16777215!==this.tint?(this.tintedTexture=o.default.getTintedTexture(this,this.tint),h.context.drawImage(this.tintedTexture,0,0)):h.context.drawImage(s.source,-e._frame.x*u,-e._frame.y*u),this.cachedTint=this.tint,this._canvasPattern=h.context.createPattern(h.canvas,"repeat")}r.globalAlpha=this.worldAlpha,r.setTransform(n.a*a,n.b*a,n.c*a,n.d*a,n.tx*a,n.ty*a),t.setBlendMode(this.blendMode),r.fillStyle=this._canvasPattern,r.scale(this.tileScale.x/u,this.tileScale.y/u);var f=this.anchor.x*-this._width,d=this.anchor.y*-this._height;this.uvRespectAnchor?(r.translate(l,c),r.fillRect(-l+f,-c+d,this._width/this.tileScale.x*u,this._height/this.tileScale.y*u)):(r.translate(l+f,c+d),r.fillRect(-l,-c,this._width/this.tileScale.x*u,this._height/this.tileScale.y*u))}},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,r=this._width*(1-this._anchor._x),n=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,r,n)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new i.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,a);var e=this._width,r=this._height,n=-e*this.anchor._x;if(a.x>=n&&a.x<n+e){var i=-r*this.anchor._y;if(a.y>=i&&a.y<i+r)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvTransform=null},e.from=function(t,r,n){return new e(i.Texture.from(t),r,n)},e.fromFrame=function(t,r,n){var o=i.utils.TextureCache[t];if(!o)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new e(o,r,n)},e.fromImage=function(t,r,n,o,a){return new e(i.Texture.fromImage(t,o,a),r,n)},n(e,[{key:"clampMargin",get:function(){return this.uvTransform.clampMargin},set:function(t){this.uvTransform.clampMargin=t,this.uvTransform.update(!0)}},{key:"tileScale",get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copy(t)}},{key:"tilePosition",get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copy(t)}},{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}}]),e}(i.Sprite);e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=r(2);r(9);var o=new n.Matrix,a=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.shader=null,n.simpleShader=null,n.quad=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new n.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n gl_FragColor = sample * uColor;\n}\n"),this.simpleShader=new n.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = sample * uColor;\n}\n"),this.renderer.bindVao(null),this.quad=new n.Quad(t,this.renderer.state.attribState),this.quad.initVao(this.shader)},e.prototype.render=function(t){var e=this.renderer,r=this.quad;e.bindVao(r.vao);var a=r.vertices;a[0]=a[6]=t._width*-t.anchor.x,a[1]=a[3]=t._height*-t.anchor.y,a[2]=a[4]=t._width*(1-t.anchor.x),a[5]=a[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&((a=r.uvs)[0]=a[6]=-t.anchor.x,a[1]=a[3]=-t.anchor.y,a[2]=a[4]=1-t.anchor.x,a[5]=a[7]=1-t.anchor.y),r.upload();var s=t._texture,u=s.baseTexture,l=t.tileTransform.localTransform,c=t.uvTransform,h=u.isPowerOfTwo&&s.frame.width===u.width&&s.frame.height===u.height;h&&(u._glTextures[e.CONTEXT_UID]?h=u.wrapMode!==i.WRAP_MODES.CLAMP:u.wrapMode===i.WRAP_MODES.CLAMP&&(u.wrapMode=i.WRAP_MODES.REPEAT));var f=h?this.simpleShader:this.shader;e.bindShader(f);var d=s.width,p=s.height,_=t._width,v=t._height;o.set(l.a*d/_,l.b*d/v,l.c*p/_,l.d*p/v,l.tx/_,l.ty/v),o.invert(),h?o.prepend(c.mapCoord):(f.uniforms.uMapCoord=c.mapCoord.toArray(!0),f.uniforms.uClampFrame=c.uClampFrame,f.uniforms.uClampOffset=c.uClampOffset),f.uniforms.uTransform=o.toArray(!0),f.uniforms.uColor=n.utils.premultiplyTintToRgba(t.tint,t.worldAlpha,f.uniforms.uColor,u.premultipliedAlpha),f.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),f.uniforms.uSampler=e.bindTexture(s),e.setBlendMode(n.utils.correctBlendMode(t.blendMode,u.premultipliedAlpha)),r.vao.draw(this.renderer.gl.TRIANGLES,6,0)},e}(n.ObjectRenderer);e.default=a,n.WebGLRenderer.registerPlugin("tilingSprite",a)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=u(r(40)),a=r(4),s=u(r(5));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return i._textWidth=0,i._textHeight=0,i._glyphs=[],i._font={tint:void 0!==n.tint?n.tint:16777215,align:n.align||"left",name:null,size:0},i.font=n.font,i._text=r,i._maxWidth=0,i._maxLineHeight=0,i._letterSpacing=0,i._anchor=new o.default(function(){i.dirty=!0},i,0,0),i.dirty=!1,i.updateText(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],r=this._font.size/t.size,n=new i.Point,o=[],a=[],s=this.text.replace(/(?:\r\n|\r)/g,"\n"),u=s.length,l=this._maxWidth*t.size/this._font.size,c=null,h=0,f=0,d=0,p=-1,_=0,v=0,g=0,y=0;y<u;y++){var m=s.charCodeAt(y),E=s.charAt(y);if(/(?:\s)/.test(E)&&(p=y,_=h),"\r"!==E&&"\n"!==E){var x=t.chars[m];x&&(c&&x.kerning[c]&&(n.x+=x.kerning[c]),o.push({texture:x.texture,line:d,charCode:m,position:new i.Point(n.x+x.xOffset+this._letterSpacing/2,n.y+x.yOffset)}),n.x+=x.xAdvance+this._letterSpacing,h=n.x,g=Math.max(g,x.yOffset+x.texture.height),c=m,-1!==p&&l>0&&n.x>l&&(++v,i.utils.removeItems(o,1+p-v,1+y-p),y=p,p=-1,a.push(_),f=Math.max(f,_),d++,n.x=0,n.y+=t.lineHeight,c=null))}else a.push(h),f=Math.max(f,h),++d,++v,n.x=0,n.y+=t.lineHeight,c=null}var b=s.charAt(s.length-1);"\r"!==b&&"\n"!==b&&(/(?:\s)/.test(b)&&(h=_),a.push(h),f=Math.max(f,h));for(var T=[],R=0;R<=d;R++){var O=0;"right"===this._font.align?O=f-a[R]:"center"===this._font.align&&(O=(f-a[R])/2),T.push(O)}for(var S=o.length,w=this.tint,C=0;C<S;C++){var A=this._glyphs[C];A?A.texture=o[C].texture:(A=new i.Sprite(o[C].texture),this._glyphs.push(A)),A.position.x=(o[C].position.x+T[o[C].line])*r,A.position.y=o[C].position.y*r,A.scale.x=A.scale.y=r,A.tint=w,A.parent||this.addChild(A)}for(var I=S;I<this._glyphs.length;++I)this.removeChild(this._glyphs[I]);if(this._textWidth=f*r,this._textHeight=(n.y+t.lineHeight)*r,0!==this.anchor.x||0!==this.anchor.y)for(var P=0;P<S;P++)this._glyphs[P].x-=this._textWidth*this.anchor.x,this._glyphs[P].y-=this._textHeight*this.anchor.y;this._maxLineHeight=g*r},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},e.registerFont=function(t,r){var n={},o=t.getElementsByTagName("info")[0],u=t.getElementsByTagName("common")[0],l=t.getElementsByTagName("page"),c=(0,a.getResolutionOfUrl)(l[0].getAttribute("file"),s.default.RESOLUTION),h={};n.font=o.getAttribute("face"),n.size=parseInt(o.getAttribute("size"),10),n.lineHeight=parseInt(u.getAttribute("lineHeight"),10)/c,n.chars={},r instanceof i.Texture&&(r=[r]);for(var f=0;f<l.length;f++){var d=l[f].getAttribute("id"),p=l[f].getAttribute("file");h[d]=r instanceof Array?r[f]:r[p]}for(var _=t.getElementsByTagName("char"),v=0;v<_.length;v++){var g=_[v],y=parseInt(g.getAttribute("id"),10),m=g.getAttribute("page")||0,E=new i.Rectangle(parseInt(g.getAttribute("x"),10)/c+h[m].frame.x/c,parseInt(g.getAttribute("y"),10)/c+h[m].frame.y/c,parseInt(g.getAttribute("width"),10)/c,parseInt(g.getAttribute("height"),10)/c);n.chars[y]={xOffset:parseInt(g.getAttribute("xoffset"),10)/c,yOffset:parseInt(g.getAttribute("yoffset"),10)/c,xAdvance:parseInt(g.getAttribute("xadvance"),10)/c,kerning:{},texture:new i.Texture(h[m].baseTexture,E),page:m}}for(var x=t.getElementsByTagName("kerning"),b=0;b<x.length;b++){var T=x[b],R=parseInt(T.getAttribute("first"),10)/c,O=parseInt(T.getAttribute("second"),10)/c,S=parseInt(T.getAttribute("amount"),10)/c;n.chars[O]&&(n.chars[O].kerning[R]=S)}return e.fonts[n.font]=n,n},n(e,[{key:"tint",get:function(){return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},{key:"align",get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},{key:"anchor",get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copy(t)}},{key:"font",get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},{key:"text",get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}},{key:"maxWidth",get:function(){return this._maxWidth},set:function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)}},{key:"maxLineHeight",get:function(){return this.validate(),this._maxLineHeight}},{key:"textWidth",get:function(){return this.validate(),this._textWidth}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)}},{key:"textHeight",get:function(){return this.validate(),this._textHeight}}]),e}(i.Container);e.default=l,l.fonts={}},function(t,e,r){"use strict";var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=s(r(10)),o=s(r(12)),a=r(4);function s(t){return t&&t.__esModule?t:{default:t}}var u=n.DisplayObject,l=new n.Matrix;u.prototype._cacheAsBitmap=!1,u.prototype._cacheData=!1;var c=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.textureCacheId=null,this.originalRenderWebGL=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(u.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e=void 0;t?(this._cacheData||(this._cacheData=new c),(e=this._cacheData).originalRenderWebGL=this.renderWebGL,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this._calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.renderWebGL=e.originalRenderWebGL,this.renderCanvas=e.originalRenderCanvas,this._calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}}),u.prototype._renderCachedWebGL=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite._transformID=-1,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderWebGL(t))},u.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.currentRenderer.flush();var r=this.getLocalBounds().clone();if(this._filters){var s=this._filters[0].padding;r.pad(s)}var u=t._activeRenderTarget,c=t.filterManager.filterStack,h=n.RenderTexture.create(0|r.width,0|r.height),f="cacheAsBitmap_"+(0,a.uid)();this._cacheData.textureCacheId=f,o.default.addToCache(h.baseTexture,f),i.default.addToCache(h,f);var d=l;d.tx=-r.x,d.ty=-r.y,this.transform.worldTransform.identity(),this.renderWebGL=this._cacheData.originalRenderWebGL,t.render(this,h,!0,d,!0),t.bindRenderTarget(u),t.filterManager.filterStack=c,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this._mask=null,this.filterArea=null;var p=new n.Sprite(h);p.transform.worldTransform=this.transform.worldTransform,p.anchor.x=-r.x/r.width,p.anchor.y=-r.y/r.height,p.alpha=e,p._bounds=this._bounds,this._calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._cacheData.sprite=p,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=p.containsPoint.bind(p)}},u.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite.renderCanvas(t))},u.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),r=this.alpha;this.alpha=1;var s=t.context,u=n.RenderTexture.create(0|e.width,0|e.height),c="cacheAsBitmap_"+(0,a.uid)();this._cacheData.textureCacheId=c,o.default.addToCache(u.baseTexture,c),i.default.addToCache(u,c);var h=l;this.transform.localTransform.copy(h),h.invert(),h.tx-=e.x,h.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,u,!0,h,!1),t.context=s,this.renderCanvas=this._renderCachedCanvas,this._calculateBounds=this._calculateCachedBounds,this._mask=null,this.filterArea=null;var f=new n.Sprite(u);f.transform.worldTransform=this.transform.worldTransform,f.anchor.x=-e.x/e.width,f.anchor.y=-e.y/e.height,f._bounds=this._bounds,f.alpha=r,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.updateTransform=this.displayObjectUpdateTransform,this._cacheData.sprite=f,this.containsPoint=f.containsPoint.bind(f)}},u.prototype._calculateCachedBounds=function(){this._cacheData.sprite._calculateBounds()},u.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},u.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,o.default.removeFromCache(this._cacheData.textureCacheId),i.default.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},u.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)}},function(t,e,r){"use strict";var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));n.DisplayObject.prototype.name=null,n.Container.prototype.getChildByName=function(t){for(var e=0;e<this.children.length;e++)if(this.children[e].name===t)return this.children[e];return null}},function(t,e,r){"use strict";var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));n.DisplayObject.prototype.getGlobalPosition=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new n.Point,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(169);Object.defineProperty(e,"FXAAFilter",{enumerable:!0,get:function(){return h(n).default}});var i=r(170);Object.defineProperty(e,"NoiseFilter",{enumerable:!0,get:function(){return h(i).default}});var o=r(171);Object.defineProperty(e,"DisplacementFilter",{enumerable:!0,get:function(){return h(o).default}});var a=r(172);Object.defineProperty(e,"BlurFilter",{enumerable:!0,get:function(){return h(a).default}});var s=r(74);Object.defineProperty(e,"BlurXFilter",{enumerable:!0,get:function(){return h(s).default}});var u=r(78);Object.defineProperty(e,"BlurYFilter",{enumerable:!0,get:function(){return h(u).default}});var l=r(173);Object.defineProperty(e,"ColorMatrixFilter",{enumerable:!0,get:function(){return h(l).default}});var c=r(174);function h(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"AlphaFilter",{enumerable:!0,get:function(){return h(c).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));r(9);var i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nuniform vec4 filterArea;\n\nvarying vec2 vTextureCoord;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvoid texcoords(vec2 fragCoord, vec2 resolution,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n vec2 inverseVP = 1.0 / resolution.xy;\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n \n --\n \n From:\n https://github.com/mitsuhiko/webgl-meincraft\n \n Copyright (c) 2011 by Armin Ronacher.\n \n Some rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n \n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n \n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n \n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n \n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n \n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n \n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n vec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n'))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.Filter);e.default=i},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));r(9);var o=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.random();!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n"));return i.noise=r,i.seed=n,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"noise",get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t}},{key:"seed",get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t}}]),e}(i.Filter);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));r(9);var o=function(t){function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=new i.Matrix;r.renderable=!1;var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;\n vTextureCoord = aTextureCoord;\n}","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy *= scale / filterArea.xy;\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\n}\n"));return a.maskSprite=r,a.maskMatrix=o,a.uniforms.mapSampler=r._texture,a.uniforms.filterMatrix=o,a.uniforms.scale={x:1,y:1},null!==n&&void 0!==n||(n=20),a.scale=new i.Point(n,n),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.apply=function(t,e,r){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y,t.applyFilter(this,e,r)},n(e,[{key:"map",get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t}}]),e}(i.Filter);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=s(r(74)),a=s(r(78));function s(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(r,n,s,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var l=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return l.blurXFilter=new o.default(r,n,s,u),l.blurYFilter=new a.default(r,n,s,u),l.padding=0,l.resolution=s||i.settings.RESOLUTION,l.quality=n||4,l.blur=r||8,l}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.apply=function(t,e,r){var n=t.getRenderTarget(!0);this.blurXFilter.apply(t,e,n,!0),this.blurYFilter.apply(t,n,r,!1),t.returnRenderTarget(n)},n(e,[{key:"blur",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"quality",get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t}},{key:"blurX",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blurY",get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blendMode",get:function(){return this.blurYFilter._blendMode},set:function(t){this.blurYFilter._blendMode=t}}]),e}(i.Filter);e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));r(9);var o=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n"));return r.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],r.alpha=1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._loadMatrix=function(t){var e=t;arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this._multiply(e,this.uniforms.m,t),e=this._colorMatrix(e)),this.uniforms.m=e},e.prototype._multiply=function(t,e,r){return t[0]=e[0]*r[0]+e[1]*r[5]+e[2]*r[10]+e[3]*r[15],t[1]=e[0]*r[1]+e[1]*r[6]+e[2]*r[11]+e[3]*r[16],t[2]=e[0]*r[2]+e[1]*r[7]+e[2]*r[12]+e[3]*r[17],t[3]=e[0]*r[3]+e[1]*r[8]+e[2]*r[13]+e[3]*r[18],t[4]=e[0]*r[4]+e[1]*r[9]+e[2]*r[14]+e[3]*r[19]+e[4],t[5]=e[5]*r[0]+e[6]*r[5]+e[7]*r[10]+e[8]*r[15],t[6]=e[5]*r[1]+e[6]*r[6]+e[7]*r[11]+e[8]*r[16],t[7]=e[5]*r[2]+e[6]*r[7]+e[7]*r[12]+e[8]*r[17],t[8]=e[5]*r[3]+e[6]*r[8]+e[7]*r[13]+e[8]*r[18],t[9]=e[5]*r[4]+e[6]*r[9]+e[7]*r[14]+e[8]*r[19]+e[9],t[10]=e[10]*r[0]+e[11]*r[5]+e[12]*r[10]+e[13]*r[15],t[11]=e[10]*r[1]+e[11]*r[6]+e[12]*r[11]+e[13]*r[16],t[12]=e[10]*r[2]+e[11]*r[7]+e[12]*r[12]+e[13]*r[17],t[13]=e[10]*r[3]+e[11]*r[8]+e[12]*r[13]+e[13]*r[18],t[14]=e[10]*r[4]+e[11]*r[9]+e[12]*r[14]+e[13]*r[19]+e[14],t[15]=e[15]*r[0]+e[16]*r[5]+e[17]*r[10]+e[18]*r[15],t[16]=e[15]*r[1]+e[16]*r[6]+e[17]*r[11]+e[18]*r[16],t[17]=e[15]*r[2]+e[16]*r[7]+e[17]*r[12]+e[18]*r[17],t[18]=e[15]*r[3]+e[16]*r[8]+e[17]*r[13]+e[18]*r[18],t[19]=e[15]*r[4]+e[16]*r[9]+e[17]*r[14]+e[18]*r[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.greyscale=function(t,e){var r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var r=Math.cos(t),n=Math.sin(t),i=1/3,o=(0,Math.sqrt)(i),a=[r+(1-r)*i,i*(1-r)-o*n,i*(1-r)+o*n,0,0,i*(1-r)+o*n,r+i*(1-r),i*(1-r)-o*n,0,0,i*(1-r)-o*n,i*(1-r)+o*n,r+i*(1-r),0,0,0,0,0,1,0];this._loadMatrix(a,e)},e.prototype.contrast=function(t,e){var r=(t||0)+1,n=-.5*(r-1),i=[r,0,0,0,n,0,r,0,0,n,0,0,r,0,n,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.saturate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],r=2*t/3+1,n=-.5*(r-1),i=[r,n,n,0,0,n,r,n,0,0,n,n,r,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,e,r,n,i){t=t||.2,e=e||.15;var o=((r=r||16770432)>>16&255)/255,a=(r>>8&255)/255,s=(255&r)/255,u=((n=n||3375104)>>16&255)/255,l=(n>>8&255)/255,c=(255&n)/255,h=[.3,.59,.11,0,0,o,a,s,t,0,u,l,c,e,0,o-u,a-l,s-c,0,0];this._loadMatrix(h,i)},e.prototype.night=function(t,e){var r=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},n(e,[{key:"matrix",get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}},{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(i.Filter);e.default=o,o.prototype.grayscale=o.prototype.greyscale},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));r(9);var o=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n"));return n.alpha=r,n.glShaderKey="alpha",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(i.Filter);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=r(79);Object.defineProperty(e,"InteractionData",{enumerable:!0,get:function(){return u(n).default}});var i=r(176);Object.defineProperty(e,"InteractionManager",{enumerable:!0,get:function(){return u(i).default}});var o=r(82);Object.defineProperty(e,"interactiveTarget",{enumerable:!0,get:function(){return u(o).default}});var a=r(81);Object.defineProperty(e,"InteractionTrackingData",{enumerable:!0,get:function(){return u(a).default}});var s=r(80);function u(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"InteractionEvent",{enumerable:!0,get:function(){return u(s).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=c(r(79)),a=c(r(80)),s=c(r(81)),u=c(r(11)),l=c(r(82));function c(t){return t&&t.__esModule?t:{default:t}}i.utils.mixins.delayMixin(i.DisplayObject.prototype,l.default);var h=1,f={target:null,data:{global:null}},d=function(t){function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return n=n||{},s.renderer=r,s.autoPreventDefault=void 0===n.autoPreventDefault||n.autoPreventDefault,s.interactionFrequency=n.interactionFrequency||10,s.mouse=new o.default,s.mouse.identifier=h,s.mouse.global.set(-999999),s.activeInteractionData={},s.activeInteractionData[h]=s.mouse,s.interactionDataPool=[],s.eventData=new a.default,s.interactionDOMElement=null,s.moveWhenInside=!1,s.eventsAdded=!1,s.mouseOverRenderer=!1,s.supportsTouchEvents="ontouchstart"in window,s.supportsPointerEvents=!!window.PointerEvent,s.onPointerUp=s.onPointerUp.bind(s),s.processPointerUp=s.processPointerUp.bind(s),s.onPointerCancel=s.onPointerCancel.bind(s),s.processPointerCancel=s.processPointerCancel.bind(s),s.onPointerDown=s.onPointerDown.bind(s),s.processPointerDown=s.processPointerDown.bind(s),s.onPointerMove=s.onPointerMove.bind(s),s.processPointerMove=s.processPointerMove.bind(s),s.onPointerOut=s.onPointerOut.bind(s),s.processPointerOverOut=s.processPointerOverOut.bind(s),s.onPointerOver=s.onPointerOver.bind(s),s.cursorStyles={default:"inherit",pointer:"pointer"},s.currentCursorMode=null,s.cursor=null,s._tempPoint=new i.Point,s.resolution=1,s.setTargetElement(s.renderer.view,s.renderer.resolution),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.hitTest=function(t,e){return f.target=null,f.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(f,e,null,!0),f.target},e.prototype.setTargetElement=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&(i.ticker.shared.add(this.update,this,i.UPDATE_PRIORITY.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.interactionDOMElement&&(i.ticker.shared.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},e.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.interactionDOMElement))if(this.didMove)this.didMove=!1;else{for(var e in this.cursor=null,this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(e)){var r=this.activeInteractionData[e];if(r.originalEvent&&"touch"!==r.pointerType){var n=this.configureInteractionEventForDOMEvent(this.eventData,r.originalEvent,r);this.processInteractive(n,this.renderer._lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},e.prototype.setCursorMode=function(t){if(t=t||"default",this.currentCursorMode!==t){this.currentCursorMode=t;var e=this.cursorStyles[t];if(e)switch(void 0===e?"undefined":n(e)){case"string":this.interactionDOMElement.style.cursor=e;break;case"function":e(t);break;case"object":Object.assign(this.interactionDOMElement.style,e)}else"string"!=typeof t||Object.prototype.hasOwnProperty.call(this.cursorStyles,t)||(this.interactionDOMElement.style.cursor=t)}},e.prototype.dispatchEvent=function(t,e,r){r.stopped||(r.currentTarget=t,r.type=e,t.emit(e,r),t[e]&&t[e](r))},e.prototype.mapPositionToPoint=function(t,e,r){var n=void 0;n=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0};var i=navigator.isCocoonJS?this.resolution:1/this.resolution;t.x=(e-n.left)*(this.interactionDOMElement.width/n.width)*i,t.y=(r-n.top)*(this.interactionDOMElement.height/n.height)*i},e.prototype.processInteractive=function(t,e,r,n,i){if(!e||!e.visible)return!1;var o=t.data.global,a=!1,s=i=e.interactive||i,u=!0;if(e.hitArea?(n&&(e.worldTransform.applyInverse(o,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?a=!0:(n=!1,u=!1)),s=!1):e._mask&&n&&(e._mask.containsPoint(o)||(n=!1,u=!1)),u&&e.interactiveChildren&&e.children)for(var l=e.children,c=l.length-1;c>=0;c--){var h=l[c],f=this.processInteractive(t,h,r,n,s);if(f){if(!h.parent)continue;s=!1,f&&(t.target&&(n=!1),a=!0)}}return i&&(n&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(a=!0),e.interactive&&(a&&!t.target&&(t.target=e),r&&r(t,e,!!a))),a},e.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);this.autoPreventDefault&&e[0].isNormalized&&t.preventDefault();for(var r=e.length,n=0;n<r;n++){var i=e[n],o=this.getInteractionDataForPointerId(i),a=this.configureInteractionEventForDOMEvent(this.eventData,i,o);if(a.data.originalEvent=t,this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",a),"touch"===i.pointerType)this.emit("touchstart",a);else if("mouse"===i.pointerType||"pen"===i.pointerType){var s=2===i.button;this.emit(s?"rightdown":"mousedown",this.eventData)}}}},e.prototype.processPointerDown=function(t,e,r){var n=t.data,i=t.data.identifier;if(r)if(e.trackedPointers[i]||(e.trackedPointers[i]=new s.default(i)),this.dispatchEvent(e,"pointerdown",t),"touch"===n.pointerType)this.dispatchEvent(e,"touchstart",t);else if("mouse"===n.pointerType||"pen"===n.pointerType){var o=2===n.button;o?e.trackedPointers[i].rightDown=!0:e.trackedPointers[i].leftDown=!0,this.dispatchEvent(e,o?"rightdown":"mousedown",t)}},e.prototype.onPointerComplete=function(t,e,r){for(var n=this.normalizeToPointerData(t),i=n.length,o=t.target!==this.interactionDOMElement?"outside":"",a=0;a<i;a++){var s=n[a],u=this.getInteractionDataForPointerId(s),l=this.configureInteractionEventForDOMEvent(this.eventData,s,u);if(l.data.originalEvent=t,this.processInteractive(l,this.renderer._lastObjectRendered,r,e||!o),this.emit(e?"pointercancel":"pointerup"+o,l),"mouse"===s.pointerType||"pen"===s.pointerType){var c=2===s.button;this.emit(c?"rightup"+o:"mouseup"+o,l)}else"touch"===s.pointerType&&(this.emit(e?"touchcancel":"touchend"+o,l),this.releaseInteractionDataForPointerId(s.pointerId,u))}},e.prototype.onPointerCancel=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!0,this.processPointerCancel)},e.prototype.processPointerCancel=function(t,e){var r=t.data,n=t.data.identifier;void 0!==e.trackedPointers[n]&&(delete e.trackedPointers[n],this.dispatchEvent(e,"pointercancel",t),"touch"===r.pointerType&&this.dispatchEvent(e,"touchcancel",t))},e.prototype.onPointerUp=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!1,this.processPointerUp)},e.prototype.processPointerUp=function(t,e,r){var n=t.data,i=t.data.identifier,o=e.trackedPointers[i],a="touch"===n.pointerType,u="mouse"===n.pointerType||"pen"===n.pointerType,l=!1;if(u){var c=2===n.button,h=s.default.FLAGS,f=c?h.RIGHT_DOWN:h.LEFT_DOWN,d=void 0!==o&&o.flags&f;r?(this.dispatchEvent(e,c?"rightup":"mouseup",t),d&&(this.dispatchEvent(e,c?"rightclick":"click",t),l=!0)):d&&this.dispatchEvent(e,c?"rightupoutside":"mouseupoutside",t),o&&(c?o.rightDown=!1:o.leftDown=!1)}r?(this.dispatchEvent(e,"pointerup",t),a&&this.dispatchEvent(e,"touchend",t),o&&(u&&!l||this.dispatchEvent(e,"pointertap",t),a&&(this.dispatchEvent(e,"tap",t),o.over=!1))):o&&(this.dispatchEvent(e,"pointerupoutside",t),a&&this.dispatchEvent(e,"touchendoutside",t)),o&&o.none&&delete e.trackedPointers[i]},e.prototype.onPointerMove=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);"mouse"!==e[0].pointerType&&"pen"!==e[0].pointerType||(this.didMove=!0,this.cursor=null);for(var r=e.length,n=0;n<r;n++){var i=e[n],o=this.getInteractionDataForPointerId(i),a=this.configureInteractionEventForDOMEvent(this.eventData,i,o);a.data.originalEvent=t;var s="touch"!==i.pointerType||this.moveWhenInside;this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerMove,s),this.emit("pointermove",a),"touch"===i.pointerType&&this.emit("touchmove",a),"mouse"!==i.pointerType&&"pen"!==i.pointerType||this.emit("mousemove",a)}"mouse"===e[0].pointerType&&this.setCursorMode(this.cursor)}},e.prototype.processPointerMove=function(t,e,r){var n=t.data,i="touch"===n.pointerType,o="mouse"===n.pointerType||"pen"===n.pointerType;o&&this.processPointerOverOut(t,e,r),this.moveWhenInside&&!r||(this.dispatchEvent(e,"pointermove",t),i&&this.dispatchEvent(e,"touchmove",t),o&&this.dispatchEvent(e,"mousemove",t))},e.prototype.onPointerOut=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t)[0];"mouse"===e.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var r=this.getInteractionDataForPointerId(e),n=this.configureInteractionEventForDOMEvent(this.eventData,e,r);n.data.originalEvent=e,this.processInteractive(n,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",n),"mouse"===e.pointerType||"pen"===e.pointerType?this.emit("mouseout",n):this.releaseInteractionDataForPointerId(r.identifier)}},e.prototype.processPointerOverOut=function(t,e,r){var n=t.data,i=t.data.identifier,o="mouse"===n.pointerType||"pen"===n.pointerType,a=e.trackedPointers[i];r&&!a&&(a=e.trackedPointers[i]=new s.default(i)),void 0!==a&&(r&&this.mouseOverRenderer?(a.over||(a.over=!0,this.dispatchEvent(e,"pointerover",t),o&&this.dispatchEvent(e,"mouseover",t)),o&&null===this.cursor&&(this.cursor=e.cursor)):a.over&&(a.over=!1,this.dispatchEvent(e,"pointerout",this.eventData),o&&this.dispatchEvent(e,"mouseout",t),a.none&&delete e.trackedPointers[i]))},e.prototype.onPointerOver=function(t){var e=this.normalizeToPointerData(t)[0],r=this.getInteractionDataForPointerId(e),n=this.configureInteractionEventForDOMEvent(this.eventData,e,r);n.data.originalEvent=e,"mouse"===e.pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",n),"mouse"!==e.pointerType&&"pen"!==e.pointerType||this.emit("mouseover",n)},e.prototype.getInteractionDataForPointerId=function(t){var e=t.pointerId,r=void 0;return e===h||"mouse"===t.pointerType?r=this.mouse:this.activeInteractionData[e]?r=this.activeInteractionData[e]:((r=this.interactionDataPool.pop()||new o.default).identifier=e,this.activeInteractionData[e]=r),r.copyEvent(t),r},e.prototype.releaseInteractionDataForPointerId=function(t){var e=this.activeInteractionData[t];e&&(delete this.activeInteractionData[t],e.reset(),this.interactionDataPool.push(e))},e.prototype.configureInteractionEventForDOMEvent=function(t,e,r){return t.data=r,this.mapPositionToPoint(r.global,e.clientX,e.clientY),navigator.isCocoonJS&&"touch"===e.pointerType&&(r.global.x=r.global.x/this.resolution,r.global.y=r.global.y/this.resolution),"touch"===e.pointerType&&(e.globalX=r.global.x,e.globalY=r.global.y),r.originalEvent=e,t.reset(),t},e.prototype.normalizeToPointerData=function(t){var e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(var r=0,n=t.changedTouches.length;r<n;r++){var i=t.changedTouches[r];void 0===i.button&&(i.button=t.touches.length?1:0),void 0===i.buttons&&(i.buttons=t.touches.length?1:0),void 0===i.isPrimary&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),void 0===i.width&&(i.width=i.radiusX||1),void 0===i.height&&(i.height=i.radiusY||1),void 0===i.tiltX&&(i.tiltX=0),void 0===i.tiltY&&(i.tiltY=0),void 0===i.pointerType&&(i.pointerType="touch"),void 0===i.pointerId&&(i.pointerId=i.identifier||0),void 0===i.pressure&&(i.pressure=i.force||.5),i.twist=0,i.tangentialPressure=0,void 0===i.layerX&&(i.layerX=i.offsetX=i.clientX),void 0===i.layerY&&(i.layerY=i.offsetY=i.clientY),i.isNormalized=!0,e.push(i)}else!(t instanceof MouseEvent)||this.supportsPointerEvents&&t instanceof window.PointerEvent?e.push(t):(void 0===t.isPrimary&&(t.isPrimary=!0),void 0===t.width&&(t.width=1),void 0===t.height&&(t.height=1),void 0===t.tiltX&&(t.tiltX=0),void 0===t.tiltY&&(t.tiltY=0),void 0===t.pointerType&&(t.pointerType="mouse"),void 0===t.pointerId&&(t.pointerId=h),void 0===t.pressure&&(t.pressure=.5),t.twist=0,t.tangentialPressure=0,t.isNormalized=!0,e.push(t));return e},e.prototype.destroy=function(){this.removeEvents(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this._tempPoint=null},e}(u.default);e.default=d,i.WebGLRenderer.registerPlugin("interaction",d),i.CanvasRenderer.registerPlugin("interaction",d)},function(t,e,r){"use strict";e.__esModule=!0,e.shared=e.Resource=e.textureParser=e.getResourcePath=e.spritesheetParser=e.parseBitmapFontData=e.bitmapFontParser=e.Loader=void 0;var n=r(83);Object.defineProperty(e,"bitmapFontParser",{enumerable:!0,get:function(){return l(n).default}}),Object.defineProperty(e,"parseBitmapFontData",{enumerable:!0,get:function(){return n.parse}});var i=r(88);Object.defineProperty(e,"spritesheetParser",{enumerable:!0,get:function(){return l(i).default}}),Object.defineProperty(e,"getResourcePath",{enumerable:!0,get:function(){return i.getResourcePath}});var o=r(89);Object.defineProperty(e,"textureParser",{enumerable:!0,get:function(){return l(o).default}});var a=r(17);Object.defineProperty(e,"Resource",{enumerable:!0,get:function(){return a.Resource}});var s=l(r(70)),u=l(r(179));function l(t){return t&&t.__esModule?t:{default:t}}e.Loader=u.default;var c=new u.default;c.destroy=function(){},e.shared=c;var h=s.default.prototype;h._loader=null,Object.defineProperty(h,"loader",{get:function(){if(!this._loader){var t=this._options.sharedLoader;this._loader=t?c:new u.default}return this._loader}}),h._parentDestroy=h.destroy,h.destroy=function(t,e){this._loader&&(this._loader.destroy(),this._loader=null),this._parentDestroy(t,e)}},function(t,e,r){"use strict";e.__esModule=!0,e.Loader=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=l(r(84)),a=l(r(85)),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(86)),u=r(38);function l(t){return t&&t.__esModule?t:{default:t}}var c=/(#[\w-]+)?$/,h=e.Loader=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.baseUrl=r,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,r){return e._loadResource(t,r)},this._queue=s.queue(this._boundLoadResource,n),this._queue.pause(),this.resources={},this.onProgress=new o.default,this.onError=new o.default,this.onLoad=new o.default,this.onStart=new o.default,this.onComplete=new o.default;for(var i=0;i<t._defaultBeforeMiddleware.length;++i)this.pre(t._defaultBeforeMiddleware[i]);for(var a=0;a<t._defaultAfterMiddleware.length;++a)this.use(t._defaultAfterMiddleware[a])}return t.prototype.add=function(t,e,r,i){if(Array.isArray(t)){for(var o=0;o<t.length;++o)this.add(t[o]);return this}if("object"===(void 0===t?"undefined":n(t))&&(i=e||t.callback||t.onComplete,r=t,e=t.url,t=t.name||t.key||t.url),"string"!=typeof e&&(i=r,r=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");if("function"==typeof r&&(i=r,r=null),this.loading&&(!r||!r.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new u.Resource(t,e,r),"function"==typeof i&&this.resources[t].onAfterMiddleware.once(i),this.loading){for(var a=r.parentResource,s=[],l=0;l<a.children.length;++l)a.children[l].isComplete||s.push(a.children[l]);var c=a.progressChunk*(s.length+1)/(s.length+2);a.children.push(this.resources[t]),a.progressChunk=c;for(var h=0;h<s.length;++h)s[h].progressChunk=c;this.resources[t].progressChunk=c}return this._queue.push(this.resources[t]),this},t.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},t.prototype.use=function(t){return this._afterMiddleware.push(t),this},t.prototype.reset=function(){for(var t in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort()}return this.resources={},this},t.prototype.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var e=100/this._queue._tasks.length,r=0;r<this._queue._tasks.length;++r)this._queue._tasks[r].data.progressChunk=e;this._onStart(),this._queue.resume()}return this},t.prototype._prepareUrl=function(t){var e=(0,a.default)(t,{strictMode:!0}),r=void 0;if(r=e.protocol||!e.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var n=c.exec(r)[0];-1!==(r=r.substr(0,r.length-n.length)).indexOf("?")?r+="&"+this.defaultQueryString:r+="?"+this.defaultQueryString,r+=n}return r},t.prototype._loadResource=function(t,e){var r=this;t._dequeue=e,s.eachSeries(this._beforeMiddleware,function(e,n){e.call(r,t,function(){n(t.isComplete?{}:null)})},function(){t.isComplete?r._onLoad(t):(t._onLoadBinding=t.onComplete.once(r._onLoad,r),t.load())},!0)},t.prototype._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},t.prototype._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),s.eachSeries(this._afterMiddleware,function(r,n){r.call(e,t,n)},function(){t.onAfterMiddleware.dispatch(t),e.progress=Math.min(100,e.progress+t.progressChunk),e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&e._onComplete()},!0)},i(t,[{key:"concurrency",get:function(){return this._queue.concurrency},set:function(t){this._queue.concurrency=t}}]),t}();h._defaultBeforeMiddleware=[],h._defaultAfterMiddleware=[],h.pre=function(t){return h._defaultBeforeMiddleware.push(t),h},h.use=function(t){return h._defaultAfterMiddleware.push(t),h}},function(t,e,r){"use strict";e.__esModule=!0;var n=l(r(17)),i=r(180),o=l(r(11)),a=l(r(89)),s=l(r(88)),u=l(r(83));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,n));o.default.call(i);for(var a=0;a<e._pixiMiddleware.length;++a)i.use(e._pixiMiddleware[a]());return i.onStart.add(function(t){return i.emit("start",t)}),i.onProgress.add(function(t,e){return i.emit("progress",t,e)}),i.onError.add(function(t,e,r){return i.emit("error",t,e,r)}),i.onLoad.add(function(t,e){return i.emit("load",t,e)}),i.onComplete.add(function(t,e){return i.emit("complete",t,e)}),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.addPixiMiddleware=function(t){e._pixiMiddleware.push(t)},e.prototype.destroy=function(){this.removeAllListeners(),this.reset()},e}(n.default);for(var h in e.default=c,o.default.prototype)c.prototype[h]=o.default.prototype[h];c._pixiMiddleware=[i.blobMiddlewareFactory,a.default,s.default,u.default];var f=n.default.Resource;f.setExtensionXhrType("fnt",f.XHR_RESPONSE_TYPE.DOCUMENT)},function(t,e,r){"use strict";e.__esModule=!0,e.blobMiddlewareFactory=function(){return function(t,e){if(t.data){if(t.xhr&&t.xhrType===n.Resource.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var r=o.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=r,t.type=n.Resource.TYPE.IMAGE,void(t.data.onload=function(){o.revokeObjectURL(r),t.data.onload=null,e()})}}else{var a=t.xhr.getResponseHeader("content-type");if(a&&0===a.indexOf("image"))return t.data=new Image,t.data.src="data:"+a+";base64,"+(0,i.encodeBinary)(t.xhr.responseText),t.type=n.Resource.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}};var n=r(38),i=r(87),o=window.URL||window.webkitURL},function(t,e,r){"use strict";e.__esModule=!0;var n=r(18);Object.defineProperty(e,"Mesh",{enumerable:!0,get:function(){return l(n).default}});var i=r(182);Object.defineProperty(e,"MeshRenderer",{enumerable:!0,get:function(){return l(i).default}});var o=r(183);Object.defineProperty(e,"CanvasMeshRenderer",{enumerable:!0,get:function(){return l(o).default}});var a=r(90);Object.defineProperty(e,"Plane",{enumerable:!0,get:function(){return l(a).default}});var s=r(184);Object.defineProperty(e,"NineSlicePlane",{enumerable:!0,get:function(){return l(s).default}});var u=r(185);function l(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"Rope",{enumerable:!0,get:function(){return l(u).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=a(r(7)),o=a(r(18));r(9);function a(t){return t&&t.__esModule?t:{default:t}}var s=n.Matrix.IDENTITY,u=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.shader=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new n.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n")},e.prototype.render=function(t){var e=this.renderer,r=e.gl,a=t._texture;if(a.valid){var u=t._glDatas[e.CONTEXT_UID];u||(e.bindVao(null),(u={shader:this.shader,vertexBuffer:i.default.GLBuffer.createVertexBuffer(r,t.vertices,r.STREAM_DRAW),uvBuffer:i.default.GLBuffer.createVertexBuffer(r,t.uvs,r.STREAM_DRAW),indexBuffer:i.default.GLBuffer.createIndexBuffer(r,t.indices,r.STATIC_DRAW),vao:null,dirty:t.dirty,indexDirty:t.indexDirty,vertexDirty:t.vertexDirty}).vao=new i.default.VertexArrayObject(r).addIndex(u.indexBuffer).addAttribute(u.vertexBuffer,u.shader.attributes.aVertexPosition,r.FLOAT,!1,8,0).addAttribute(u.uvBuffer,u.shader.attributes.aTextureCoord,r.FLOAT,!1,8,0),t._glDatas[e.CONTEXT_UID]=u),e.bindVao(u.vao),t.dirty!==u.dirty&&(u.dirty=t.dirty,u.uvBuffer.upload(t.uvs)),t.indexDirty!==u.indexDirty&&(u.indexDirty=t.indexDirty,u.indexBuffer.upload(t.indices)),t.vertexDirty!==u.vertexDirty&&(u.vertexDirty=t.vertexDirty,u.vertexBuffer.upload(t.vertices)),e.bindShader(u.shader),u.shader.uniforms.uSampler=e.bindTexture(a),e.state.setBlendMode(n.utils.correctBlendMode(t.blendMode,a.baseTexture.premultipliedAlpha)),u.shader.uniforms.uTransform&&(t.uploadUvTransform?u.shader.uniforms.uTransform=t._uvTransform.mapCoord.toArray(!0):u.shader.uniforms.uTransform=s.toArray(!0)),u.shader.uniforms.translationMatrix=t.worldTransform.toArray(!0),u.shader.uniforms.uColor=n.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,u.shader.uniforms.uColor,a.baseTexture.premultipliedAlpha);var l=t.drawMode===o.default.DRAW_MODES.TRIANGLE_MESH?r.TRIANGLE_STRIP:r.TRIANGLES;u.vao.draw(l,t.indices.length,0)}},e}(n.ObjectRenderer);e.default=u,n.WebGLRenderer.registerPlugin("mesh",u)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=function(t){return t&&t.__esModule?t:{default:t}}(r(18));var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,r=e.context,n=t.worldTransform,o=e.resolution;e.roundPixels?r.setTransform(n.a*o,n.b*o,n.c*o,n.d*o,n.tx*o|0,n.ty*o|0):r.setTransform(n.a*o,n.b*o,n.c*o,n.d*o,n.tx*o,n.ty*o),e.context.globalAlpha=t.worldAlpha,e.setBlendMode(t.blendMode),t.drawMode===i.default.DRAW_MODES.TRIANGLE_MESH?this._renderTriangleMesh(t):this._renderTriangles(t)},t.prototype._renderTriangleMesh=function(t){for(var e=t.vertices.length/2,r=0;r<e-2;r++){var n=2*r;this._renderDrawTriangle(t,n,n+2,n+4)}},t.prototype._renderTriangles=function(t){for(var e=t.indices,r=e.length,n=0;n<r;n+=3){var i=2*e[n],o=2*e[n+1],a=2*e[n+2];this._renderDrawTriangle(t,i,o,a)}},t.prototype._renderDrawTriangle=function(t,e,r,n){var i=this.renderer.context,o=t.uvs,a=t.vertices,s=t._texture;if(s.valid){var u=s.baseTexture,l=u.source,c=u.width,h=u.height,f=void 0,d=void 0,p=void 0,_=void 0,v=void 0,g=void 0;if(t.uploadUvTransform){var y=t._uvTransform.mapCoord;f=(o[e]*y.a+o[e+1]*y.c+y.tx)*u.width,d=(o[r]*y.a+o[r+1]*y.c+y.tx)*u.width,p=(o[n]*y.a+o[n+1]*y.c+y.tx)*u.width,_=(o[e]*y.b+o[e+1]*y.d+y.ty)*u.height,v=(o[r]*y.b+o[r+1]*y.d+y.ty)*u.height,g=(o[n]*y.b+o[n+1]*y.d+y.ty)*u.height}else f=o[e]*u.width,d=o[r]*u.width,p=o[n]*u.width,_=o[e+1]*u.height,v=o[r+1]*u.height,g=o[n+1]*u.height;var m=a[e],E=a[r],x=a[n],b=a[e+1],T=a[r+1],R=a[n+1],O=t.canvasPadding/this.renderer.resolution;if(O>0){var S=O/Math.abs(t.worldTransform.a),w=O/Math.abs(t.worldTransform.d),C=(m+E+x)/3,A=(b+T+R)/3,I=m-C,P=b-A,M=Math.sqrt(I*I+P*P);m=C+I/M*(M+S),b=A+P/M*(M+w),P=T-A,E=C+(I=E-C)/(M=Math.sqrt(I*I+P*P))*(M+S),T=A+P/M*(M+w),P=R-A,x=C+(I=x-C)/(M=Math.sqrt(I*I+P*P))*(M+S),R=A+P/M*(M+w)}i.save(),i.beginPath(),i.moveTo(m,b),i.lineTo(E,T),i.lineTo(x,R),i.closePath(),i.clip();var D=f*v+_*p+d*g-v*p-_*d-f*g,L=m*v+_*x+E*g-v*x-_*E-m*g,U=f*E+m*p+d*x-E*p-m*d-f*x,N=f*v*x+_*E*p+m*d*g-m*v*p-_*d*x-f*E*g,F=b*v+_*R+T*g-v*R-_*T-b*g,j=f*T+b*p+d*R-T*p-b*d-f*R,k=f*v*R+_*T*p+b*d*g-b*v*p-_*d*R-f*T*g;i.transform(L/D,F/D,U/D,j/D,N/D,k/D),i.drawImage(l,0,0,c*u.resolution,h*u.resolution,0,0,c,h),i.restore(),this.renderer.invalidateBlendMode()}},t.prototype.renderMeshFlat=function(t){var e=this.renderer.context,r=t.vertices,n=r.length/2;e.beginPath();for(var i=1;i<n-2;++i){var o=2*i,a=r[o],s=r[o+1],u=r[o+2],l=r[o+3],c=r[o+4],h=r[o+5];e.moveTo(a,s),e.lineTo(u,l),e.lineTo(c,h)}e.fillStyle="#FF0000",e.fill(),e.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();e.default=o,n.CanvasRenderer.registerPlugin("mesh",o)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=10,o=function(t){function e(r,n,o,a,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var u=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,4,4));return u._origWidth=r.orig.width,u._origHeight=r.orig.height,u._width=u._origWidth,u._height=u._origHeight,u._leftWidth=void 0!==n?n:i,u._rightWidth=void 0!==a?a:i,u._topHeight=void 0!==o?o:i,u._bottomHeight=void 0!==s?s:i,u.refresh(!0),u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._topHeight+this._bottomHeight,r=this._height>e?1:this._height/e;t[9]=t[11]=t[13]=t[15]=this._topHeight*r,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*r,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._leftWidth+this._rightWidth,r=this._width>e?1:this._width/e;t[2]=t[10]=t[18]=t[26]=this._leftWidth*r,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*r,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._renderCanvas=function(t){var e=t.context;e.globalAlpha=this.worldAlpha,t.setBlendMode(this.blendMode);var r=this.worldTransform,n=t.resolution;t.roundPixels?e.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n|0,r.ty*n|0):e.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n,r.ty*n);var i=this._texture.baseTexture,o=i.source,a=i.width*i.resolution,s=i.height*i.resolution;this.drawSegment(e,o,a,s,0,1,10,11),this.drawSegment(e,o,a,s,2,3,12,13),this.drawSegment(e,o,a,s,4,5,14,15),this.drawSegment(e,o,a,s,8,9,18,19),this.drawSegment(e,o,a,s,10,11,20,21),this.drawSegment(e,o,a,s,12,13,22,23),this.drawSegment(e,o,a,s,16,17,26,27),this.drawSegment(e,o,a,s,18,19,28,29),this.drawSegment(e,o,a,s,20,21,30,31)},e.prototype.drawSegment=function(t,e,r,n,i,o,a,s){var u=this.uvs,l=this.vertices,c=(u[a]-u[i])*r,h=(u[s]-u[o])*n,f=l[a]-l[i],d=l[s]-l[o];c<1&&(c=1),h<1&&(h=1),f<1&&(f=1),d<1&&(d=1),t.drawImage(e,u[i]*r,u[o]*n,c,h,l[i],l[o],f,d)},e.prototype._refresh=function(){t.prototype._refresh.call(this);var e=this.uvs,r=this._texture;this._origWidth=r.orig.width,this._origHeight=r.orig.height;var n=1/this._origWidth,i=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=n*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-n*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.dirty++,this.multiplyUvs()},n(e,[{key:"width",get:function(){return this._width},set:function(t){this._width=t,this._refresh()}},{key:"height",get:function(){return this._height},set:function(t){this._height=t,this._refresh()}},{key:"leftWidth",get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()}},{key:"rightWidth",get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()}},{key:"topHeight",get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()}},{key:"bottomHeight",get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(r(90)).default);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.points=n,i.vertices=new Float32Array(4*n.length),i.uvs=new Float32Array(4*n.length),i.colors=new Float32Array(2*n.length),i.indices=new Uint16Array(2*n.length),i.autoUpdate=!0,i.refresh(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){this.vertices.length/4!==t.length&&(this.vertices=new Float32Array(4*t.length),this.uvs=new Float32Array(4*t.length),this.colors=new Float32Array(2*t.length),this.indices=new Uint16Array(2*t.length));var e=this.uvs,r=this.indices,n=this.colors;e[0]=0,e[1]=0,e[2]=0,e[3]=1,n[0]=1,n[1]=1,r[0]=0,r[1]=1;for(var i=t.length,o=1;o<i;o++){var a=4*o,s=o/(i-1);e[a]=s,e[a+1]=0,e[a+2]=s,e[a+3]=1,n[a=2*o]=1,n[a+1]=1,r[a=2*o]=a,r[a+1]=a+1}this.dirty++,this.indexDirty++,this.multiplyUvs(),this.refreshVertices()}},e.prototype.refreshVertices=function(){var t=this.points;if(!(t.length<1))for(var e=t[0],r=void 0,n=0,i=0,o=this.vertices,a=t.length,s=0;s<a;s++){var u=t[s],l=4*s;i=-((r=s<t.length-1?t[s+1]:u).x-e.x),n=r.y-e.y;var c=10*(1-s/(a-1));c>1&&(c=1);var h=Math.sqrt(n*n+i*i),f=this._texture.height/2;n/=h,i/=h,n*=f,i*=f,o[l]=u.x+n,o[l+1]=u.y+i,o[l+2]=u.x-n,o[l+3]=u.y-i,e=u}},e.prototype.updateTransform=function(){this.autoUpdate&&this.refreshVertices(),this.containerUpdateTransform()},e}(function(t){return t&&t.__esModule?t:{default:t}}(r(18)).default);e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=r(187);Object.defineProperty(e,"ParticleContainer",{enumerable:!0,get:function(){return o(n).default}});var i=r(188);function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"ParticleRenderer",{enumerable:!0,get:function(){return o(i).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=r(4);var a=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500,n=arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16384,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return o>16384&&(o=16384),o>r&&(o=r),s._properties=[!1,!0,!1,!1,!1],s._maxSize=r,s._batchSize=o,s._glBuffers={},s._bufferUpdateIDs=[],s._updateID=0,s.interactiveChildren=!1,s.blendMode=i.BLEND_MODES.NORMAL,s.autoResize=a,s.roundPixels=!0,s.baseTexture=null,s.setProperties(n),s._tint=0,s.tintRgb=new Float32Array(4),s.tint=16777215,s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},e.prototype.renderWebGL=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.length<e;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[e]=++this._updateID},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var e=t.context,r=this.worldTransform,n=!0,i=0,o=0,a=0,s=0;t.setBlendMode(this.blendMode),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var u=0;u<this.children.length;++u){var l=this.children[u];if(l.visible){var c=l._texture.frame;if(e.globalAlpha=this.worldAlpha*l.alpha,l.rotation%(2*Math.PI)==0)n&&(e.setTransform(r.a,r.b,r.c,r.d,r.tx*t.resolution,r.ty*t.resolution),n=!1),i=l.anchor.x*(-c.width*l.scale.x)+l.position.x+.5,o=l.anchor.y*(-c.height*l.scale.y)+l.position.y+.5,a=c.width*l.scale.x,s=c.height*l.scale.y;else{n||(n=!0),l.displayObjectUpdateTransform();var h=l.worldTransform;t.roundPixels?e.setTransform(h.a,h.b,h.c,h.d,h.tx*t.resolution|0,h.ty*t.resolution|0):e.setTransform(h.a,h.b,h.c,h.d,h.tx*t.resolution,h.ty*t.resolution),i=l.anchor.x*-c.width+.5,o=l.anchor.y*-c.height+.5,a=c.width,s=c.height}var f=l._texture.baseTexture.resolution;e.drawImage(l._texture.baseTexture.source,c.x*f,c.y*f,c.width*f,c.height*f,i*t.resolution,o*t.resolution,a*t.resolution,s*t.resolution)}}}},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._buffers)for(var r=0;r<this._buffers.length;++r)this._buffers[r].destroy();this._properties=null,this._buffers=null,this._bufferUpdateIDs=null},n(e,[{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,(0,o.hex2rgb)(t,this.tintRgb)}}]),e}(i.Container);e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=s(r(189)),o=s(r(190)),a=r(4);function s(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.shader=null,i.indexBuffer=null,i.properties=null,i.tempMatrix=new n.Matrix,i.CONTEXT_UID=0,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.shader=new i.default(t),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,unsignedByte:!0,uploadFunction:this.uploadTint,offset:0}]},e.prototype.start=function(){this.renderer.bindShader(this.shader)},e.prototype.render=function(t){var e=t.children,r=t._maxSize,i=t._batchSize,o=this.renderer,a=e.length;if(0!==a){a>r&&(a=r);var s=t._glBuffers[o.CONTEXT_UID];s||(s=t._glBuffers[o.CONTEXT_UID]=this.generateBuffers(t));var u=e[0]._texture.baseTexture;this.renderer.setBlendMode(n.utils.correctBlendMode(t.blendMode,u.premultipliedAlpha));var l=o.gl,c=t.worldTransform.copy(this.tempMatrix);c.prepend(o._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=c.toArray(!0),this.shader.uniforms.uColor=n.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,u.premultipliedAlpha),this.shader.uniforms.uSampler=o.bindTexture(u);for(var h=!1,f=0,d=0;f<a;f+=i,d+=1){var p=a-f;if(p>i&&(p=i),d>=s.length){if(!t.autoResize)break;s.push(this._generateOneMoreBuffer(t))}var _=s[d];_.uploadDynamic(e,f,p);var v=t._bufferUpdateIDs[d]||0;(h=h||_._updateID<v)&&(_._updateID=t._updateID,_.uploadStatic(e,f,p)),o.bindVao(_.vao),_.vao.draw(l.TRIANGLES,6*p)}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,r=[],n=t._maxSize,i=t._batchSize,a=t._properties,s=0;s<n;s+=i)r.push(new o.default(e,this.properties,a,i));return r},e.prototype._generateOneMoreBuffer=function(t){var e=this.renderer.gl,r=t._batchSize,n=t._properties;return new o.default(e,this.properties,n,r)},e.prototype.uploadVertices=function(t,e,r,n,i,o){for(var a=0,s=0,u=0,l=0,c=0;c<r;++c){var h=t[e+c],f=h._texture,d=h.scale.x,p=h.scale.y,_=f.trim,v=f.orig;_?(a=(s=_.x-h.anchor.x*v.width)+_.width,u=(l=_.y-h.anchor.y*v.height)+_.height):(a=v.width*(1-h.anchor.x),s=v.width*-h.anchor.x,u=v.height*(1-h.anchor.y),l=v.height*-h.anchor.y),n[o]=s*d,n[o+1]=l*p,n[o+i]=a*d,n[o+i+1]=l*p,n[o+2*i]=a*d,n[o+2*i+1]=u*p,n[o+3*i]=s*d,n[o+3*i+1]=u*p,o+=4*i}},e.prototype.uploadPosition=function(t,e,r,n,i,o){for(var a=0;a<r;a++){var s=t[e+a].position;n[o]=s.x,n[o+1]=s.y,n[o+i]=s.x,n[o+i+1]=s.y,n[o+2*i]=s.x,n[o+2*i+1]=s.y,n[o+3*i]=s.x,n[o+3*i+1]=s.y,o+=4*i}},e.prototype.uploadRotation=function(t,e,r,n,i,o){for(var a=0;a<r;a++){var s=t[e+a].rotation;n[o]=s,n[o+i]=s,n[o+2*i]=s,n[o+3*i]=s,o+=4*i}},e.prototype.uploadUvs=function(t,e,r,n,i,o){for(var a=0;a<r;++a){var s=t[e+a]._texture._uvs;s?(n[o]=s.x0,n[o+1]=s.y0,n[o+i]=s.x1,n[o+i+1]=s.y1,n[o+2*i]=s.x2,n[o+2*i+1]=s.y2,n[o+3*i]=s.x3,n[o+3*i+1]=s.y3,o+=4*i):(n[o]=0,n[o+1]=0,n[o+i]=0,n[o+i+1]=0,n[o+2*i]=0,n[o+2*i+1]=0,n[o+3*i]=0,n[o+3*i+1]=0,o+=4*i)}},e.prototype.uploadTint=function(t,e,r,n,i,o){for(var s=0;s<r;++s){var u=t[e+s],l=u._texture.baseTexture.premultipliedAlpha,c=u.alpha,h=c<1&&l?(0,a.premultiplyTint)(u._tintRGB,c):u._tintRGB+(255*c<<24);n[o]=h,n[o+i]=h,n[o+2*i]=h,n[o+3*i]=h,o+=4*i}},e.prototype.destroy=function(){this.renderer.gl&&this.renderer.gl.deleteBuffer(this.indexBuffer),t.prototype.destroy.call(this),this.shader.destroy(),this.indices=null,this.tempMatrix=null},e}(n.ObjectRenderer);e.default=u,n.WebGLRenderer.registerPlugin("particle",u)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","attribute vec2 aPositionCoord;","attribute float aRotation;","uniform mat3 projectionMatrix;","uniform vec4 uColor;","varying vec2 vTextureCoord;","varying vec4 vColor;","void main(void){"," float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);"," float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);"," vec2 v = vec2(x, y);"," v = v + aPositionCoord;"," gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;"," vColor = aColor * uColor;","}"].join("\n"),["varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","void main(void){"," vec4 color = texture2D(uSampler, vTextureCoord) * vColor;"," gl_FragColor = color;","}"].join("\n")))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(r(16)).default);e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(7)),i=o(r(37));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(e,r,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(var o=0;o<r.length;++o){var a=r[o];a={attribute:a.attribute,size:a.size,uploadFunction:a.uploadFunction,unsignedByte:a.unsignedByte,offset:a.offset},n[o]?this.dynamicProperties.push(a):this.staticProperties.push(a)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}return t.prototype.initBuffers=function(){var t=this.gl,e=0;this.indices=(0,i.default)(this.size),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.dynamicStride=0;for(var r=0;r<this.dynamicProperties.length;++r){var o=this.dynamicProperties[r];o.offset=e,e+=o.size,this.dynamicStride+=o.size}var a=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(a),this.dynamicDataUint32=new Uint32Array(a),this.dynamicBuffer=n.default.GLBuffer.createVertexBuffer(t,a,t.STREAM_DRAW);var s=0;this.staticStride=0;for(var u=0;u<this.staticProperties.length;++u){var l=this.staticProperties[u];l.offset=s,s+=l.size,this.staticStride+=l.size}var c=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(c),this.staticDataUint32=new Uint32Array(c),this.staticBuffer=n.default.GLBuffer.createVertexBuffer(t,c,t.STATIC_DRAW),this.vao=new n.default.VertexArrayObject(t).addIndex(this.indexBuffer);for(var h=0;h<this.dynamicProperties.length;++h){var f=this.dynamicProperties[h];f.unsignedByte?this.vao.addAttribute(this.dynamicBuffer,f.attribute,t.UNSIGNED_BYTE,!0,4*this.dynamicStride,4*f.offset):this.vao.addAttribute(this.dynamicBuffer,f.attribute,t.FLOAT,!1,4*this.dynamicStride,4*f.offset)}for(var d=0;d<this.staticProperties.length;++d){var p=this.staticProperties[d];p.unsignedByte?this.vao.addAttribute(this.staticBuffer,p.attribute,t.UNSIGNED_BYTE,!0,4*this.staticStride,4*p.offset):this.vao.addAttribute(this.staticBuffer,p.attribute,t.FLOAT,!1,4*this.staticStride,4*p.offset)}},t.prototype.uploadDynamic=function(t,e,r){for(var n=0;n<this.dynamicProperties.length;n++){var i=this.dynamicProperties[n];i.uploadFunction(t,e,r,i.unsignedByte?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,i.offset)}this.dynamicBuffer.upload()},t.prototype.uploadStatic=function(t,e,r){for(var n=0;n<this.staticProperties.length;n++){var i=this.staticProperties[n];i.uploadFunction(t,e,r,i.unsignedByte?this.staticDataUint32:this.staticData,this.staticStride,i.offset)}this.staticBuffer.upload()},t.prototype.destroy=function(){this.dynamicProperties=null,this.dynamicBuffer.destroy(),this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer.destroy(),this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null},t}();e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=r(192);Object.defineProperty(e,"webgl",{enumerable:!0,get:function(){return u(n).default}});var i=r(193);Object.defineProperty(e,"canvas",{enumerable:!0,get:function(){return u(i).default}});var o=r(39);Object.defineProperty(e,"BasePrepare",{enumerable:!0,get:function(){return u(o).default}});var a=r(91);Object.defineProperty(e,"CountLimiter",{enumerable:!0,get:function(){return u(a).default}});var s=r(194);function u(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"TimeLimiter",{enumerable:!0,get:function(){return u(s).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));var i=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.uploadHookHelper=n.renderer,n.registerFindHook(s),n.registerUploadHook(o),n.registerUploadHook(a),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(r(39)).default);function o(t,e){return e instanceof n.BaseTexture&&(e._glTextures[t.CONTEXT_UID]||t.textureManager.updateTexture(e),!0)}function a(t,e){return e instanceof n.Graphics&&((e.dirty||e.clearDirty||!e._webGL[t.plugins.graphics.CONTEXT_UID])&&t.plugins.graphics.updateGraphics(e),!0)}function s(t,e){return t instanceof n.Graphics&&(e.push(t),!0)}e.default=i,n.WebGLRenderer.registerPlugin("prepare",i)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));var i=16,o=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.uploadHookHelper=n,n.canvas=document.createElement("canvas"),n.canvas.width=i,n.canvas.height=i,n.ctx=n.canvas.getContext("2d"),n.registerUploadHook(a),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}(function(t){return t&&t.__esModule?t:{default:t}}(r(39)).default);function a(t,e){if(e instanceof n.BaseTexture){var r=e.source,i=0===r.width?t.canvas.width:Math.min(t.canvas.width,r.width),o=0===r.height?t.canvas.height:Math.min(t.canvas.height,r.height);return t.ctx.drawImage(r,0,0,i,o,0,0,t.canvas.width,t.canvas.height),!0}return!1}e.default=o,n.CanvasRenderer.registerPlugin("prepare",o)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.maxMilliseconds=e,this.frameStart=0}return t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds},t}();e.default=n},function(t,e){r||(r={}),Object.assign(PIXI.Container.prototype,{renderWebGL:function(t){this._activeParentLayer&&this._activeParentLayer!=t._activeLayer||(this.visible?(this.displayOrder=t.incDisplayOrder(),this.worldAlpha<=0||!this.renderable||this.containerRenderWebGL(t)):this.displayOrder=0)},renderCanvas:function(t){this._activeParentLayer&&this._activeParentLayer!=t._activeLayer||(this.visible?(this.displayOrder=t.incDisplayOrder(),this.worldAlpha<=0||!this.renderable||this.containerRenderCanvas(t)):this.displayOrder=0)},containerRenderWebGL:PIXI.Container.prototype.renderWebGL,containerRenderCanvas:PIXI.Container.prototype.renderCanvas}),Object.assign(PIXI.DisplayObject.prototype,{parentLayer:null,_activeParentLayer:null,parentGroup:null,zOrder:0,zIndex:0,updateOrder:0,displayOrder:0,layerableChildren:!0}),PIXI.particles&&PIXI.particles.ParticleContainer?PIXI.particles.ParticleContainer.prototype.layerableChildren=!1:PIXI.ParticleContainer&&(PIXI.ParticleContainer.prototype.layerableChildren=!1);var r,n=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(t){var e=function(t){function e(e,r){var n=t.call(this)||this;return n._activeLayer=null,n._activeStage=null,n._activeChildren=[],n._lastUpdateId=-1,n.useRenderTexture=!1,n.useDoubleBuffer=!1,n.sortPriority=0,n.clearColor=new Float32Array([0,0,0,0]),n.canDrawWithoutLayer=!1,n.canDrawInParentStage=!0,n.zIndex=0,n.enableSort=!1,n._tempResult=[],n._tempZero=[],n.useZeroOptimization=!1,n.zIndex=e,n.enableSort=!!r,"function"==typeof r&&n.on("sort",r),n}return n(e,t),e.prototype.doSort=function(t,r){if(this.listeners("sort",!0))for(var n=0;n<r.length;n++)this.emit("sort",r[n]);this.useZeroOptimization?this.doSortWithZeroOptimization(t,r):r.sort(e.compareZIndex)},e.compareZIndex=function(t,e){return t.zIndex!==e.zIndex?t.zIndex-e.zIndex:t.zOrder>e.zOrder?-1:t.zOrder<e.zOrder?1:t.updateOrder-e.updateOrder},e.prototype.doSortWithZeroOptimization=function(t,e){throw new Error("not implemented yet")},e.prototype.clear=function(){this._activeLayer=null,this._activeStage=null,this._activeChildren.length=0},e.prototype.addDisplayObject=function(t,e){this.check(t),e._activeParentLayer=this._activeLayer,this._activeLayer?this._activeLayer._activeChildren.push(e):this._activeChildren.push(e)},e.prototype.foundLayer=function(t,r){this.check(t),null!=this._activeLayer&&e.conflict(),this._activeLayer=r,this._activeStage=t},e.prototype.foundStage=function(t){this._activeLayer||this.canDrawInParentStage||this.clear()},e.prototype.check=function(t){if(this._lastUpdateId<e._layerUpdateId)this._lastUpdateId=e._layerUpdateId,this.clear(),this._activeStage=t;else if(this.canDrawInParentStage){for(var r=this._activeStage;r&&r!=t;)r=r._activeParentStage;if(this._activeStage=r,null==r)return void this.clear()}},e.conflict=function(){e._lastLayerConflict+5e3<Date.now()&&(e._lastLayerConflict=Date.now(),console.log("PIXI-display plugin found two layers with the same group in one stage - that's not healthy. Please place a breakpoint here and debug it"))},e._layerUpdateId=0,e._lastLayerConflict=0,e}(PIXI.utils.EventEmitter);t.Group=e}(r||(r={})),function(t){var e=PIXI.interaction.InteractionManager;Object.assign(e.prototype,{_queue:[[],[]],_displayProcessInteractive:function(t,e,r,n,i){if(!e||!e.visible)return 0;var o=0,a=n=e.interactive||n;e.hitArea&&(a=!1),e._activeParentLayer&&(i=!1);var s=e._mask;r<1/0&&s&&(s.containsPoint(t)||(i=!0)),r<1/0&&e.filterArea&&(e.filterArea.contains(t.x,t.y)||(i=!0));var u=e.children;if(e.interactiveChildren&&u)for(var l=u.length-1;l>=0;l--){var c=u[l],h=this._displayProcessInteractive(t,c,r,a,i);if(h){if(!c.parent)continue;o=h,r=h}}return n&&(i?e.interactive&&this._queueAdd(e,0):(r<e.displayOrder&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)&&(o=e.displayOrder)):e.containsPoint&&e.containsPoint(t)&&(o=e.displayOrder)),e.interactive&&this._queueAdd(e,o===1/0?0:o))),o},processInteractive:function(t,e,r,n,i){var o=null,a=null;a=t.data&&t.data.global?(o=t).data.global:t,this._startInteractionProcess(),this._displayProcessInteractive(a,e,n?0:1/0,!1),this._finishInteractionProcess(o,r)},_startInteractionProcess:function(){this._eventDisplayOrder=1,this._queue||(this._queue=[[],[]]),this._queue[0].length=0,this._queue[1].length=0},_queueAdd:function(t,e){var r=this._queue;if(e<this._eventDisplayOrder)r[0].push(t);else{if(e>this._eventDisplayOrder){this._eventDisplayOrder=e;for(var n=r[1],i=0;i<n.length;i++)r[0].push(n[i]);r[1].length=0}r[1].push(t)}},_finishInteractionProcess:function(t,e){for(var r=this._queue,n=r[0],i=0;i<n.length;i++)t?e&&e(t,n[i],!1):e(n[i],!1);for(n=r[1],i=0;i<n.length;i++)t?(t.target||(t.target=n[i]),e&&e(t,n[i],!0)):e(n[i],!0)}})}(r||(r={})),function(t){var e=function(){function t(t){this.layer=t,this.renderTexture=null,this.doubleBuffer=null,this.currentBufferIndex=0,this._tempRenderTarget=null}return t.prototype.initRenderTexture=function(t){var e=t?t.screen.width:100,r=t?t.screen.height:100,n=t?t.resolution:PIXI.settings.RESOLUTION;this.renderTexture=PIXI.RenderTexture.create(e,r,n),this.layer.group.useDoubleBuffer&&(this.doubleBuffer=[PIXI.RenderTexture.create(e,r,n),PIXI.RenderTexture.create(e,r,n)])},t.prototype.getRenderTexture=function(){return this.renderTexture||this.initRenderTexture(),this.renderTexture},t.prototype.pushTexture=function(t){var e=t.screen;this.renderTexture||this.initRenderTexture(t);var r=this.renderTexture,n=this.layer.group,i=this.doubleBuffer;if(r.width===e.width&&r.height===e.height&&r.baseTexture.resolution===t.resolution||(r.baseTexture.resolution=t.resolution,r.resize(e.width,e.height),i&&(i[0].baseTexture.resolution=t.resolution,i[0].resize(e.width,e.height),i[1].baseTexture.resolution=t.resolution,i[1].resize(e.width,e.height))),this._tempRenderTarget=t._activeRenderTarget,t.currentRenderer.flush(),n.useDoubleBuffer){var o=i[this.currentBufferIndex];o.baseTexture._glTextures[t.CONTEXT_UID]||(t.bindRenderTexture(o,null),n.clearColor&&t.clear(n.clearColor)),t.unbindTexture(r),r.baseTexture._glTextures=o.baseTexture._glTextures,r.baseTexture._glRenderTargets=o.baseTexture._glRenderTargets,this.currentBufferIndex=1-this.currentBufferIndex,o=i[this.currentBufferIndex],t.bindRenderTexture(o,null)}else t.bindRenderTexture(r,void 0);n.clearColor&&t.clear(n.clearColor)},t.prototype.popTexture=function(t){t.currentRenderer.flush(),t.bindRenderTarget(this._tempRenderTarget),this._tempRenderTarget=null},t.prototype.destroy=function(){this.renderTexture&&(this.renderTexture.destroy(),this.doubleBuffer&&(this.doubleBuffer[0].destroy(!0),this.doubleBuffer[1].destroy(!0)))},t}();t.LayerTextureCache=e;var r=function(r){function i(e){void 0===e&&(e=null);var n=r.call(this)||this;return n.isLayer=!0,n.group=null,n._activeChildren=[],n._tempChildren=null,n._activeStageParent=null,n._sortedChildren=[],n._tempLayerParent=null,n.insertChildrenBeforeActive=!0,n.insertChildrenAfterActive=!0,null!=e?(n.group=e,n.zIndex=e.zIndex):n.group=new t.Group(0,!1),n._tempChildren=n.children,n}return n(i,r),i.prototype.beginWork=function(t){var e=this._activeChildren;this._activeStageParent=t,this.group.foundLayer(t,this);var r=this.group._activeChildren;e.length=0;for(var n=0;n<r.length;n++)r[n]._activeParentLayer=this,e.push(r[n]);r.length=0},i.prototype.endWork=function(){for(var t=this.children,e=this._activeChildren,r=this._sortedChildren,n=0;n<e.length;n++)this.emit("display",e[n]);if(r.length=0,this.insertChildrenBeforeActive)for(n=0;n<t.length;n++)r.push(t[n]);for(n=0;n<e.length;n++)r.push(e[n]);if(!this.insertChildrenBeforeActive&&this.insertChildrenAfterActive)for(n=0;n<t.length;n++)r.push(t[n]);this.group.enableSort&&this.doSort()},Object.defineProperty(i.prototype,"useRenderTexture",{get:function(){return this.group.useRenderTexture},set:function(t){this.group.useRenderTexture=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"useDoubleBuffer",{get:function(){return this.group.useDoubleBuffer},set:function(t){this.group.useDoubleBuffer=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"clearColor",{get:function(){return this.group.clearColor},set:function(t){this.group.clearColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortPriority",{get:function(){return this.group.sortPriority},set:function(t){this.group.sortPriority=t},enumerable:!0,configurable:!0}),i.prototype.getRenderTexture=function(){return this.textureCache||(this.textureCache=new e(this)),this.textureCache.getRenderTexture()},i.prototype.updateDisplayLayers=function(){},i.prototype.doSort=function(){this.group.doSort(this,this._sortedChildren)},i.prototype._preRender=function(t){return(!this._activeParentLayer||this._activeParentLayer==t._activeLayer)&&(this.visible?(this.displayOrder=t.incDisplayOrder(),!(this.worldAlpha<=0||!this.renderable)&&(this.children!==this._sortedChildren&&this._tempChildren!=this.children&&(this._tempChildren=this.children),this._boundsID++,this.children=this._sortedChildren,this._tempLayerParent=t._activeLayer,t._activeLayer=this,!0)):(this.displayOrder=0,!1))},i.prototype._postRender=function(t){this.children=this._tempChildren,t._activeLayer=this._tempLayerParent,this._tempLayerParent=null},i.prototype.renderWebGL=function(t){this._preRender(t)&&(this.group.useRenderTexture&&(this.textureCache||(this.textureCache=new e(this)),this.textureCache.pushTexture(t)),this.containerRenderWebGL(t),this._postRender(t),this.group.useRenderTexture&&this.textureCache.popTexture(t))},i.prototype.renderCanvas=function(t){this._preRender(t)&&(this.containerRenderCanvas(t),this._postRender(t))},i.prototype.destroy=function(t){this.textureCache&&(this.textureCache.destroy(),this.textureCache=null),r.prototype.destroy.call(this,t)},i}(PIXI.Container);t.Layer=r}(r||(r={})),function(t){var e=function(e){function r(){var t=e.call(this)||this;return t.isStage=!0,t._tempGroups=[],t._activeLayers=[],t._activeParentStage=null,t}return n(r,e),r.prototype.clear=function(){this._activeLayers.length=0,this._tempGroups.length=0},r.prototype.destroy=function(t){this.clear(),e.prototype.destroy.call(this,t)},r.prototype._addRecursive=function(t){if(t.visible){if(t.isLayer){var e=t;this._activeLayers.push(e),e.beginWork(this)}if(t!=this&&t.isStage){t.updateAsChildStage(this)}else{var n=t.parentGroup;null!==n&&n.addDisplayObject(this,t);var i=t.parentLayer;if(null!==i&&(n=i.group).addDisplayObject(this,t),t.updateOrder=++r._updateOrderCounter,!(t.alpha<=0||!t.renderable||!t.layerableChildren||n&&n.sortPriority)){var o=t.children;if(o&&o.length)for(var a=0;a<o.length;a++)this._addRecursive(o[a])}}}},r.prototype._addRecursiveChildren=function(t){if(!(t.alpha<=0)&&t.renderable&&t.layerableChildren){var e=t.children;if(e&&e.length)for(var r=0;r<e.length;r++)this._addRecursive(e[r])}},r.prototype._updateStageInner=function(){this.clear(),this._addRecursive(this);for(var t=this._activeLayers,e=0;e<t.length;e++){if((i=t[e]).group.sortPriority){i.endWork();for(var r=i._sortedChildren,n=0;n<r.length;n++)this._addRecursiveChildren(r[n])}}for(e=0;e<t.length;e++){var i;(i=t[e]).group.sortPriority||i.endWork()}},r.prototype.updateAsChildStage=function(t){this._activeParentStage=t,r._updateOrderCounter=0,this._updateStageInner()},r.prototype.updateStage=function(){this._activeParentStage=null,t.Group._layerUpdateId++,this._updateStageInner()},r._updateOrderCounter=0,r}(t.Layer);t.Stage=e}(r||(r={})),r||(r={}),Object.assign(PIXI.WebGLRenderer.prototype,{_lastDisplayOrder:0,_activeLayer:null,incDisplayOrder:function(){return++this._lastDisplayOrder},_oldRender:PIXI.WebGLRenderer.prototype.render,render:function(t,e,r,n,i){e||(this._lastDisplayOrder=0),this._activeLayer=null,t.isStage&&t.updateStage(),this._oldRender(t,e,r,n,i)}}),Object.assign(PIXI.CanvasRenderer.prototype,{_lastDisplayOrder:0,_activeLayer:null,incDisplayOrder:function(){return++this._lastDisplayOrder},_oldRender:PIXI.CanvasRenderer.prototype.render,render:function(t,e,r,n,i){e||(this._lastDisplayOrder=0),this._activeLayer=null,t.isStage&&t.updateStage(),this._oldRender(t,e,r,n,i)}}),function(t){PIXI.display=t}(r||(r={}))},function(t,e){!function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&r.rotl(t,8)|4278255360&r.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=r.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var r=[],n=0;n<t.length;n+=3)for(var i=t[n]<<16|t[n+1]<<8|t[n+2],o=0;o<4;o++)8*n+6*o<=8*t.length?r.push(e.charAt(i>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n<t.length;i=++n%4)0!=i&&r.push((e.indexOf(t.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(n))>>>6-2*i);return r}};t.exports=r}()},function(t,e){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
|
|
14
|
+
*/var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,u=a(t),l=1;l<arguments.length;l++){for(var c in r=Object(arguments[l]))i.call(r,c)&&(u[c]=r[c]);if(n){s=n(r);for(var h=0;h<s.length;h++)o.call(r,s[h])&&(u[s[h]]=r[s[h]])}}return u}},function(t,e,r){"use strict";(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var r=Date.now(),n=["ms","moz","webkit","o"],i=0;i<n.length&&!t.requestAnimationFrame;++i){var o=n[i];t.requestAnimationFrame=t[o+"RequestAnimationFrame"],t.cancelAnimationFrame=t[o+"CancelAnimationFrame"]||t[o+"CancelRequestAnimationFrame"]}t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),n=16+r-e;return n<0&&(n=0),r=e,setTimeout((function(){r=Date.now(),t(performance.now())}),n)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){return clearTimeout(t)})}).call(this,r(19))},function(t,e,r){"use strict";Math.sign||(Math.sign=function(t){return 0===(t=Number(t))||isNaN(t)?t:t>0?1:-1})},function(t,e,r){"use strict";Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t})},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(27),o=(n=i)&&n.__esModule?n:{default:n},a=r(2);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var u=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s(this,t),this.x=e,this.y=r,this.radius=n,this.type=a.SHAPES.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var r=this.radius*this.radius,n=this.x-t,i=this.y-e;return(n*=n)+(i*=i)<=r},t.prototype.getBounds=function(){return new o.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}();e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(27),o=(n=i)&&n.__esModule?n:{default:n},a=r(2);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var u=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;s(this,t),this.x=e,this.y=r,this.width=n,this.height=i,this.type=a.SHAPES.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var r=(t-this.x)/this.width,n=(e-this.y)/this.height;return(r*=r)+(n*=n)<=1},t.prototype.getBounds=function(){return new o.default(this.x-this.width,this.y-this.height,this.width,this.height)},t}();e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(25),o=(n=i)&&n.__esModule?n:{default:n},a=r(2);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var u=function(){function t(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];if(s(this,t),Array.isArray(r[0])&&(r=r[0]),r[0]instanceof o.default){for(var i=[],u=0,l=r.length;u<l;u++)i.push(r[u].x,r[u].y);r=i}this.closed=!0,this.points=r,this.type=a.SHAPES.POLY}return t.prototype.clone=function(){return new t(this.points.slice())},t.prototype.close=function(){var t=this.points;t[0]===t[t.length-2]&&t[1]===t[t.length-1]||t.push(t[0],t[1])},t.prototype.contains=function(t,e){for(var r=!1,n=this.points.length/2,i=0,o=n-1;i<n;o=i++){var a=this.points[2*i],s=this.points[2*i+1],u=this.points[2*o],l=this.points[2*o+1];s>e!=l>e&&t<(e-s)/(l-s)*(u-a)+a&&(r=!r)}return r},t}();e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n=r(2);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20;i(this,t),this.x=e,this.y=r,this.width=o,this.height=a,this.radius=s,this.type=n.SHAPES.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var r=t-(this.x+this.radius),n=e-(this.y+this.radius),i=this.radius*this.radius;if(r*r+n*n<=i)return!0;if((r=t-(this.x+this.width-this.radius))*r+n*n<=i)return!0;if(r*r+(n=e-(this.y+this.height-this.radius))*n<=i)return!0;if((r=t-(this.x+this.radius))*r+n*n<=i)return!0}return!1},t}();e.default=o},function(t,e){t.exports=function(t,e){var r=t.getContext("webgl",e)||t.getContext("experimental-webgl",e);if(!r)throw new Error("This browser does not support webGL. Try using the canvas renderer");return r}},function(t,e){var r=new ArrayBuffer(0),n=function(t,e,n,i){this.gl=t,this.buffer=t.createBuffer(),this.type=e||t.ARRAY_BUFFER,this.drawType=i||t.STATIC_DRAW,this.data=r,n&&this.upload(n),this._updateID=0};n.prototype.upload=function(t,e,r){r||this.bind();var n=this.gl;t=t||this.data,e=e||0,this.data.byteLength>=t.byteLength?n.bufferSubData(this.type,e,t):n.bufferData(this.type,t,this.drawType),this.data=t},n.prototype.bind=function(){this.gl.bindBuffer(this.type,this.buffer)},n.createVertexBuffer=function(t,e,r){return new n(t,t.ARRAY_BUFFER,e,r)},n.createIndexBuffer=function(t,e,r){return new n(t,t.ELEMENT_ARRAY_BUFFER,e,r)},n.create=function(t,e,r,i){return new n(t,e,r,i)},n.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},t.exports=n},function(t,e,r){var n=r(43),i=function(t,e,r){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=r||100};i.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new n(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},i.prototype.enableStencil=function(){if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},i.prototype.clear=function(t,e,r,n){this.bind();var i=this.gl;i.clearColor(t,e,r,n),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT)},i.prototype.bind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},i.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},i.prototype.resize=function(t,e){var r=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,this.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e))},i.prototype.destroy=function(){var t=this.gl;this.texture&&this.texture.destroy(),t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},i.createRGBA=function(t,e,r,o){var a=n.fromData(t,null,e,r);a.enableNearestScaling(),a.enableWrapClamp();var s=new i(t,e,r);return s.enableTexture(a),s.unbind(),s},i.createFloat32=function(t,e,r,o){var a=new n.fromData(t,o,e,r);a.enableNearestScaling(),a.enableWrapClamp();var s=new i(t,e,r);return s.enableTexture(a),s.unbind(),s},t.exports=i},function(t,e,r){var n=r(44),i=r(45),o=r(47),a=r(49),s=r(50),u=function(t,e,r,u,l){this.gl=t,u&&(e=a(e,u),r=a(r,u)),this.program=n(t,e,r,l),this.attributes=i(t,this.program),this.uniformData=o(t,this.program),this.uniforms=s(t,this.uniformData)};u.prototype.bind=function(){return this.gl.useProgram(this.program),this},u.prototype.destroy=function(){this.attributes=null,this.uniformData=null,this.uniforms=null,this.gl.deleteProgram(this.program)},t.exports=u},function(t,e,r){var n=r(42);function i(t,e){if(this.nativeVaoExtension=null,i.FORCE_NATIVE||(this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=e,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES();var r=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(r),attribState:new Array(r)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}i.prototype.constructor=i,t.exports=i,i.FORCE_NATIVE=!1,i.prototype.bind=function(){if(this.nativeVao){if(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty)return this.dirty=!1,this.activate(),this;this.indexBuffer&&this.indexBuffer.bind()}else this.activate();return this},i.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},i.prototype.activate=function(){for(var t=this.gl,e=null,r=0;r<this.attributes.length;r++){var i=this.attributes[r];e!==i.buffer&&(i.buffer.bind(),e=i.buffer),t.vertexAttribPointer(i.attribute.location,i.attribute.size,i.type||t.FLOAT,i.normalized||!1,i.stride||0,i.start||0)}return n(t,this.attributes,this.nativeState),this.indexBuffer&&this.indexBuffer.bind(),this},i.prototype.addAttribute=function(t,e,r,n,i,o){return this.attributes.push({buffer:t,attribute:e,location:e.location,type:r||this.gl.FLOAT,normalized:n||!1,stride:i||0,start:o||0}),this.dirty=!0,this},i.prototype.addIndex=function(t){return this.indexBuffer=t,this.dirty=!0,this},i.prototype.clear=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.attributes.length=0,this.indexBuffer=null,this},i.prototype.draw=function(t,e,r){var n=this.gl;return this.indexBuffer?n.drawElements(t,e||this.indexBuffer.data.length,n.UNSIGNED_SHORT,2*(r||0)):n.drawArrays(t,r,e||this.getSize()),this},i.prototype.destroy=function(){this.gl=null,this.indexBuffer=null,this.attributes=null,this.nativeState=null,this.nativeVao&&this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao),this.nativeVaoExtension=null,this.nativeVao=null},i.prototype.getSize=function(){var t=this.attributes[0];return t.buffer.data.length/(t.stride/4||t.attribute.size)}},function(t,e,r){t.exports={compileProgram:r(44),defaultValue:r(48),extractAttributes:r(45),extractUniforms:r(47),generateUniformAccessObject:r(50),setPrecision:r(49),mapSize:r(46),mapType:r(28)}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){if(o.default.tablet||o.default.phone)return 4;return t};var n,i=r(30),o=(n=i)&&n.__esModule?n:{default:n}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){return!(navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))}},function(t,e,r){"use strict";e.__esModule=!0,e.default={mixin:function(t){!function(t){t.__plugins={},t.registerPlugin=function(e,r){t.__plugins[e]=r},t.prototype.initPlugins=function(){for(var e in this.plugins=this.plugins||{},t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null}}(t)}}},function(t,e,r){"use strict";function n(t,e){if(t&&e)for(var r=Object.keys(e),n=0;n<r.length;++n){var i=r[n];Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}}e.__esModule=!0,e.mixin=n,e.delayMixin=function(t,e){i.push(t,e)},e.performMixins=function(){for(var t=0;t<i.length;t+=2)n(i[t],i[t+1]);i.length=0};var i=[]},function(t,e,r){"use strict";t.exports=function(t,e,r){var n,i=t.length;if(!(e>=i||0===r)){var o=i-(r=e+r>i?i-e:r);for(n=e;n<o;++n)t[n]=t[n+r];t.length=o}}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[n.BLEND_MODES.NORMAL_NPM]=n.BLEND_MODES.NORMAL,t[n.BLEND_MODES.ADD_NPM]=n.BLEND_MODES.ADD,t[n.BLEND_MODES.SCREEN_NPM]=n.BLEND_MODES.SCREEN,e[n.BLEND_MODES.NORMAL]=n.BLEND_MODES.NORMAL_NPM,e[n.BLEND_MODES.ADD]=n.BLEND_MODES.ADD_NPM,e[n.BLEND_MODES.SCREEN]=n.BLEND_MODES.SCREEN_NPM;var i=[];return i.push(e),i.push(t),i};var n=r(2)},function(t,e,r){(function(t,n){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,l=/^xn--/,c=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function v(t){throw new RangeError(f[t])}function _(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function g(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+_((t=t.replace(h,".")).split("."),e).join(".")}function y(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function m(t){return _(t,(function(t){var e="";return t>65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function E(t,e,r){var n=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;n+=36)t=d(t/35);return d(n+36*t/(t+38))}function b(t){var e,r,n,i,o,a,s,l,c,h,f,p=[],_=t.length,g=0,y=128,x=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&v("not-basic"),p.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<_;){for(o=g,a=1,s=36;i>=_&&v("invalid-input"),((l=(f=t.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||l>d((u-g)/a))&&v("overflow"),g+=l*a,!(l<(c=s<=x?1:s>=x+26?26:s-x));s+=36)a>d(u/(h=36-c))&&v("overflow"),a*=h;x=E(g-o,e=p.length+1,0==o),d(g/e)>u-y&&v("overflow"),y+=d(g/e),g%=e,p.splice(g++,0,y)}return m(p)}function T(t){var e,r,n,i,o,a,s,l,c,h,f,_,g,m,b,T=[];for(_=(t=y(t)).length,e=128,r=0,o=72,a=0;a<_;++a)(f=t[a])<128&&T.push(p(f));for(n=i=T.length,i&&T.push("-");n<_;){for(s=u,a=0;a<_;++a)(f=t[a])>=e&&f<s&&(s=f);for(s-e>d((u-r)/(g=n+1))&&v("overflow"),r+=(s-e)*g,e=s,a=0;a<_;++a)if((f=t[a])<e&&++r>u&&v("overflow"),f==e){for(l=r,c=36;!(l<(h=c<=o?1:c>=o+26?26:c-o));c+=36)b=l-h,m=36-h,T.push(p(x(h+b%m,0))),l=d(b/m);T.push(p(x(l,0))),o=E(r,g,n==i),r=0,++n}++r,++e}return T.join("")}s={version:"1.4.1",ucs2:{decode:y,encode:m},decode:b,encode:T,toASCII:function(t){return g(t,(function(t){return c.test(t)?"xn--"+T(t):t}))},toUnicode:function(t){return g(t,(function(t){return l.test(t)?b(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return s}.call(e,r,e,t))||(t.exports=i)}()}).call(this,r(56)(t),r(19))},function(t,e,r){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){"use strict";e.decode=e.parse=r(119),e.encode=e.stringify=r(120)},function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,o){e=e||"&",r=r||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=t.length;u>0&&l>u&&(l=u);for(var c=0;c<l;++c){var h,f,d,p,v=t[c].replace(s,"%20"),_=v.indexOf(r);_>=0?(h=v.substr(0,_),f=v.substr(_+1)):(h=v,f=""),d=decodeURIComponent(h),p=decodeURIComponent(f),n(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,s){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?o(a(t),(function(a){var s=encodeURIComponent(n(a))+r;return i(t[a])?o(t[a],(function(t){return s+encodeURIComponent(n(t))})).join(e):s+encodeURIComponent(n(t[a]))})).join(e):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var a=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=s(r(5)),o=r(2),a=s(r(122));function s(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._head=new a.default(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/i.default.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&null===e._requestId&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new a.default(t,e,r))},t.prototype.addOnce=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new a.default(t,e,r,!0))},t.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null},t.prototype.update=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now(),e=void 0;if(t>this.lastTime){(e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*i.default.TARGET_FPMS*this.speed;for(var r=this._head,n=r.next;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.elapsedMS=0;this.lastTime=t},n(t,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,i.default.TARGET_FPMS);this._maxElapsedMS=1/e}}]),t}();e.default=u},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];n(this,t),this.fn=e,this.context=r,this.priority=i,this.once=o,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return e=e||null,this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}();e.default=i},function(t,e,r){"use strict";e.__esModule=!0;var n=s(r(14)),i=r(2),o=r(6),a=s(r(20));function s(t){return t&&t.__esModule?t:{default:t}}var u=new o.Matrix,l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,r=this.renderer,n=e._frame.width,s=e._frame.height,l=t.transform.worldTransform,c=0,h=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(r.setBlendMode(t.blendMode),e.valid)){r.context.globalAlpha=t.worldAlpha;var f=e.baseTexture.scaleMode===i.SCALE_MODES.LINEAR;r.smoothProperty&&r.context[r.smoothProperty]!==f&&(r.context[r.smoothProperty]=f),e.trim?(c=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,h=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(c=(.5-t.anchor.x)*e.orig.width,h=(.5-t.anchor.y)*e.orig.height),e.rotate&&(l.copy(u),l=u,o.GroupD8.matrixAppendRotationInv(l,e.rotate,c,h),c=0,h=0),c-=n/2,h-=s/2,r.roundPixels?(r.context.setTransform(l.a,l.b,l.c,l.d,l.tx*r.resolution|0,l.ty*r.resolution|0),c|=0,h|=0):r.context.setTransform(l.a,l.b,l.c,l.d,l.tx*r.resolution,l.ty*r.resolution);var d=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint===t.tint&&t.tintedTexture.tintId===t._texture._updateID||(t.cachedTint=t.tint,t.tintedTexture=a.default.getTintedTexture(t,t.tint)),r.context.drawImage(t.tintedTexture,0,0,n*d,s*d,c*r.resolution,h*r.resolution,n*r.resolution,s*r.resolution)):r.context.drawImage(e.baseTexture.source,e._frame.x*d,e._frame.y*d,n*d,s*d,c*r.resolution,h*r.resolution,n*r.resolution,s*r.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();e.default=l,n.default.registerPlugin("sprite",l)},function(t,e,r){"use strict";e.__esModule=!0;var n=r(2);var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.pushMask=function(t){var e=this.renderer;e.context.save();var r=t.alpha,n=t.transform.worldTransform,i=e.resolution;e.context.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i,n.ty*i),t._texture||(this.renderGraphicsShape(t),e.context.clip()),t.worldAlpha=r},t.prototype.renderGraphicsShape=function(t){var e=this.renderer.context,r=t.graphicsData.length;if(0!==r){e.beginPath();for(var i=0;i<r;i++){var o=t.graphicsData[i],a=o.shape;if(o.type===n.SHAPES.POLY){var s=a.points,u=o.holes,l=void 0,c=void 0;e.moveTo(s[0],s[1]);for(var h=2;h<s.length;h+=2)e.lineTo(s[h],s[h+1]);if(s[0]===s[s.length-2]&&s[1]===s[s.length-1]&&e.closePath(),u.length>0){l=0;for(var f=0;f<s.length;f+=2)l+=s[f]*s[f+3]-s[f+1]*s[f+2];for(var d=0;d<u.length;d++){s=u[d].points,c=0;for(var p=0;p<s.length;p+=2)c+=s[p]*s[p+3]-s[p+1]*s[p+2];if(e.moveTo(s[0],s[1]),c*l<0)for(var v=2;v<s.length;v+=2)e.lineTo(s[v],s[v+1]);else for(var _=s.length-2;_>=2;_-=2)e.lineTo(s[_],s[_+1])}}}else if(o.type===n.SHAPES.RECT)e.rect(a.x,a.y,a.width,a.height),e.closePath();else if(o.type===n.SHAPES.CIRC)e.arc(a.x,a.y,a.radius,0,2*Math.PI),e.closePath();else if(o.type===n.SHAPES.ELIP){var g=2*a.width,y=2*a.height,m=a.x-g/2,x=a.y-y/2,E=g/2*.5522848,b=y/2*.5522848,T=m+g,R=x+y,O=m+g/2,S=x+y/2;e.moveTo(m,S),e.bezierCurveTo(m,S-b,O-E,x,O,x),e.bezierCurveTo(O+E,x,T,S-b,T,S),e.bezierCurveTo(T,S+b,O+E,R,O,R),e.bezierCurveTo(O-E,R,m,S+b,m,S),e.closePath()}else if(o.type===n.SHAPES.RREC){var C=a.x,w=a.y,A=a.width,P=a.height,M=a.radius,I=Math.min(A,P)/2|0;M=M>I?I:M,e.moveTo(C,w+M),e.lineTo(C,w+P-M),e.quadraticCurveTo(C,w+P,C+M,w+P),e.lineTo(C+A-M,w+P),e.quadraticCurveTo(C+A,w+P,C+A,w+P-M),e.lineTo(C+A,w+M),e.quadraticCurveTo(C+A,w,C+A-M,w),e.lineTo(C+M,w),e.quadraticCurveTo(C,w,C,w+M),e.closePath()}}}},t.prototype.popMask=function(t){t.context.restore(),t.invalidateBlendMode()},t.prototype.destroy=function(){},t}();e.default=i},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,a.default)()?(t[i.BLEND_MODES.NORMAL]="source-over",t[i.BLEND_MODES.ADD]="lighter",t[i.BLEND_MODES.MULTIPLY]="multiply",t[i.BLEND_MODES.SCREEN]="screen",t[i.BLEND_MODES.OVERLAY]="overlay",t[i.BLEND_MODES.DARKEN]="darken",t[i.BLEND_MODES.LIGHTEN]="lighten",t[i.BLEND_MODES.COLOR_DODGE]="color-dodge",t[i.BLEND_MODES.COLOR_BURN]="color-burn",t[i.BLEND_MODES.HARD_LIGHT]="hard-light",t[i.BLEND_MODES.SOFT_LIGHT]="soft-light",t[i.BLEND_MODES.DIFFERENCE]="difference",t[i.BLEND_MODES.EXCLUSION]="exclusion",t[i.BLEND_MODES.HUE]="hue",t[i.BLEND_MODES.SATURATION]="saturate",t[i.BLEND_MODES.COLOR]="color",t[i.BLEND_MODES.LUMINOSITY]="luminosity"):(t[i.BLEND_MODES.NORMAL]="source-over",t[i.BLEND_MODES.ADD]="lighter",t[i.BLEND_MODES.MULTIPLY]="source-over",t[i.BLEND_MODES.SCREEN]="source-over",t[i.BLEND_MODES.OVERLAY]="source-over",t[i.BLEND_MODES.DARKEN]="source-over",t[i.BLEND_MODES.LIGHTEN]="source-over",t[i.BLEND_MODES.COLOR_DODGE]="source-over",t[i.BLEND_MODES.COLOR_BURN]="source-over",t[i.BLEND_MODES.HARD_LIGHT]="source-over",t[i.BLEND_MODES.SOFT_LIGHT]="source-over",t[i.BLEND_MODES.DIFFERENCE]="source-over",t[i.BLEND_MODES.EXCLUSION]="source-over",t[i.BLEND_MODES.HUE]="source-over",t[i.BLEND_MODES.SATURATION]="source-over",t[i.BLEND_MODES.COLOR]="source-over",t[i.BLEND_MODES.LUMINOSITY]="source-over");return t[i.BLEND_MODES.NORMAL_NPM]=t[i.BLEND_MODES.NORMAL],t[i.BLEND_MODES.ADD_NPM]=t[i.BLEND_MODES.ADD],t[i.BLEND_MODES.SCREEN_NPM]=t[i.BLEND_MODES.SCREEN],t};var n,i=r(2),o=r(62),a=(n=o)&&n.__esModule?n:{default:n}},function(t,e,r){"use strict";e.__esModule=!0;var n=d(r(21)),i=d(r(22)),o=d(r(37)),a=d(r(139)),s=d(r(140)),u=d(r(141)),l=d(r(5)),c=r(4),h=d(r(7)),f=d(r(34));function d(t){return t&&t.__esModule?t:{default:t}}var p=0,v=0,_=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));n.vertSize=5,n.vertByteSize=4*n.vertSize,n.size=l.default.SPRITE_BATCH_SIZE,n.buffers=[];for(var i=1;i<=f.default.nextPow2(n.size);i*=2)n.buffers.push(new u.default(4*i*n.vertByteSize));n.indices=(0,o.default)(n.size),n.shader=null,n.currentIndex=0,n.groups=[];for(var a=0;a<n.size;a++)n.groups[a]={textures:[],textureCount:0,ids:[],size:0,start:0,blend:0};return n.sprites=[],n.vertexBuffers=[],n.vaos=[],n.vaoMax=2,n.vertexCount=0,n.renderer.on("prerender",n.onPrerender,n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.renderer.legacy?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),l.default.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(0,s.default)(this.MAX_TEXTURES,t)),this.shader=(0,a.default)(t,this.MAX_TEXTURES),this.indexBuffer=h.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.renderer.bindVao(null);for(var e=this.shader.attributes,r=0;r<this.vaoMax;r++){var n=this.vertexBuffers[r]=h.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),i=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(n,e.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(n,e.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(n,e.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);e.aTextureId&&i.addAttribute(n,e.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[r]=i}this.vao=this.vaos[0],this.currentBlendMode=99999,this.boundTextures=new Array(this.MAX_TEXTURES)},e.prototype.onPrerender=function(){this.vertexCount=0},e.prototype.render=function(t){this.currentIndex>=this.size&&this.flush(),t._texture._uvs&&(this.sprites[this.currentIndex++]=t)},e.prototype.flush=function(){if(0!==this.currentIndex){var t=this.renderer.gl,e=this.MAX_TEXTURES,r=f.default.nextPow2(this.currentIndex),n=f.default.log2(r),i=this.buffers[n],o=this.sprites,a=this.groups,s=i.float32View,u=i.uint32View,d=this.boundTextures,_=this.renderer.boundTextures,g=this.renderer.textureGC.count,y=0,m=void 0,x=void 0,E=1,b=0,T=a[0],R=void 0,O=void 0,S=c.premultiplyBlendMode[o[0]._texture.baseTexture.premultipliedAlpha?1:0][o[0].blendMode];T.textureCount=0,T.start=0,T.blend=S,p++;var C=void 0;for(C=0;C<e;++C){var w=_[C];w._enabled!==p?(d[C]=w,w._virtalBoundId=C,w._enabled=p):d[C]=this.renderer.emptyTextures[C]}for(p++,C=0;C<this.currentIndex;++C){var A=o[C];o[C]=null,m=A._texture.baseTexture;var P=c.premultiplyBlendMode[Number(m.premultipliedAlpha)][A.blendMode];if(S!==P&&(S=P,x=null,b=e,p++),x!==m&&(x=m,m._enabled!==p)){if(b===e&&(p++,T.size=C-T.start,b=0,(T=a[E++]).blend=S,T.textureCount=0,T.start=C),m.touched=g,-1===m._virtalBoundId)for(var M=0;M<e;++M){var I=(M+v)%e,D=d[I];if(D._enabled!==p){v++,D._virtalBoundId=-1,m._virtalBoundId=I,d[I]=m;break}}m._enabled=p,T.textureCount++,T.ids[b]=m._virtalBoundId,T.textures[b++]=m}if(R=A.vertexData,O=A._texture._uvs.uvsUint32,this.renderer.roundPixels){var L=this.renderer.resolution;s[y]=(R[0]*L|0)/L,s[y+1]=(R[1]*L|0)/L,s[y+5]=(R[2]*L|0)/L,s[y+6]=(R[3]*L|0)/L,s[y+10]=(R[4]*L|0)/L,s[y+11]=(R[5]*L|0)/L,s[y+15]=(R[6]*L|0)/L,s[y+16]=(R[7]*L|0)/L}else s[y]=R[0],s[y+1]=R[1],s[y+5]=R[2],s[y+6]=R[3],s[y+10]=R[4],s[y+11]=R[5],s[y+15]=R[6],s[y+16]=R[7];u[y+2]=O[0],u[y+7]=O[1],u[y+12]=O[2],u[y+17]=O[3];var U=Math.min(A.worldAlpha,1),N=U<1&&m.premultipliedAlpha?(0,c.premultiplyTint)(A._tintRGB,U):A._tintRGB+(255*U<<24);u[y+3]=u[y+8]=u[y+13]=u[y+18]=N,s[y+4]=s[y+9]=s[y+14]=s[y+19]=m._virtalBoundId,y+=20}if(T.size=C-T.start,l.default.CAN_UPLOAD_SAME_BUFFER)this.vertexBuffers[this.vertexCount].upload(i.vertices,0,!0);else{if(this.vaoMax<=this.vertexCount){this.vaoMax++;var F=this.shader.attributes,j=this.vertexBuffers[this.vertexCount]=h.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),k=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(j,F.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(j,F.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(j,F.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);F.aTextureId&&k.addAttribute(j,F.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[this.vertexCount]=k}this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].upload(i.vertices,0,!1),this.vertexCount++}for(C=0;C<e;++C)_[C]._virtalBoundId=-1;for(C=0;C<E;++C){for(var B=a[C],H=B.textureCount,W=0;W<H;W++)x=B.textures[W],_[B.ids[W]]!==x&&this.renderer.bindTexture(x,B.ids[W],!0),x._virtalBoundId=-1;this.renderer.state.setBlendMode(B.blend),t.drawElements(t.TRIANGLES,6*B.size,t.UNSIGNED_SHORT,6*B.start*2)}this.currentIndex=0}},e.prototype.start=function(){this.renderer.bindShader(this.shader),l.default.CAN_UPLOAD_SAME_BUFFER&&(this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].bind())},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this.vaoMax;e++)this.vertexBuffers[e]&&this.vertexBuffers[e].destroy(),this.vaos[e]&&this.vaos[e].destroy();this.indexBuffer&&this.indexBuffer.destroy(),this.renderer.off("prerender",this.onPrerender,this),t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null;for(var r=0;r<this.buffers.length;++r)this.buffers[r].destroy()},e}(n.default);e.default=_,i.default.registerPlugin("sprite",_)},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(15)),i=o(r(63));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.scissor=!1,n.scissorData=null,n.scissorRenderTarget=null,n.enableScissor=!0,n.alphaMaskPool=[],n.alphaMaskIndex=0,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.pushMask=function(t,e){if(e.texture)this.pushSpriteMask(t,e);else if(this.enableScissor&&!this.scissor&&this.renderer._activeRenderTarget.root&&!this.renderer.stencilManager.stencilMaskStack.length&&e.isFastRect()){var r=e.worldTransform,n=Math.atan2(r.b,r.a);(n=Math.round(n*(180/Math.PI)))%90?this.pushStencilMask(e):this.pushScissorMask(t,e)}else this.pushStencilMask(e)},e.prototype.popMask=function(t,e){e.texture?this.popSpriteMask(t,e):this.enableScissor&&!this.renderer.stencilManager.stencilMaskStack.length?this.popScissorMask(t,e):this.popStencilMask(t,e)},e.prototype.pushSpriteMask=function(t,e){var r=this.alphaMaskPool[this.alphaMaskIndex];r||(r=this.alphaMaskPool[this.alphaMaskIndex]=[new i.default(e)]),r[0].resolution=this.renderer.resolution,r[0].maskSprite=e;var n=t.filterArea;t.filterArea=e.getBounds(!0),this.renderer.filterManager.pushFilter(t,r),t.filterArea=n,this.alphaMaskIndex++},e.prototype.popSpriteMask=function(){this.renderer.filterManager.popFilter(),this.alphaMaskIndex--},e.prototype.pushStencilMask=function(t){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.pushStencil(t)},e.prototype.popStencilMask=function(){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.popStencil()},e.prototype.pushScissorMask=function(t,e){e.renderable=!0;var r=this.renderer._activeRenderTarget,n=e.getBounds();n.fit(r.size),e.renderable=!1,this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);var i=this.renderer.resolution;this.renderer.gl.scissor(n.x*i,(r.root?r.size.height-n.y-n.height:n.y)*i,n.width*i,n.height*i),this.scissorRenderTarget=r,this.scissorData=e,this.scissor=!0},e.prototype.popScissorMask=function(){this.scissorRenderTarget=null,this.scissorData=null,this.scissor=!1;var t=this.renderer.gl;t.disable(t.SCISSOR_TEST)},e}(n.default);e.default=a},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){var n=a(t),i=a(e);return Object.assign(n,i)};var n,i=r(7);var o=((n=i)&&n.__esModule?n:{default:n}).default.shader.defaultValue;function a(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),r={},n=void 0,i=t.replace(/\s+/g," ").split(/\s*;\s*/),a=0;a<i.length;a++){var s=i[a].trim();if(s.indexOf("uniform")>-1){var u=s.split(" "),l=u[1],c=u[2],h=1;c.indexOf("[")>-1&&(n=c.split(/\[|]/),c=n[0],h*=Number(n[1])),c.match(e)||(r[c]={value:o(l,h),name:c,type:l})}}return r}},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,l=[],c=!1,h=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):h=-1,l.length&&d())}function d(){if(!c){var t=s(f);c=!0;for(var e=l.length;e;){for(u=l,l=[];++h<e;)u&&u[h].run();h=-1,e=l.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new p(t,e)),1!==l.length||c||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(15),o=(n=i)&&n.__esModule?n:{default:n};var a=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.stencilMaskStack=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.setMaskStack=function(t){this.stencilMaskStack=t;var e=this.renderer.gl;0===t.length?e.disable(e.STENCIL_TEST):e.enable(e.STENCIL_TEST)},e.prototype.pushStencil=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.renderer._activeRenderTarget.attachStencilBuffer();var e=this.renderer.gl,r=this.stencilMaskStack.length;0===r&&e.enable(e.STENCIL_TEST),this.stencilMaskStack.push(t),e.colorMask(!1,!1,!1,!1),e.stencilFunc(e.EQUAL,r,this._getBitwiseMask()),e.stencilOp(e.KEEP,e.KEEP,e.INCR),this.renderer.plugins.graphics.render(t),this._useCurrent()},e.prototype.popStencil=function(){this.renderer.setObjectRenderer(this.renderer.plugins.graphics);var t=this.renderer.gl,e=this.stencilMaskStack.pop();0===this.stencilMaskStack.length?(t.disable(t.STENCIL_TEST),t.clear(t.STENCIL_BUFFER_BIT),t.clearStencil(0)):(t.colorMask(!1,!1,!1,!1),t.stencilOp(t.KEEP,t.KEEP,t.DECR),this.renderer.plugins.graphics.render(e),this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.stencilMaskStack.length,this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<<this.stencilMaskStack.length)-1},e.prototype.destroy=function(){o.default.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},e}(o.default);e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=c(r(15)),i=c(r(23)),o=c(r(66)),a=r(6),s=c(r(16)),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(132)),l=c(r(34));function c(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var f=function(){function t(){h(this,t),this.renderTarget=null,this.target=null,this.resolution=1,this.sourceFrame=new a.Rectangle,this.destinationFrame=new a.Rectangle,this.filters=[]}return t.prototype.clear=function(){this.filters=null,this.target=null,this.renderTarget=null},t}(),d=function(t){function e(r){h(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.gl=n.renderer.gl,n.quad=new o.default(n.gl,r.state.attribState),n.shaderCache={},n.pool={},n.filterData=null,n.managedFilters=[],n.renderer.on("prerender",n.onPrerender,n),n._screenWidth=r.view.width,n._screenHeight=r.view.height,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.pushFilter=function(t,e){var r=this.renderer,n=this.filterData;if(!n){n=this.renderer._activeRenderTarget.filterStack;var i=new f;i.sourceFrame=i.destinationFrame=this.renderer._activeRenderTarget.size,i.renderTarget=r._activeRenderTarget,this.renderer._activeRenderTarget.filterData=n={index:0,stack:[i]},this.filterData=n}var o=n.stack[++n.index],a=n.stack[0].destinationFrame;o||(o=n.stack[n.index]=new f);var s=t.filterArea&&0===t.filterArea.x&&0===t.filterArea.y&&t.filterArea.width===r.screen.width&&t.filterArea.height===r.screen.height,u=e[0].resolution,l=0|e[0].padding,c=s?r.screen:t.filterArea||t.getBounds(!0),h=o.sourceFrame,d=o.destinationFrame;h.x=(c.x*u|0)/u,h.y=(c.y*u|0)/u,h.width=(c.width*u|0)/u,h.height=(c.height*u|0)/u,s||(n.stack[0].renderTarget.transform||e[0].autoFit&&h.fit(a),h.pad(l)),d.width=h.width,d.height=h.height;var p=this.getPotRenderTarget(r.gl,h.width,h.height,u);o.target=t,o.filters=e,o.resolution=u,o.renderTarget=p,p.setFrame(d,h),r.bindRenderTarget(p),p.clear()},e.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],r=t.stack[t.index];this.quad.map(r.renderTarget.size,r.sourceFrame).upload();var n=r.filters;if(1===n.length)n[0].apply(this,r.renderTarget,e.renderTarget,!1,r),this.freePotRenderTarget(r.renderTarget);else{var i=r.renderTarget,o=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,r.resolution);o.setFrame(r.destinationFrame,r.sourceFrame),o.clear();var a=0;for(a=0;a<n.length-1;++a){n[a].apply(this,i,o,!0,r);var s=i;i=o,o=s}n[a].apply(this,i,e.renderTarget,!1,r),this.freePotRenderTarget(i),this.freePotRenderTarget(o)}r.clear(),t.index--,0===t.index&&(this.filterData=null)},e.prototype.applyFilter=function(t,e,r,n){var i=this.renderer,o=i.gl,a=t.glShaders[i.CONTEXT_UID];a||(t.glShaderKey?(a=this.shaderCache[t.glShaderKey])||(a=new s.default(this.gl,t.vertexSrc,t.fragmentSrc),t.glShaders[i.CONTEXT_UID]=this.shaderCache[t.glShaderKey]=a,this.managedFilters.push(t)):(a=t.glShaders[i.CONTEXT_UID]=new s.default(this.gl,t.vertexSrc,t.fragmentSrc),this.managedFilters.push(t)),i.bindVao(null),this.quad.initVao(a)),i.bindVao(this.quad.vao),i.bindRenderTarget(r),n&&(o.disable(o.SCISSOR_TEST),i.clear(),o.enable(o.SCISSOR_TEST)),r===i.maskManager.scissorRenderTarget&&i.maskManager.pushScissorMask(null,i.maskManager.scissorData),i.bindShader(a);var u=this.renderer.emptyTextures[0];this.renderer.boundTextures[0]=u,this.syncUniforms(a,t),i.state.setBlendMode(t.blendMode),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,e.texture.texture),this.quad.vao.draw(this.renderer.gl.TRIANGLES,6,0),o.bindTexture(o.TEXTURE_2D,u._glTextures[this.renderer.CONTEXT_UID].texture)},e.prototype.syncUniforms=function(t,e){var r=e.uniformData,n=e.uniforms,i=1,o=void 0;if(t.uniforms.filterArea){o=this.filterData.stack[this.filterData.index];var a=t.uniforms.filterArea;a[0]=o.renderTarget.size.width,a[1]=o.renderTarget.size.height,a[2]=o.sourceFrame.x,a[3]=o.sourceFrame.y,t.uniforms.filterArea=a}if(t.uniforms.filterClamp){o=o||this.filterData.stack[this.filterData.index];var s=t.uniforms.filterClamp;s[0]=0,s[1]=0,s[2]=(o.sourceFrame.width-1)/o.renderTarget.size.width,s[3]=(o.sourceFrame.height-1)/o.renderTarget.size.height,t.uniforms.filterClamp=s}for(var u in r)if(t.uniforms.data[u]){var l=r[u].type;if("sampler2d"===l&&0!==n[u]){if(n[u].baseTexture)t.uniforms[u]=this.renderer.bindTexture(n[u].baseTexture,i);else{t.uniforms[u]=i;var c=this.renderer.gl;this.renderer.boundTextures[i]=this.renderer.emptyTextures[i],c.activeTexture(c.TEXTURE0+i),n[u].texture.bind()}i++}else if("mat3"===l)void 0!==n[u].a?t.uniforms[u]=n[u].toArray(!0):t.uniforms[u]=n[u];else if("vec2"===l)if(void 0!==n[u].x){var h=t.uniforms[u]||new Float32Array(2);h[0]=n[u].x,h[1]=n[u].y,t.uniforms[u]=h}else t.uniforms[u]=n[u];else"float"===l?t.uniforms.data[u].value!==r[u]&&(t.uniforms[u]=n[u]):t.uniforms[u]=n[u]}},e.prototype.getRenderTarget=function(t,e){var r=this.filterData.stack[this.filterData.index],n=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,e||r.resolution);return n.setFrame(r.destinationFrame,r.sourceFrame),n},e.prototype.returnRenderTarget=function(t){this.freePotRenderTarget(t)},e.prototype.calculateScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return u.calculateScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size)},e.prototype.calculateNormalizedScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return u.calculateNormalizedScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size,e.destinationFrame)},e.prototype.calculateSpriteMatrix=function(t,e){var r=this.filterData.stack[this.filterData.index];return u.calculateSpriteMatrix(t,r.sourceFrame,r.renderTarget.size,e)},e.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.renderer,r=this.managedFilters;e.off("prerender",this.onPrerender,this);for(var n=0;n<r.length;n++)t||r[n].glShaders[e.CONTEXT_UID].destroy(),delete r[n].glShaders[e.CONTEXT_UID];this.shaderCache={},t?this.pool={}:this.emptyPool()},e.prototype.getPotRenderTarget=function(t,e,r,n){var o="screen";r*=n,(e*=n)===this._screenWidth&&r===this._screenHeight||(o=(65535&(e=l.default.nextPow2(e)))<<16|65535&(r=l.default.nextPow2(r))),this.pool[o]||(this.pool[o]=[]);var a=this.pool[o].pop();if(!a){var s=this.renderer.boundTextures[0];t.activeTexture(t.TEXTURE0),a=new i.default(t,e,r,null,1),t.bindTexture(t.TEXTURE_2D,s._glTextures[this.renderer.CONTEXT_UID].texture)}return a.resolution=n,a.defaultFrame.width=a.size.width=e/n,a.defaultFrame.height=a.size.height=r/n,a.filterPoolKey=o,a},e.prototype.emptyPool=function(){for(var t in this.pool){var e=this.pool[t];if(e)for(var r=0;r<e.length;r++)e[r].destroy(!0)}this.pool={}},e.prototype.freePotRenderTarget=function(t){this.pool[t.filterPoolKey].push(t)},e.prototype.onPrerender=function(){if(this._screenWidth!==this.renderer.view.width||this._screenHeight!==this.renderer.view.height){this._screenWidth=this.renderer.view.width,this._screenHeight=this.renderer.view.height;var t=this.pool.screen;if(t)for(var e=0;e<t.length;e++)t[e].destroy(!0);this.pool.screen=[]}},e}(n.default);e.default=d},function(t,e,r){"use strict";e.__esModule=!0,e.calculateScreenSpaceMatrix=function(t,e,r){var n=t.identity();return n.translate(e.x/r.width,e.y/r.height),n.scale(r.width,r.height),n},e.calculateNormalizedScreenSpaceMatrix=function(t,e,r){var n=t.identity();n.translate(e.x/r.width,e.y/r.height);var i=r.width/e.width,o=r.height/e.height;return n.scale(i,o),n},e.calculateSpriteMatrix=function(t,e,r,i){var o=i._texture.orig,a=t.set(r.width,0,0,r.height,e.x,e.y),s=i.worldTransform.copy(n.Matrix.TEMP_MATRIX);return s.invert(),a.prepend(s),a.scale(1/o.width,1/o.height),a.translate(i.anchor.x,i.anchor.y),a};var n=r(6)},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(7),o=r(2),a=r(23),s=(n=a)&&n.__esModule?n:{default:n},u=r(4);var l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.gl=e.gl,this._managedTextures=[]}return t.prototype.bindTexture=function(){},t.prototype.getTexture=function(){},t.prototype.updateTexture=function(t,e){var r=this.gl,n=!!t._glRenderTargets;if(!t.hasLoaded)return null;var a=this.renderer.boundTextures;if(void 0===e){e=0;for(var u=0;u<a.length;++u)if(a[u]===t){e=u;break}}a[e]=t,r.activeTexture(r.TEXTURE0+e);var l=t._glTextures[this.renderer.CONTEXT_UID];if(l)n?t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width,t.height):l.upload(t.source);else{if(n){var c=new s.default(this.gl,t.width,t.height,t.scaleMode,t.resolution);c.resize(t.width,t.height),t._glRenderTargets[this.renderer.CONTEXT_UID]=c,l=c.texture,this.renderer._activeRenderTarget.root||this.renderer._activeRenderTarget.frameBuffer.bind()}else(l=new i.GLTexture(this.gl,null,null,null,null)).bind(e),l.premultiplyAlpha=!0,l.upload(t.source);t._glTextures[this.renderer.CONTEXT_UID]=l,t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this),this._managedTextures.push(t),t.isPowerOfTwo?(t.mipmap&&l.enableMipmap(),t.wrapMode===o.WRAP_MODES.CLAMP?l.enableWrapClamp():t.wrapMode===o.WRAP_MODES.REPEAT?l.enableWrapRepeat():l.enableWrapMirrorRepeat()):l.enableWrapClamp(),t.scaleMode===o.SCALE_MODES.NEAREST?l.enableNearestScaling():l.enableLinearScaling()}return l},t.prototype.destroyTexture=function(t,e){if((t=t.baseTexture||t).hasLoaded){var r=this.renderer,n=r.CONTEXT_UID,i=t._glTextures,o=t._glRenderTargets;if(i[n]&&(r.unbindTexture(t),i[n].destroy(),t.off("update",this.updateTexture,this),t.off("dispose",this.destroyTexture,this),delete i[n],!e)){var a=this._managedTextures.indexOf(t);-1!==a&&(0,u.removeItems)(this._managedTextures,a,1)}o&&o[n]&&(r._activeRenderTarget===o[n]&&r.bindRenderTarget(r.rootRenderTarget),o[n].destroy(),delete o[n])}},t.prototype.removeAll=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];e._glTextures[this.renderer.CONTEXT_UID]&&delete e._glTextures[this.renderer.CONTEXT_UID]}},t.prototype.destroy=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];this.destroyTexture(e,!0),e.off("update",this.updateTexture,this),e.off("dispose",this.destroyTexture,this)}this._managedTextures=null},t}();e.default=l},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(2),o=r(5),a=(n=o)&&n.__esModule?n:{default:n};var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=a.default.GC_MAX_IDLE,this.checkCountMax=a.default.GC_MAX_CHECK_COUNT,this.mode=a.default.GC_MODE}return t.prototype.update=function(){this.count++,this.mode!==i.GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run()))},t.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,r=!1,n=0;n<e.length;n++){var i=e[n];!i._glRenderTargets&&this.count-i.touched>this.maxIdle&&(t.destroyTexture(i,!0),e[n]=null,r=!0)}if(r){for(var o=0,a=0;a<e.length;a++)null!==e[a]&&(e[o++]=e[a]);e.length=o}},t.prototype.unload=function(t){var e=this.renderer.textureManager;t._texture&&t._texture._glRenderTargets&&e.destroyTexture(t._texture,!0);for(var r=t.children.length-1;r>=0;r--)this.unload(t.children[r])},t}();e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(136),o=(n=i)&&n.__esModule?n:{default:n};var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=e,this.maxAttribs=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=(0,o.default)(e),this.nativeVaoExtension=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object")}return t.prototype.push=function(){var t=this.stack[this.stackIndex];t||(t=this.stack[this.stackIndex]=new Uint8Array(16)),++this.stackIndex;for(var e=0;e<this.activeState.length;e++)t[e]=this.activeState[e]},t.prototype.pop=function(){var t=this.stack[--this.stackIndex];this.setState(t)},t.prototype.setState=function(t){this.setBlend(t[0]),this.setDepthTest(t[1]),this.setFrontFace(t[2]),this.setCullFace(t[3]),this.setBlendMode(t[4])},t.prototype.setBlend=function(t){t=t?1:0,this.activeState[0]!==t&&(this.activeState[0]=t,this.gl[t?"enable":"disable"](this.gl.BLEND))},t.prototype.setBlendMode=function(t){if(t!==this.activeState[4]){this.activeState[4]=t;var e=this.blendModes[t];2===e.length?this.gl.blendFunc(e[0],e[1]):this.gl.blendFuncSeparate(e[0],e[1],e[2],e[3])}},t.prototype.setDepthTest=function(t){t=t?1:0,this.activeState[1]!==t&&(this.activeState[1]=t,this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST))},t.prototype.setCullFace=function(t){t=t?1:0,this.activeState[3]!==t&&(this.activeState[3]=t,this.gl[t?"enable":"disable"](this.gl.CULL_FACE))},t.prototype.setFrontFace=function(t){t=t?1:0,this.activeState[2]!==t&&(this.activeState[2]=t,this.gl.frontFace(this.gl[t?"CW":"CCW"]))},t.prototype.resetAttributes=function(){for(var t=0;t<this.attribState.tempAttribState.length;t++)this.attribState.tempAttribState[t]=0;for(var e=0;e<this.attribState.attribState.length;e++)this.attribState.attribState[e]=0;for(var r=1;r<this.maxAttribs;r++)this.gl.disableVertexAttribArray(r)},t.prototype.resetToDefault=function(){this.nativeVaoExtension&&this.nativeVaoExtension.bindVertexArrayOES(null),this.resetAttributes();for(var t=0;t<this.activeState.length;++t)this.activeState[t]=32;this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.setState(this.defaultState)},t}();e.default=a},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e[n.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.ADD]=[t.ONE,t.ONE],e[n.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[n.BLEND_MODES.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e};var n=r(2)},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e[n.DRAW_MODES.POINTS]=t.POINTS,e[n.DRAW_MODES.LINES]=t.LINES,e[n.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,e[n.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,e[n.DRAW_MODES.TRIANGLES]=t.TRIANGLES,e[n.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,e[n.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN,e};var n=r(2)},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){var r=a;r=(r=r.replace(/%count%/gi,e)).replace(/%forloop%/gi,function(t){var e="";e+="\n",e+="\n";for(var r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(vTextureId < "+r+".5)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+r+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"}(e));for(var n=new o.default(t,"precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor;\n}\n",r),i=[],s=0;s<e;s++)i[s]=s;return n.bind(),n.uniforms.uSamplers=i,n};var n,i=r(16),o=(n=i)&&n.__esModule?n:{default:n};r(9);var a=["varying vec2 vTextureCoord;","varying vec4 vColor;","varying float vTextureId;","uniform sampler2D uSamplers[%count%];","void main(void){","vec4 color;","%forloop%","gl_FragColor = color * vColor;","}"].join("\n")},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){var r=!e;if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");if(r){var n=document.createElement("canvas");n.width=1,n.height=1,e=o.default.createContext(n)}var i=e.createShader(e.FRAGMENT_SHADER);for(;;){var u=a.replace(/%forloop%/gi,s(t));if(e.shaderSource(i,u),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS))break;t=t/2|0}r&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext();return t};var n,i=r(7),o=(n=i)&&n.__esModule?n:{default:n};var a=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function s(t){for(var e="",r=0;r<t;++r)r>0&&(e+="\nelse "),r<t-1&&(e+="if(test == "+r+".0){}");return e}},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.vertices=new ArrayBuffer(e),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)}return t.prototype.destroy=function(){this.vertices=null,this.positions=null,this.uvs=null,this.colors=null},t}();e.default=n},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=d(r(33)),o=d(r(10)),a=r(6),s=r(4),u=r(2),l=d(r(5)),c=d(r(67)),h=d(r(68)),f=d(r(143));function d(t){return t&&t.__esModule?t:{default:t}}var p={texture:!0,children:!1,baseTexture:!0},v=function(t){function e(r,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=i||document.createElement("canvas")).width=3,i.height=3;var s=o.default.fromCanvas(i,l.default.SCALE_MODE,"text");s.orig=new a.Rectangle,s.trim=new a.Rectangle;var u=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,s));return o.default.addToCache(u._texture,u._texture.baseTexture.textureCacheIds[0]),u.canvas=i,u.context=u.canvas.getContext("2d"),u.resolution=l.default.RESOLUTION,u._text=null,u._style=null,u._styleListener=null,u._font="",u.text=r,u.style=n,u.localStyleID=-1,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){this._font=this._style.toFontString();var r=this.context,n=h.default.measureText(this._text,this._style,this._style.wordWrap,this.canvas),i=n.width,o=n.height,a=n.lines,s=n.lineHeight,u=n.lineWidths,l=n.maxLineWidth,c=n.fontProperties;this.canvas.width=Math.ceil((Math.max(1,i)+2*e.padding)*this.resolution),this.canvas.height=Math.ceil((Math.max(1,o)+2*e.padding)*this.resolution),r.scale(this.resolution,this.resolution),r.clearRect(0,0,this.canvas.width,this.canvas.height),r.font=this._font,r.strokeStyle=e.stroke,r.lineWidth=e.strokeThickness,r.textBaseline=e.textBaseline,r.lineJoin=e.lineJoin,r.miterLimit=e.miterLimit;var f=void 0,d=void 0;if(e.dropShadow){r.fillStyle=e.dropShadowColor,r.globalAlpha=e.dropShadowAlpha,r.shadowBlur=e.dropShadowBlur,e.dropShadowBlur>0&&(r.shadowColor=e.dropShadowColor);for(var p=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,v=Math.sin(e.dropShadowAngle)*e.dropShadowDistance,_=0;_<a.length;_++)f=e.strokeThickness/2,d=e.strokeThickness/2+_*s+c.ascent,"right"===e.align?f+=l-u[_]:"center"===e.align&&(f+=(l-u[_])/2),e.fill&&(this.drawLetterSpacing(a[_],f+p+e.padding,d+v+e.padding),e.stroke&&e.strokeThickness&&(r.strokeStyle=e.dropShadowColor,this.drawLetterSpacing(a[_],f+p+e.padding,d+v+e.padding,!0),r.strokeStyle=e.stroke))}r.shadowBlur=0,r.globalAlpha=1,r.fillStyle=this._generateFillStyle(e,a);for(var g=0;g<a.length;g++)f=e.strokeThickness/2,d=e.strokeThickness/2+g*s+c.ascent,"right"===e.align?f+=l-u[g]:"center"===e.align&&(f+=(l-u[g])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(a[g],f+e.padding,d+e.padding,!0),e.fill&&this.drawLetterSpacing(a[g],f+e.padding,d+e.padding);this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this._style,o=i.letterSpacing;if(0!==o)for(var a=String.prototype.split.call(t,""),s=e,u=0,l="",c=this.context.measureText(t).width,h=0;u<t.length;)l=a[u++],n?this.context.strokeText(l,s,r):this.context.fillText(l,s,r),s+=c-(h=this.context.measureText(t.substring(u)).width)+o,c=h;else n?this.context.strokeText(t,e,r):this.context.fillText(t,e,r)},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=(0,f.default)(t);e.data&&(t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0))}var r=this._texture,n=this._style,i=n.trim?0:n.padding,o=r.baseTexture;o.hasLoaded=!0,o.resolution=this.resolution,o.realWidth=t.width,o.realHeight=t.height,o.width=t.width/this.resolution,o.height=t.height/this.resolution,r.trim.width=r._frame.width=t.width/this.resolution,r.trim.height=r._frame.height=t.height/this.resolution,r.trim.x=-i,r.trim.y=-i,r.orig.width=r._frame.width-2*i,r.orig.height=r._frame.height-2*i,this._onTextureUpdate(),o.emit("update",o),this.dirty=!1},e.prototype.renderWebGL=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype.renderWebGL.call(this,e)},e.prototype._renderCanvas=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._renderCanvas.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._onStyleChange=function(){this.dirty=!0},e.prototype._generateFillStyle=function(t,e){if(!Array.isArray(t.fill))return t.fill;if(navigator.isCocoonJS)return t.fill[0];var r=void 0,n=void 0,i=void 0,o=void 0,a=this.canvas.width/this.resolution,s=this.canvas.height/this.resolution,l=t.fill.slice(),c=t.fillGradientStops.slice();if(!c.length)for(var h=l.length+1,f=1;f<h;++f)c.push(f/h);if(l.unshift(t.fill[0]),c.unshift(0),l.push(t.fill[t.fill.length-1]),c.push(1),t.fillGradientType===u.TEXT_GRADIENT.LINEAR_VERTICAL){r=this.context.createLinearGradient(a/2,0,a/2,s),n=(l.length+1)*e.length,i=0;for(var d=0;d<e.length;d++){i+=1;for(var p=0;p<l.length;p++)o="number"==typeof c[p]?c[p]/e.length+d/e.length:i/n,r.addColorStop(o,l[p]),i++}}else{r=this.context.createLinearGradient(0,s/2,a,s/2),n=l.length+1,i=1;for(var v=0;v<l.length;v++)o="number"==typeof c[v]?c[v]:i/n,r.addColorStop(o,l[v]),i++}return r},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},p,e),t.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},n(e,[{key:"width",get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){this.updateText(!0);var e=(0,s.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=(0,s.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"style",get:function(){return this._style},set:function(t){(t=t||{})instanceof c.default?this._style=t:this._style=new c.default(t),this.localStyleID=-1,this.dirty=!0}},{key:"text",get:function(){return this._text},set:function(t){t=String(""===t||null==t?" ":t),this._text!==t&&(this._text=t,this.dirty=!0)}}]),e}(i.default);e.default=v},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=t.width,r=t.height,n=t.getContext("2d"),i=n.getImageData(0,0,e,r).data,o=i.length,a={top:null,left:null,right:null,bottom:null},s=null,u=void 0,l=void 0,c=void 0;for(u=0;u<o;u+=4)0!==i[u+3]&&(l=u/4%e,c=~~(u/4/e),null===a.top&&(a.top=c),(null===a.left||l<a.left)&&(a.left=l),(null===a.right||a.right<l)&&(a.right=l+1),(null===a.bottom||a.bottom<c)&&(a.bottom=c));null!==a.top&&(e=a.right-a.left,r=a.bottom-a.top+1,s=n.getImageData(a.left,a.top,e,r));return{height:r,width:e,data:s}}},function(t,e,r){"use strict";e.__esModule=!0;var n=p(r(13)),i=p(r(36)),o=p(r(10)),a=p(r(69)),s=p(r(33)),u=r(6),l=r(4),c=r(2),h=p(r(29)),f=p(r(145)),d=p(r(14));function p(t){return t&&t.__esModule?t:{default:t}}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var g=void 0,y=new u.Matrix,m=new u.Point,x=new Float32Array(4),E=new Float32Array(4),b=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];v(this,e);var n=_(this,t.call(this));return n.fillAlpha=1,n.lineWidth=0,n.nativeLines=r,n.lineColor=0,n.lineAlignment=.5,n.graphicsData=[],n.tint=16777215,n._prevTint=16777215,n.blendMode=c.BLEND_MODES.NORMAL,n.currentPath=null,n._webGL={},n.isMask=!1,n.boundsPadding=0,n._localBounds=new h.default,n.dirty=0,n.fastRectDirty=-1,n.clearDirty=0,n.boundsDirty=-1,n.cachedSpriteDirty=!1,n._spriteRect=null,n._fastRect=!1,n._prevRectTint=null,n._prevRectFillColor=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.clone=function(){var t=new e;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.lineAlignment=this.lineAlignment,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var r=0;r<this.graphicsData.length;++r)t.graphicsData.push(this.graphicsData[r].clone());return t.currentPath=t.graphicsData[t.graphicsData.length-1],t.updateLocalBounds(),t},e.prototype._quadraticCurveLength=function(t,e,r,n,i,o){var a=t-2*r+i,s=e-2*n+o,u=2*r-2*t,l=2*n-2*e,c=4*(a*a+s*s),h=4*(a*u+s*l),f=u*u+l*l,d=2*Math.sqrt(c+h+f),p=Math.sqrt(c),v=2*c*p,_=2*Math.sqrt(f),g=h/p;return(v*d+p*h*(d-_)+(4*f*c-h*h)*Math.log((2*p+g+d)/(g+_)))/(4*v)},e.prototype._bezierCurveLength=function(t,e,r,n,i,o,a,s){for(var u=0,l=0,c=0,h=0,f=0,d=0,p=0,v=0,_=0,g=0,y=0,m=t,x=e,E=1;E<=10;++E)g=m-(v=(p=(d=(f=1-(l=E/10))*f)*f)*t+3*d*l*r+3*f*(c=l*l)*i+(h=c*l)*a),y=x-(_=p*e+3*d*l*n+3*f*c*o+h*s),m=v,x=_,u+=Math.sqrt(g*g+y*y);return u},e.prototype._segmentsCount=function(t){var r=Math.ceil(t/e.CURVES.maxLength);return r<e.CURVES.minSegments?r=e.CURVES.minSegments:r>e.CURVES.maxSegments&&(r=e.CURVES.maxSegments),r},e.prototype.lineStyle=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;if(this.lineWidth=t,this.lineColor=e,this.lineAlpha=r,this.lineAlignment=n,this.currentPath)if(this.currentPath.shape.points.length){var i=new u.Polygon(this.currentPath.shape.points.slice(-2));i.closed=!1,this.drawShape(i)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha,this.currentPath.lineAlignment=this.lineAlignment;return this},e.prototype.moveTo=function(t,e){var r=new u.Polygon([t,e]);return r.closed=!1,this.drawShape(r),this},e.prototype.lineTo=function(t,e){var r=this.currentPath.shape.points,n=r[r.length-2],i=r[r.length-1];return n===t&&i===e||(r.push(t,e),this.dirty++),this},e.prototype.quadraticCurveTo=function(t,r,n,i){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var o=this.currentPath.shape.points,a=0,s=0;0===o.length&&this.moveTo(0,0);for(var u=o[o.length-2],l=o[o.length-1],c=e.CURVES.adaptive?this._segmentsCount(this._quadraticCurveLength(u,l,t,r,n,i)):20,h=1;h<=c;++h){var f=h/c;a=u+(t-u)*f,s=l+(r-l)*f,o.push(a+(t+(n-t)*f-a)*f,s+(r+(i-r)*f-s)*f)}return this.dirty++,this},e.prototype.bezierCurveTo=function(t,r,n,i,o,a){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var s=this.currentPath.shape.points,u=s[s.length-2],l=s[s.length-1];s.length-=2;var c=e.CURVES.adaptive?this._segmentsCount(this._bezierCurveLength(u,l,t,r,n,i,o,a)):20;return(0,f.default)(u,l,t,r,n,i,o,a,c,s),this.dirty++,this},e.prototype.arcTo=function(t,e,r,n,i){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var o=this.currentPath.shape.points,a=o[o.length-2],s=o[o.length-1]-e,u=a-t,l=n-e,c=r-t,h=Math.abs(s*c-u*l);if(h<1e-8||0===i)o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e);else{var f=s*s+u*u,d=l*l+c*c,p=s*l+u*c,v=i*Math.sqrt(f)/h,_=i*Math.sqrt(d)/h,g=v*p/f,y=_*p/d,m=v*c+_*u,x=v*l+_*s,E=u*(_+g),b=s*(_+g),T=c*(v+y),R=l*(v+y),O=Math.atan2(b-x,E-m),S=Math.atan2(R-x,T-m);this.arc(m+t,x+e,i,O,S,u*l>c*s)}return this.dirty++,this},e.prototype.arc=function(t,r,n,i,o){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(i===o)return this;!a&&o<=i?o+=c.PI_2:a&&i<=o&&(i+=c.PI_2);var s=o-i,u=e.CURVES.adaptive?this._segmentsCount(Math.abs(s)*n):40*Math.ceil(Math.abs(s)/c.PI_2);if(0===s)return this;var l=t+Math.cos(i)*n,h=r+Math.sin(i)*n,f=this.currentPath?this.currentPath.shape.points:null;if(f){var d=Math.abs(f[f.length-2]-l),p=Math.abs(f[f.length-1]-h);d<.001&&p<.001||f.push(l,h)}else this.moveTo(l,h),f=this.currentPath.shape.points;for(var v=s/(2*u),_=2*v,g=Math.cos(v),y=Math.sin(v),m=u-1,x=m%1/m,E=0;E<=m;++E){var b=E+x*E,T=v+i+_*b,R=Math.cos(T),O=-Math.sin(T);f.push((g*R+y*O)*n+t,(g*-O+y*R)*n+r)}return this.dirty++,this},e.prototype.beginFill=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.filling=!0,this.fillColor=t,this.fillAlpha=e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},e.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},e.prototype.drawRect=function(t,e,r,n){return this.drawShape(new u.Rectangle(t,e,r,n)),this},e.prototype.drawRoundedRect=function(t,e,r,n,i){return this.drawShape(new u.RoundedRectangle(t,e,r,n,i)),this},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new u.Circle(t,e,r)),this},e.prototype.drawEllipse=function(t,e,r,n){return this.drawShape(new u.Ellipse(t,e,r,n)),this},e.prototype.drawPolygon=function(t){var e=t,r=!0;if(e instanceof u.Polygon&&(r=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var n=0;n<e.length;++n)e[n]=arguments[n]}var i=new u.Polygon(e);return i.closed=r,this.drawShape(i),this},e.prototype.drawStar=function(t,e,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;i=i||n/2;for(var a=-1*Math.PI/2+o,s=2*r,u=c.PI_2/s,l=[],h=0;h<s;h++){var f=h%2?i:n,d=h*u+a;l.push(t+f*Math.cos(d),e+f*Math.sin(d))}return this.drawPolygon(l)},e.prototype.clear=function(){return(this.lineWidth||this.filling||this.graphicsData.length>0)&&(this.lineWidth=0,this.lineAlignment=.5,this.filling=!1,this.boundsDirty=-1,this.canvasTintDirty=-1,this.dirty++,this.clearDirty++,this.graphicsData.length=0),this.currentPath=null,this._spriteRect=null,this},e.prototype.isFastRect=function(){return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===c.SHAPES.RECT&&!this.graphicsData[0].lineWidth},e.prototype._renderWebGL=function(t){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect()),this._fastRect?this._renderSpriteRect(t):(t.setObjectRenderer(t.plugins.graphics),t.plugins.graphics.render(this))},e.prototype._renderSpriteRect=function(t){var e=this.graphicsData[0].shape;this._spriteRect||(this._spriteRect=new s.default(new o.default(o.default.WHITE)));var r=this._spriteRect,n=this.graphicsData[0].fillColor;if(16777215===this.tint)r.tint=n;else if(this.tint!==this._prevRectTint||n!==this._prevRectFillColor){var i=x,a=E;(0,l.hex2rgb)(n,i),(0,l.hex2rgb)(this.tint,a),i[0]*=a[0],i[1]*=a[1],i[2]*=a[2],r.tint=(0,l.rgb2hex)(i),this._prevRectTint=this.tint,this._prevRectFillColor=n}r.alpha=this.graphicsData[0].fillAlpha,r.worldAlpha=this.worldAlpha*r.alpha,r.blendMode=this.blendMode,r._texture._frame.width=e.width,r._texture._frame.height=e.height,r.transform.worldTransform=this.transform.worldTransform,r.anchor.set(-e.x/e.width,-e.y/e.height),r._onAnchorUpdate(),r._renderWebGL(t)},e.prototype._renderCanvas=function(t){!0!==this.isMask&&t.plugins.graphics.render(this)},e.prototype._calculateBounds=function(){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.cachedSpriteDirty=!0);var t=this._localBounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,m);for(var e=this.graphicsData,r=0;r<e.length;++r){var n=e[r];if(n.fill&&(n.shape&&n.shape.contains(m.x,m.y))){var i=!1;if(n.holes)for(var o=0;o<n.holes.length;o++){if(n.holes[o].contains(m.x,m.y)){i=!0;break}}if(!i)return!0}}return!1},e.prototype.updateLocalBounds=function(){var t=1/0,e=-1/0,r=1/0,n=-1/0;if(this.graphicsData.length)for(var i=0,o=0,a=0,s=0,u=0,l=0;l<this.graphicsData.length;l++){var h=this.graphicsData[l],f=h.type,d=h.lineWidth*h.lineAlignment;if(i=h.shape,f===c.SHAPES.RECT||f===c.SHAPES.RREC)o=i.x-d,a=i.y-d,t=o<t?o:t,e=o+(s=i.width+2*d)>e?o+s:e,r=a<r?a:r,n=a+(u=i.height+2*d)>n?a+u:n;else if(f===c.SHAPES.CIRC)o=i.x,a=i.y,t=o-(s=i.radius+d)<t?o-s:t,e=o+s>e?o+s:e,r=a-(u=i.radius+d)<r?a-u:r,n=a+u>n?a+u:n;else if(f===c.SHAPES.ELIP)o=i.x,a=i.y,t=o-(s=i.width+d)<t?o-s:t,e=o+s>e?o+s:e,r=a-(u=i.height+d)<r?a-u:r,n=a+u>n?a+u:n;else for(var p=i.points,v=0,_=0,g=0,y=0,m=0,x=0,E=0,b=0,T=0;T+2<p.length;T+=2)o=p[T],a=p[T+1],v=p[T+2],_=p[T+3],g=Math.abs(v-o),y=Math.abs(_-a),u=2*d,(s=Math.sqrt(g*g+y*y))<1e-9||(t=(E=(v+o)/2)-(m=(u/s*y+g)/2)<t?E-m:t,e=E+m>e?E+m:e,r=(b=(_+a)/2)-(x=(u/s*g+y)/2)<r?b-x:r,n=b+x>n?b+x:n)}else t=0,e=0,r=0,n=0;var R=this.boundsPadding;this._localBounds.minX=t-R,this._localBounds.maxX=e+R,this._localBounds.minY=r-R,this._localBounds.maxY=n+R},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new a.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,this.nativeLines,t,this.lineAlignment);return this.graphicsData.push(e),e.type===c.SHAPES.POLY&&(e.shape.closed=e.shape.closed,this.currentPath=e),this.dirty++,e},e.prototype.generateCanvasTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.getLocalBounds(),n=i.default.create(r.width,r.height,t,e);g||(g=new d.default),this.transform.updateLocalTransform(),this.transform.localTransform.copy(y),y.invert(),y.tx-=r.x,y.ty-=r.y,g.render(this,n,!0,y);var a=o.default.fromCanvas(n.baseTexture._canvasRenderTarget.canvas,t,"graphics");return a.baseTexture.resolution=e,a.baseTexture.update(),a},e.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},e.prototype.addHole=function(){var t=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape),this.currentPath=null,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var r=0;r<this.graphicsData.length;++r)this.graphicsData[r].destroy();for(var n in this._webGL)for(var i=0;i<this._webGL[n].data.length;++i)this._webGL[n].data[i].destroy();this._spriteRect&&this._spriteRect.destroy(),this.graphicsData=null,this.currentPath=null,this._webGL=null,this._localBounds=null},e}(n.default);e.default=b,b._SPRITE_TEXTURE=null,b.CURVES={adaptive:!1,maxLength:10,minSegments:8,maxSegments:2048}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r,n,i,o,a,s,u){var l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[],c=0,h=0,f=0,d=0,p=0;l.push(t,e);for(var v=1,_=0;v<=u;++v)f=(h=(c=1-(_=v/u))*c)*c,p=(d=_*_)*_,l.push(f*t+3*h*_*r+3*c*d*i+p*a,f*e+3*h*_*n+3*c*d*o+p*s);return l}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(4),i=r(2),o=d(r(21)),a=d(r(22)),s=d(r(147)),u=d(r(148)),l=d(r(149)),c=d(r(150)),h=d(r(151)),f=d(r(152));function d(t){return t&&t.__esModule?t:{default:t}}var p=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.graphicsDataPool=[],n.primitiveShader=null,n.gl=r.gl,n.CONTEXT_UID=0,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new u.default(this.gl)},e.prototype.destroy=function(){o.default.prototype.destroy.call(this);for(var t=0;t<this.graphicsDataPool.length;++t)this.graphicsDataPool[t].destroy();this.graphicsDataPool=null},e.prototype.render=function(t){var e=this.renderer,r=e.gl,i=void 0,o=t._webGL[this.CONTEXT_UID];o&&t.dirty===o.dirty||(this.updateGraphics(t),o=t._webGL[this.CONTEXT_UID]);var a=this.primitiveShader;e.bindShader(a),e.state.setBlendMode(t.blendMode);for(var s=0,u=o.data.length;s<u;s++){var l=(i=o.data[s]).shader;e.bindShader(l),l.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),l.uniforms.tint=(0,n.hex2rgb)(t.tint),l.uniforms.alpha=t.worldAlpha,e.bindVao(i.vao),i.nativeLines?r.drawArrays(r.LINES,0,i.points.length/6):i.vao.draw(r.TRIANGLE_STRIP,i.indices.length)}},e.prototype.updateGraphics=function(t){var e=this.renderer.gl,r=t._webGL[this.CONTEXT_UID];if(r||(r=t._webGL[this.CONTEXT_UID]={lastIndex:0,data:[],gl:e,clearDirty:-1,dirty:-1}),r.dirty=t.dirty,t.clearDirty!==r.clearDirty){r.clearDirty=t.clearDirty;for(var n=0;n<r.data.length;n++)this.graphicsDataPool.push(r.data[n]);r.data.length=0,r.lastIndex=0}for(var o=void 0,a=void 0,s=r.lastIndex;s<t.graphicsData.length;s++){var u=t.graphicsData[s];o=this.getWebGLData(r,0),u.nativeLines&&u.lineWidth&&(a=this.getWebGLData(r,0,!0),r.lastIndex++),u.type===i.SHAPES.POLY&&(0,l.default)(u,o,a),u.type===i.SHAPES.RECT?(0,c.default)(u,o,a):u.type===i.SHAPES.CIRC||u.type===i.SHAPES.ELIP?(0,f.default)(u,o,a):u.type===i.SHAPES.RREC&&(0,h.default)(u,o,a),r.lastIndex++}this.renderer.bindVao(null);for(var d=0;d<r.data.length;d++)(o=r.data[d]).dirty&&o.upload()},e.prototype.getWebGLData=function(t,e,r){var n=t.data[t.data.length-1];return(!n||n.nativeLines!==r||n.points.length>32e4)&&((n=this.graphicsDataPool.pop()||new s.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState)).nativeLines=r,n.reset(e),t.data.push(n)),n.dirty=!0,n},e}(o.default);e.default=p,a.default.registerPlugin("graphics",p)},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(7),o=(n=i)&&n.__esModule?n:{default:n};var a=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=o.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=o.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.nativeLines=!1,this.glPoints=null,this.glIndices=null,this.shader=r,this.vao=new o.default.VertexArrayObject(e,n).addIndex(this.indexBuffer).addAttribute(this.buffer,r.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,r.attributes.aColor,e.FLOAT,!1,24,8)}return t.prototype.reset=function(){this.points.length=0,this.indices.length=0},t.prototype.upload=function(){this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},t.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.vao.destroy(),this.buffer.destroy(),this.indexBuffer.destroy(),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null},t}();e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(16);var o=function(t){function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n")))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((n=i)&&n.__esModule?n:{default:n}).default);e.default=o},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){t.points=t.shape.points.slice();var a=t.points;if(t.fill&&a.length>=6){for(var s=[],u=t.holes,l=0;l<u.length;l++){var c=u[l];s.push(a.length/2),a=a.concat(c.points)}var h=e.points,f=e.indices,d=a.length/2,p=(0,i.hex2rgb)(t.fillColor),v=t.fillAlpha,_=p[0]*v,g=p[1]*v,y=p[2]*v,m=(0,o.default)(a,s,2);if(!m)return;for(var x=h.length/6,E=0;E<m.length;E+=3)f.push(m[E]+x),f.push(m[E]+x),f.push(m[E+1]+x),f.push(m[E+2]+x),f.push(m[E+2]+x);for(var b=0;b<d;b++)h.push(a[2*b],a[2*b+1],_,g,y,v)}t.lineWidth>0&&(0,n.default)(t,e,r)};var n=a(r(24)),i=r(4),o=a(r(32));function a(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){var n=t.shape,i=n.x,s=n.y,u=n.width,l=n.height;if(t.fill){var c=(0,a.hex2rgb)(t.fillColor),h=t.fillAlpha,f=c[0]*h,d=c[1]*h,p=c[2]*h,v=e.points,_=e.indices,g=v.length/6;v.push(i,s),v.push(f,d,p,h),v.push(i+u,s),v.push(f,d,p,h),v.push(i,s+l),v.push(f,d,p,h),v.push(i+u,s+l),v.push(f,d,p,h),_.push(g,g,g+1,g+2,g+3,g+3)}if(t.lineWidth){var y=t.points;t.points=[i,s,i+u,s,i+u,s+l,i,s+l,i,s],(0,o.default)(t,e,r),t.points=y}};var n,i=r(24),o=(n=i)&&n.__esModule?n:{default:n},a=r(4)},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){var a=t.shape,s=a.x,l=a.y,c=a.width,h=a.height,f=a.radius,d=[];if(d.push(s+f,l),u(s+c-f,l,s+c,l,s+c,l+f,d),u(s+c,l+h-f,s+c,l+h,s+c-f,l+h,d),u(s+f,l+h,s,l+h,s,l+h-f,d),u(s,l+f,s,l,s+f+1e-10,l,d),t.fill){for(var p=(0,o.hex2rgb)(t.fillColor),v=t.fillAlpha,_=p[0]*v,g=p[1]*v,y=p[2]*v,m=e.points,x=e.indices,E=m.length/6,b=(0,n.default)(d,null,2),T=0,R=b.length;T<R;T+=3)x.push(b[T]+E),x.push(b[T]+E),x.push(b[T+1]+E),x.push(b[T+2]+E),x.push(b[T+2]+E);for(var O=0,S=d.length;O<S;O++)m.push(d[O],d[++O],_,g,y,v)}if(t.lineWidth){var C=t.points;t.points=d,(0,i.default)(t,e,r),t.points=C}};var n=a(r(32)),i=a(r(24)),o=r(4);function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e,r){return t+(e-t)*r}function u(t,e,r,n,i,o){for(var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],u=20,l=a,c=0,h=0,f=0,d=0,p=0,v=0,_=0,g=0;_<=u;++_)c=s(t,r,g=_/u),h=s(e,n,g),f=s(r,i,g),d=s(n,o,g),p=s(c,f,g),v=s(h,d,g),l.push(p,v);return l}},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e,r){var n=t.shape,i=n.x,u=n.y,l=void 0,c=void 0;t.type===a.SHAPES.CIRC?(l=n.radius,c=n.radius):(l=n.width,c=n.height);if(0===l||0===c)return;var h=Math.floor(30*Math.sqrt(n.radius))||Math.floor(15*Math.sqrt(n.width+n.height)),f=2*Math.PI/h;if(t.fill){var d=(0,s.hex2rgb)(t.fillColor),p=t.fillAlpha,v=d[0]*p,_=d[1]*p,g=d[2]*p,y=e.points,m=e.indices,x=y.length/6;m.push(x);for(var E=0;E<h+1;E++)y.push(i,u,v,_,g,p),y.push(i+Math.sin(f*E)*l,u+Math.cos(f*E)*c,v,_,g,p),m.push(x++,x++);m.push(x-1)}if(t.lineWidth){var b=t.points;t.points=[];for(var T=0;T<h;T++)t.points.push(i+Math.sin(f*-T)*l,u+Math.cos(f*-T)*c);t.points.push(t.points[0],t.points[1]),(0,o.default)(t,e,r),t.points=b}};var n,i=r(24),o=(n=i)&&n.__esModule?n:{default:n},a=r(2),s=r(4)},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(14),o=(n=i)&&n.__esModule?n:{default:n},a=r(2);var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,r=e.context,n=t.worldAlpha,i=t.transform.worldTransform,o=e.resolution;r.setTransform(i.a*o,i.b*o,i.c*o,i.d*o,i.tx*o,i.ty*o),t.canvasTintDirty===t.dirty&&t._prevTint===t.tint||this.updateGraphicsTint(t),e.setBlendMode(t.blendMode);for(var s=0;s<t.graphicsData.length;s++){var u=t.graphicsData[s],l=u.shape,c=u._fillTint,h=u._lineTint;if(r.lineWidth=u.lineWidth,u.type===a.SHAPES.POLY){r.beginPath();var f=l.points,d=u.holes,p=void 0,v=void 0,_=void 0,g=void 0;r.moveTo(f[0],f[1]);for(var y=2;y<f.length;y+=2)r.lineTo(f[y],f[y+1]);if(l.closed&&r.closePath(),d.length>0){p=0,_=f[0],g=f[1];for(var m=2;m+2<f.length;m+=2)p+=(f[m]-_)*(f[m+3]-g)-(f[m+2]-_)*(f[m+1]-g);for(var x=0;x<d.length;x++)if(f=d[x].points){v=0,_=f[0],g=f[1];for(var E=2;E+2<f.length;E+=2)v+=(f[E]-_)*(f[E+3]-g)-(f[E+2]-_)*(f[E+1]-g);if(v*p<0){r.moveTo(f[0],f[1]);for(var b=2;b<f.length;b+=2)r.lineTo(f[b],f[b+1])}else{r.moveTo(f[f.length-2],f[f.length-1]);for(var T=f.length-4;T>=0;T-=2)r.lineTo(f[T],f[T+1])}d[x].close&&r.closePath()}}u.fill&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.stroke())}else if(u.type===a.SHAPES.RECT)(u.fillColor||0===u.fillColor)&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fillRect(l.x,l.y,l.width,l.height)),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.strokeRect(l.x,l.y,l.width,l.height));else if(u.type===a.SHAPES.CIRC)r.beginPath(),r.arc(l.x,l.y,l.radius,0,2*Math.PI),r.closePath(),u.fill&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.stroke());else if(u.type===a.SHAPES.ELIP){var R=2*l.width,O=2*l.height,S=l.x-R/2,C=l.y-O/2;r.beginPath();var w=R/2*.5522848,A=O/2*.5522848,P=S+R,M=C+O,I=S+R/2,D=C+O/2;r.moveTo(S,D),r.bezierCurveTo(S,D-A,I-w,C,I,C),r.bezierCurveTo(I+w,C,P,D-A,P,D),r.bezierCurveTo(P,D+A,I+w,M,I,M),r.bezierCurveTo(I-w,M,S,D+A,S,D),r.closePath(),u.fill&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.stroke())}else if(u.type===a.SHAPES.RREC){var L=l.x,U=l.y,N=l.width,F=l.height,j=l.radius,k=Math.min(N,F)/2|0;j=j>k?k:j,r.beginPath(),r.moveTo(L,U+j),r.lineTo(L,U+F-j),r.quadraticCurveTo(L,U+F,L+j,U+F),r.lineTo(L+N-j,U+F),r.quadraticCurveTo(L+N,U+F,L+N,U+F-j),r.lineTo(L+N,U+j),r.quadraticCurveTo(L+N,U,L+N-j,U),r.lineTo(L+j,U),r.quadraticCurveTo(L,U,L,U+j),r.closePath(),(u.fillColor||0===u.fillColor)&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|h).toString(16)).substr(-6),r.stroke())}}},t.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint,t.canvasTintDirty=t.dirty;for(var e=(t.tint>>16&255)/255,r=(t.tint>>8&255)/255,n=(255&t.tint)/255,i=0;i<t.graphicsData.length;++i){var o=t.graphicsData[i],a=0|o.fillColor,s=0|o.lineColor;o._fillTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*r*255<<8)+(255&a)/255*n*255,o._lineTint=((s>>16&255)/255*e*255<<16)+((s>>8&255)/255*r*255<<8)+(255&s)/255*n*255}},t.prototype.renderPolygon=function(t,e,r){r.moveTo(t[0],t[1]);for(var n=1;n<t.length/2;++n)r.lineTo(t[2*n],t[2*n+1]);e&&r.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();e.default=s,o.default.registerPlugin("graphics",s)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(3),o=r(4);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var s=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;a(this,t),this.baseTexture=e,this.textures={},this.animations={},this.data=r,this.resolution=this._updateResolution(n||this.baseTexture.imageUrl),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return n(t,null,[{key:"BATCH_SIZE",get:function(){return 1e3}}]),t.prototype._updateResolution=function(t){var e=this.data.meta.scale,r=(0,o.getResolutionOfUrl)(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&(this.baseTexture.resolution=r,this.baseTexture.update()),r},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var r=e,n=t.BATCH_SIZE,o=this.baseTexture.sourceScale;r-e<n&&r<this._frameKeys.length;){var a=this._frameKeys[r],s=this._frames[a],u=s.frame;if(u){var l=null,c=null,h=!1!==s.trimmed&&s.sourceSize?s.sourceSize:s.frame,f=new i.Rectangle(0,0,Math.floor(h.w*o)/this.resolution,Math.floor(h.h*o)/this.resolution);l=s.rotated?new i.Rectangle(Math.floor(u.x*o)/this.resolution,Math.floor(u.y*o)/this.resolution,Math.floor(u.h*o)/this.resolution,Math.floor(u.w*o)/this.resolution):new i.Rectangle(Math.floor(u.x*o)/this.resolution,Math.floor(u.y*o)/this.resolution,Math.floor(u.w*o)/this.resolution,Math.floor(u.h*o)/this.resolution),!1!==s.trimmed&&s.spriteSourceSize&&(c=new i.Rectangle(Math.floor(s.spriteSourceSize.x*o)/this.resolution,Math.floor(s.spriteSourceSize.y*o)/this.resolution,Math.floor(u.w*o)/this.resolution,Math.floor(u.h*o)/this.resolution)),this.textures[a]=new i.Texture(this.baseTexture,l,f,c,s.rotated?2:0,s.anchor),i.Texture.addToCache(this.textures[a],a)}r++}},t.prototype._processAnimations=function(){var t=this.data.animations||{};for(var e in t){this.animations[e]=[];var r=t[e],n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var o;if(n){if(i>=r.length)break;o=r[i++]}else{if((i=r.next()).done)break;o=i.value}var a=o;this.animations[e].push(this.textures[a])}}},t.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},t.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout((function(){e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch():(e._processAnimations(),e._parseComplete())}),0)},t.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];for(var e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&this.baseTexture.destroy(),this.baseTexture=null},t}();e.default=s},function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t){var e=t.mesh,r=t.particles,n=t.extras,o=t.filters,a=t.prepare,s=t.loaders,u=t.interaction;Object.defineProperties(t,{SpriteBatch:{get:function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")}},AssetLoader:{get:function(){throw new ReferenceError("The loader system was overhauled in PixiJS v3, please see the new PIXI.loaders.Loader class.")}},Stage:{get:function(){return i("You do not need to use a PIXI Stage any more, you can simply render any container."),t.Container}},DisplayObjectContainer:{get:function(){return i("DisplayObjectContainer has been shortened to Container, please use Container from now on."),t.Container}},Strip:{get:function(){return i("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),e.Mesh}},Rope:{get:function(){return i("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),e.Rope}},ParticleContainer:{get:function(){return i("The ParticleContainer class has been moved to particles.ParticleContainer, please use particles.ParticleContainer from now on."),r.ParticleContainer}},MovieClip:{get:function(){return i("The MovieClip class has been moved to extras.AnimatedSprite, please use extras.AnimatedSprite."),n.AnimatedSprite}},TilingSprite:{get:function(){return i("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),n.TilingSprite}},BitmapText:{get:function(){return i("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),n.BitmapText}},blendModes:{get:function(){return i("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),t.BLEND_MODES}},scaleModes:{get:function(){return i("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),t.SCALE_MODES}},BaseTextureCache:{get:function(){return i("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),t.utils.BaseTextureCache}},TextureCache:{get:function(){return i("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),t.utils.TextureCache}},math:{get:function(){return i("The math namespace is deprecated, please access members already accessible on PIXI."),t}},AbstractFilter:{get:function(){return i("AstractFilter has been renamed to Filter, please use PIXI.Filter"),t.Filter}},TransformManual:{get:function(){return i("TransformManual has been renamed to TransformBase, please update your pixi-spine"),t.TransformBase}},TARGET_FPMS:{get:function(){return i("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),t.settings.TARGET_FPMS},set:function(e){i("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),t.settings.TARGET_FPMS=e}},FILTER_RESOLUTION:{get:function(){return i("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),t.settings.FILTER_RESOLUTION},set:function(e){i("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),t.settings.FILTER_RESOLUTION=e}},RESOLUTION:{get:function(){return i("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),t.settings.RESOLUTION},set:function(e){i("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),t.settings.RESOLUTION=e}},MIPMAP_TEXTURES:{get:function(){return i("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),t.settings.MIPMAP_TEXTURES},set:function(e){i("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),t.settings.MIPMAP_TEXTURES=e}},SPRITE_BATCH_SIZE:{get:function(){return i("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),t.settings.SPRITE_BATCH_SIZE},set:function(e){i("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),t.settings.SPRITE_BATCH_SIZE=e}},SPRITE_MAX_TEXTURES:{get:function(){return i("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),t.settings.SPRITE_MAX_TEXTURES},set:function(e){i("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),t.settings.SPRITE_MAX_TEXTURES=e}},RETINA_PREFIX:{get:function(){return i("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),t.settings.RETINA_PREFIX},set:function(e){i("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),t.settings.RETINA_PREFIX=e}},DEFAULT_RENDER_OPTIONS:{get:function(){return i("PIXI.DEFAULT_RENDER_OPTIONS has been deprecated, please use PIXI.settings.DEFAULT_RENDER_OPTIONS"),t.settings.RENDER_OPTIONS}}});for(var l=[{parent:"TRANSFORM_MODE",target:"TRANSFORM_MODE"},{parent:"GC_MODES",target:"GC_MODE"},{parent:"WRAP_MODES",target:"WRAP_MODE"},{parent:"SCALE_MODES",target:"SCALE_MODE"},{parent:"PRECISION",target:"PRECISION_FRAGMENT"}],c=function(e){var r=l[e];Object.defineProperty(t[r.parent],"DEFAULT",{get:function(){return i("PIXI."+r.parent+".DEFAULT has been deprecated, please use PIXI.settings."+r.target),t.settings[r.target]},set:function(e){i("PIXI."+r.parent+".DEFAULT has been deprecated, please use PIXI.settings."+r.target),t.settings[r.target]=e}})},h=0;h<l.length;h++)c(h);Object.defineProperties(t.settings,{PRECISION:{get:function(){return i("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),t.settings.PRECISION_FRAGMENT},set:function(e){i("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),t.settings.PRECISION_FRAGMENT=e}}}),n.AnimatedSprite&&Object.defineProperties(n,{MovieClip:{get:function(){return i("The MovieClip class has been renamed to AnimatedSprite, please use AnimatedSprite from now on."),n.AnimatedSprite}}});n&&Object.defineProperties(n,{TextureTransform:{get:function(){return i("The TextureTransform class has been renamed to TextureMatrix, please use PIXI.TextureMatrix from now on."),t.TextureMatrix}}});t.DisplayObject.prototype.generateTexture=function(t,e,r){return i("generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)"),t.generateTexture(this,e,r)},t.Graphics.prototype.generateTexture=function(t,e){return i("graphics generate texture has moved to the renderer. Or to render a graphics to a texture using canvas please use generateCanvasTexture"),this.generateCanvasTexture(t,e)},t.GroupD8.isSwapWidthHeight=function(e){return i("GroupD8.isSwapWidthHeight was renamed to GroupD8.isVertical"),t.GroupD8.isVertical(e)},t.RenderTexture.prototype.render=function(t,e,r,n){this.legacyRenderer.render(t,this,r,e,!n),i("RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)")},t.RenderTexture.prototype.getImage=function(t){return i("RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)"),this.legacyRenderer.extract.image(t)},t.RenderTexture.prototype.getBase64=function(t){return i("RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)"),this.legacyRenderer.extract.base64(t)},t.RenderTexture.prototype.getCanvas=function(t){return i("RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)"),this.legacyRenderer.extract.canvas(t)},t.RenderTexture.prototype.getPixels=function(t){return i("RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)"),this.legacyRenderer.pixels(t)},t.Sprite.prototype.setTexture=function(t){this.texture=t,i("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},n.BitmapText&&(n.BitmapText.prototype.setText=function(t){this.text=t,i("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")});t.Text.prototype.setText=function(t){this.text=t,i("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},t.Text.calculateFontProperties=function(e){return i("Text.calculateFontProperties is now deprecated, please use the TextMetrics.measureFont"),t.TextMetrics.measureFont(e)},Object.defineProperties(t.Text,{fontPropertiesCache:{get:function(){return i("Text.fontPropertiesCache is deprecated"),t.TextMetrics._fonts}},fontPropertiesCanvas:{get:function(){return i("Text.fontPropertiesCanvas is deprecated"),t.TextMetrics._canvas}},fontPropertiesContext:{get:function(){return i("Text.fontPropertiesContext is deprecated"),t.TextMetrics._context}}}),t.Text.prototype.setStyle=function(t){this.style=t,i("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},t.Text.prototype.determineFontProperties=function(e){return i("determineFontProperties is now deprecated, please use TextMetrics.measureFont method"),t.TextMetrics.measureFont(e)},t.Text.getFontStyle=function(e){return i("getFontStyle is now deprecated, please use TextStyle.toFontString() instead"),(e=e||{})instanceof t.TextStyle||(e=new t.TextStyle(e)),e.toFontString()},Object.defineProperties(t.TextStyle.prototype,{font:{get:function(){i("text style property 'font' is now deprecated, please use the 'fontFamily', 'fontSize', 'fontStyle', 'fontVariant' and 'fontWeight' properties from now on");var t="number"==typeof this._fontSize?this._fontSize+"px":this._fontSize;return this._fontStyle+" "+this._fontVariant+" "+this._fontWeight+" "+t+" "+this._fontFamily},set:function(t){i("text style property 'font' is now deprecated, please use the 'fontFamily','fontSize',fontStyle','fontVariant' and 'fontWeight' properties from now on"),t.indexOf("italic")>1?this._fontStyle="italic":t.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal",t.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";var e=t.split(" "),r=-1;this._fontSize=26;for(var n=0;n<e.length;++n)if(e[n].match(/(px|pt|em|%)/)){r=n,this._fontSize=e[n];break}this._fontWeight="normal";for(var o=0;o<r;++o)if(e[o].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)){this._fontWeight=e[o];break}if(r>-1&&r<e.length-1){this._fontFamily="";for(var a=r+1;a<e.length;++a)this._fontFamily+=e[a]+" ";this._fontFamily=this._fontFamily.slice(0,-1)}else this._fontFamily="Arial";this.styleID++}}}),t.Texture.prototype.setFrame=function(t){this.frame=t,i("setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;")},t.Texture.addTextureToCache=function(e,r){t.Texture.addToCache(e,r),i("Texture.addTextureToCache is deprecated, please use Texture.addToCache from now on.")},t.Texture.removeTextureFromCache=function(e){return i("Texture.removeTextureFromCache is deprecated, please use Texture.removeFromCache from now on. Be aware that Texture.removeFromCache does not automatically its BaseTexture from the BaseTextureCache. For that, use BaseTexture.removeFromCache"),t.BaseTexture.removeFromCache(e),t.Texture.removeFromCache(e)},Object.defineProperties(o,{AbstractFilter:{get:function(){return i("AstractFilter has been renamed to Filter, please use PIXI.Filter"),t.AbstractFilter}},SpriteMaskFilter:{get:function(){return i("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),t.SpriteMaskFilter}},VoidFilter:{get:function(){return i("VoidFilter has been renamed to AlphaFilter, please use PIXI.filters.AlphaFilter"),o.AlphaFilter}}}),t.utils.uuid=function(){return i("utils.uuid() is deprecated, please use utils.uid() from now on."),t.utils.uid()},t.utils.canUseNewCanvasBlendModes=function(){return i("utils.canUseNewCanvasBlendModes() is deprecated, please use CanvasTinter.canUseMultiply from now on"),t.CanvasTinter.canUseMultiply};var f=!0;Object.defineProperty(t.utils,"_saidHello",{set:function(t){t&&(i("PIXI.utils._saidHello is deprecated, please use PIXI.utils.skipHello()"),this.skipHello()),f=t},get:function(){return f}}),a.BasePrepare&&(a.BasePrepare.prototype.register=function(t,e){return i("renderer.plugins.prepare.register is now deprecated, please use renderer.plugins.prepare.registerFindHook & renderer.plugins.prepare.registerUploadHook"),t&&this.registerFindHook(t),e&&this.registerUploadHook(e),this});a.canvas&&Object.defineProperty(a.canvas,"UPLOADS_PER_FRAME",{set:function(){i("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return i("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}});a.webgl&&Object.defineProperty(a.webgl,"UPLOADS_PER_FRAME",{set:function(){i("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return i("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}});if(s.Loader){var d=s.Resource,p=s.Loader;Object.defineProperties(d.prototype,{isJson:{get:function(){return i("The isJson property is deprecated, please use `resource.type === Resource.TYPE.JSON`."),this.type===d.TYPE.JSON}},isXml:{get:function(){return i("The isXml property is deprecated, please use `resource.type === Resource.TYPE.XML`."),this.type===d.TYPE.XML}},isImage:{get:function(){return i("The isImage property is deprecated, please use `resource.type === Resource.TYPE.IMAGE`."),this.type===d.TYPE.IMAGE}},isAudio:{get:function(){return i("The isAudio property is deprecated, please use `resource.type === Resource.TYPE.AUDIO`."),this.type===d.TYPE.AUDIO}},isVideo:{get:function(){return i("The isVideo property is deprecated, please use `resource.type === Resource.TYPE.VIDEO`."),this.type===d.TYPE.VIDEO}}}),Object.defineProperties(p.prototype,{before:{get:function(){return i("The before() method is deprecated, please use pre()."),this.pre}},after:{get:function(){return i("The after() method is deprecated, please use use()."),this.use}}})}u.interactiveTarget&&Object.defineProperty(u.interactiveTarget,"defaultCursor",{set:function(t){i("Property defaultCursor has been replaced with 'cursor'. "),this.cursor=t},get:function(){return i("Property defaultCursor has been replaced with 'cursor'. "),this.cursor}});u.InteractionManager&&(Object.defineProperty(u.InteractionManager,"defaultCursorStyle",{set:function(t){i("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default=t},get:function(){return i("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default}}),Object.defineProperty(u.InteractionManager,"currentCursorStyle",{set:function(t){i("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode=t},get:function(){return i("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode}}))};var n={};function i(t){if(!n[t]){var e=(new Error).stack;void 0===e?console.warn("Deprecation Warning: ",t):(e=e.split("\n").splice(3).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cDeprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t),console.warn(e),console.groupEnd()):(console.warn("Deprecation Warning: ",t),console.warn(e))),n[t]=!0}}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(72);Object.defineProperty(e,"accessibleTarget",{enumerable:!0,get:function(){return o(n).default}});var i=r(157);function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"AccessibilityManager",{enumerable:!0,get:function(){return o(i).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=a(r(30)),o=a(r(72));function a(t){return t&&t.__esModule?t:{default:t}}n.utils.mixins.delayMixin(n.DisplayObject.prototype,o.default);var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!i.default.tablet&&!i.default.phone||navigator.isCocoonJS||this.createTouchHook();var r=document.createElement("div");r.style.width="100px",r.style.height="100px",r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.zIndex=2,this.div=r,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=e,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessabillity=!1,window.addEventListener("keydown",this._onKeyDown,!1)}return t.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width="1px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.style.zIndex=2,e.style.backgroundColor="#FF0000",e.title="HOOK DIV",e.addEventListener("focus",(function(){t.isMobileAccessabillity=!0,t.activate(),document.body.removeChild(e)})),document.body.appendChild(e)},t.prototype.activate=function(){this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},t.prototype.deactivate=function(){this.isActive&&!this.isMobileAccessabillity&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(t){if(t.visible){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,r=0;r<e.length;r++)this.updateAccessibleObjects(e[r])}},t.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,r=t.height/this.renderer.height,i=this.div;i.style.left=t.left+"px",i.style.top=t.top+"px",i.style.width=this.renderer.width+"px",i.style.height=this.renderer.height+"px";for(var o=0;o<this.children.length;o++){var a=this.children[o];if(a.renderId!==this.renderId)a._accessibleActive=!1,n.utils.removeItems(this.children,o,1),this.div.removeChild(a._accessibleDiv),this.pool.push(a._accessibleDiv),a._accessibleDiv=null,o--,0===this.children.length&&this.deactivate();else{i=a._accessibleDiv;var s=a.hitArea,u=a.worldTransform;a.hitArea?(i.style.left=(u.tx+s.x*u.a)*e+"px",i.style.top=(u.ty+s.y*u.d)*r+"px",i.style.width=s.width*u.a*e+"px",i.style.height=s.height*u.d*r+"px"):(s=a.getBounds(),this.capHitArea(s),i.style.left=s.x*e+"px",i.style.top=s.y*r+"px",i.style.width=s.width*e+"px",i.style.height=s.height*r+"px",i.title!==a.accessibleTitle&&null!==a.accessibleTitle&&(i.title=a.accessibleTitle),i.getAttribute("aria-label")!==a.accessibleHint&&null!==a.accessibleHint&&i.setAttribute("aria-label",a.accessibleHint))}}this.renderId++}},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2,e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.div=null;for(var t=0;t<this.children.length;t++)this.children[t].div=null;window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();e.default=s,n.WebGLRenderer.registerPlugin("accessibility",s),n.CanvasRenderer.registerPlugin("accessibility",s)},function(t,e,r){"use strict";e.__esModule=!0;var n=r(159);Object.defineProperty(e,"webgl",{enumerable:!0,get:function(){return o(n).default}});var i=r(160);function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"canvas",{enumerable:!0,get:function(){return o(i).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));var i=new n.Rectangle,o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,r=void 0,o=void 0,a=void 0,s=!1,u=void 0,l=!1;t&&(t instanceof n.RenderTexture?u=t:(u=this.renderer.generateTexture(t),l=!0)),u?(o=(r=u.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]).resolution,a=u.frame,s=!1):(o=(r=this.renderer.rootRenderTarget).resolution,s=!0,(a=i).width=r.size.width,a.height=r.size.height);var c=Math.floor(a.width*o+1e-4),h=Math.floor(a.height*o+1e-4),f=new n.CanvasRenderTarget(c,h,1);if(r){e.bindRenderTarget(r);var d=new Uint8Array(4*c*h),p=e.gl;p.readPixels(a.x*o,a.y*o,c,h,p.RGBA,p.UNSIGNED_BYTE,d);var v=f.context.getImageData(0,0,c,h);v.data.set(d),f.context.putImageData(v,0,0),s&&(f.context.scale(1,-1),f.context.drawImage(f.canvas,0,-h))}return l&&u.destroy(!0),f.canvas},t.prototype.pixels=function(t){var e=this.renderer,r=void 0,o=void 0,a=void 0,s=void 0,u=!1;t&&(t instanceof n.RenderTexture?s=t:(s=this.renderer.generateTexture(t),u=!0)),s?(o=(r=s.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]).resolution,a=s.frame):(o=(r=this.renderer.rootRenderTarget).resolution,(a=i).width=r.size.width,a.height=r.size.height);var l=a.width*o,c=a.height*o,h=new Uint8Array(4*l*c);if(r){e.bindRenderTarget(r);var f=e.gl;f.readPixels(a.x*o,a.y*o,l,c,f.RGBA,f.UNSIGNED_BYTE,h)}return u&&s.destroy(!0),h},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();e.default=o,n.WebGLRenderer.registerPlugin("extract",o)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));var i=new n.Rectangle,o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,r=void 0,o=void 0,a=void 0,s=void 0;t&&(s=t instanceof n.RenderTexture?t:e.generateTexture(t)),s?(r=s.baseTexture._canvasRenderTarget.context,o=s.baseTexture._canvasRenderTarget.resolution,a=s.frame):(r=e.rootContext,o=e.resolution,(a=i).width=this.renderer.width,a.height=this.renderer.height);var u=Math.floor(a.width*o+1e-4),l=Math.floor(a.height*o+1e-4),c=new n.CanvasRenderTarget(u,l,1),h=r.getImageData(a.x*o,a.y*o,u,l);return c.context.putImageData(h,0,0),c.canvas},t.prototype.pixels=function(t){var e=this.renderer,r=void 0,o=void 0,a=void 0,s=void 0;return t&&(s=t instanceof n.RenderTexture?t:e.generateTexture(t)),s?(r=s.baseTexture._canvasRenderTarget.context,o=s.baseTexture._canvasRenderTarget.resolution,a=s.frame):(r=e.rootContext,(a=i).width=e.width,a.height=e.height),r.getImageData(0,0,a.width*o,a.height*o).data},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();e.default=o,n.CanvasRenderer.registerPlugin("extract",o)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));var o=function(t){function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r[0]instanceof i.Texture?r[0]:r[0].texture));return o._textures=null,o._durations=null,o.textures=r,o._autoUpdate=!1!==n,o.animationSpeed=1,o.loop=!0,o.updateAnchor=!1,o.onComplete=null,o.onFrameChange=null,o.onLoop=null,o._currentTime=0,o.playing=!1,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.stop=function(){this.playing&&(this.playing=!1,this._autoUpdate&&i.ticker.shared.remove(this.update,this))},e.prototype.play=function(){this.playing||(this.playing=!0,this._autoUpdate&&i.ticker.shared.add(this.update,this,i.UPDATE_PRIORITY.HIGH))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var n=this._currentTime%1*this._durations[this.currentFrame];for(n+=e/60*1e3;n<0;)this._currentTime--,n+=this._durations[this.currentFrame];var i=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);n>=this._durations[this.currentFrame];)n-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=n/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<r||this.animationSpeed<0&&this.currentFrame>r)&&this.onLoop(),this.updateTexture())},e.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.cachedTint=16777215,this.updateAnchor&&this._anchor.copy(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame)},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e)},e.fromFrames=function(t){for(var r=[],n=0;n<t.length;++n)r.push(i.Texture.fromFrame(t[n]));return new e(r)},e.fromImages=function(t){for(var r=[],n=0;n<t.length;++n)r.push(i.Texture.fromImage(t[n]));return new e(r)},n(e,[{key:"totalFrames",get:function(){return this._textures.length}},{key:"textures",get:function(){return this._textures},set:function(t){if(t[0]instanceof i.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this.gotoAndStop(0),this.updateTexture()}},{key:"currentFrame",get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}}]),e}(i.Sprite);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),a=r(20),s=(n=a)&&n.__esModule?n:{default:n};function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var c=new o.Point,h=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;u(this,e);var a=l(this,t.call(this,r));return a.tileTransform=new o.TransformStatic,a._width=n,a._height=i,a._canvasPattern=null,a.uvTransform=r.transform||new o.TextureMatrix(r),a.pluginName="tilingSprite",a.uvRespectAnchor=!1,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._onTextureUpdate=function(){this.uvTransform&&(this.uvTransform.texture=this._texture),this.cachedTint=16777215},e.prototype._renderWebGL=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvTransform.update(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var r=t.context,n=this.worldTransform,i=t.resolution,a=2===e.rotate,u=e.baseTexture,l=u.resolution,c=this.tilePosition.x/this.tileScale.x%e.orig.width*l,h=this.tilePosition.y/this.tileScale.y%e.orig.height*l;if(this._textureID!==this._texture._updateID||this.cachedTint!==this.tint){this._textureID=this._texture._updateID;var f=new o.CanvasRenderTarget(e.orig.width,e.orig.height,l);if(16777215!==this.tint)this.tintedTexture=s.default.getTintedTexture(this,this.tint),f.context.drawImage(this.tintedTexture,0,0);else{var d=e._frame.x*l,p=e._frame.y*l,v=e._frame.width*l,_=e._frame.height*l,g=(e.trim?e.trim.width:e.orig.width)*l,y=(e.trim?e.trim.height:e.orig.height)*l,m=(e.trim?e.trim.x:0)*l,x=(e.trim?e.trim.y:0)*l;a?(f.context.rotate(-Math.PI/2),f.context.translate(-y,0),f.context.drawImage(u.source,d,p,v,_,-x,m,y,g)):f.context.drawImage(u.source,d,p,v,_,m,x,g,y)}this.cachedTint=this.tint,this._canvasPattern=f.context.createPattern(f.canvas,"repeat")}r.globalAlpha=this.worldAlpha,r.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i,n.ty*i),t.setBlendMode(this.blendMode),r.fillStyle=this._canvasPattern,r.scale(this.tileScale.x/l,this.tileScale.y/l);var E=this.anchor.x*-this._width*l,b=this.anchor.y*-this._height*l;this.uvRespectAnchor?(r.translate(c,h),r.fillRect(-c+E,-h+b,this._width/this.tileScale.x*l,this._height/this.tileScale.y*l)):(r.translate(c+E,h+b),r.fillRect(-c,-h,this._width/this.tileScale.x*l,this._height/this.tileScale.y*l))}},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,r=this._width*(1-this._anchor._x),n=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,r,n)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new o.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,c);var e=this._width,r=this._height,n=-e*this.anchor._x;if(c.x>=n&&c.x<n+e){var i=-r*this.anchor._y;if(c.y>=i&&c.y<i+r)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvTransform=null},e.from=function(t,r,n){return new e(o.Texture.from(t),r,n)},e.fromFrame=function(t,r,n){var i=o.utils.TextureCache[t];if(!i)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new e(i,r,n)},e.fromImage=function(t,r,n,i,a){return new e(o.Texture.fromImage(t,i,a),r,n)},i(e,[{key:"clampMargin",get:function(){return this.uvTransform.clampMargin},set:function(t){this.uvTransform.clampMargin=t,this.uvTransform.update(!0)}},{key:"tileScale",get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copy(t)}},{key:"tilePosition",get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copy(t)}},{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}}]),e}(o.Sprite);e.default=h},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=r(2);r(9);var o=new n.Matrix,a=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.shader=null,n.simpleShader=null,n.quad=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new n.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n gl_FragColor = sample * uColor;\n}\n"),this.simpleShader=new n.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = sample * uColor;\n}\n"),this.renderer.bindVao(null),this.quad=new n.Quad(t,this.renderer.state.attribState),this.quad.initVao(this.shader)},e.prototype.render=function(t){var e=this.renderer,r=this.quad;e.bindVao(r.vao);var a=r.vertices;a[0]=a[6]=t._width*-t.anchor.x,a[1]=a[3]=t._height*-t.anchor.y,a[2]=a[4]=t._width*(1-t.anchor.x),a[5]=a[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&((a=r.uvs)[0]=a[6]=-t.anchor.x,a[1]=a[3]=-t.anchor.y,a[2]=a[4]=1-t.anchor.x,a[5]=a[7]=1-t.anchor.y),r.upload();var s=t._texture,u=s.baseTexture,l=t.tileTransform.localTransform,c=t.uvTransform,h=u.isPowerOfTwo&&s.frame.width===u.width&&s.frame.height===u.height;h&&(u._glTextures[e.CONTEXT_UID]?h=u.wrapMode!==i.WRAP_MODES.CLAMP:u.wrapMode===i.WRAP_MODES.CLAMP&&(u.wrapMode=i.WRAP_MODES.REPEAT));var f=h?this.simpleShader:this.shader;e.bindShader(f);var d=s.width,p=s.height,v=t._width,_=t._height;o.set(l.a*d/v,l.b*d/_,l.c*p/v,l.d*p/_,l.tx/v,l.ty/_),o.invert(),h?o.prepend(c.mapCoord):(f.uniforms.uMapCoord=c.mapCoord.toArray(!0),f.uniforms.uClampFrame=c.uClampFrame,f.uniforms.uClampOffset=c.uClampOffset),f.uniforms.uTransform=o.toArray(!0),f.uniforms.uColor=n.utils.premultiplyTintToRgba(t.tint,t.worldAlpha,f.uniforms.uColor,u.premultipliedAlpha),f.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),f.uniforms.uSampler=e.bindTexture(s),e.setBlendMode(n.utils.correctBlendMode(t.blendMode,u.premultipliedAlpha)),r.vao.draw(this.renderer.gl.TRIANGLES,6,0)},e}(n.ObjectRenderer);e.default=a,n.WebGLRenderer.registerPlugin("tilingSprite",a)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=u(r(40)),a=r(4),s=u(r(5));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var h=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,e);var i=c(this,t.call(this));return i._textWidth=0,i._textHeight=0,i._glyphs=[],i._font={tint:void 0!==n.tint?n.tint:16777215,align:n.align||"left",name:null,size:0},i.font=n.font,i._text=r,i._maxWidth=0,i._maxLineHeight=0,i._letterSpacing=0,i._anchor=new o.default((function(){i.dirty=!0}),i,0,0),i.dirty=!1,i.updateText(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],r=this._font.size/t.size,n=new i.Point,o=[],a=[],s=this.text.replace(/(?:\r\n|\r)/g,"\n"),u=s.length,l=this._maxWidth*t.size/this._font.size,c=null,h=0,f=0,d=0,p=-1,v=0,_=0,g=0,y=0;y<u;y++){var m=s.charCodeAt(y),x=s.charAt(y);if(/(?:\s)/.test(x)&&(p=y,v=h),"\r"!==x&&"\n"!==x){var E=t.chars[m];E&&(c&&E.kerning[c]&&(n.x+=E.kerning[c]),o.push({texture:E.texture,line:d,charCode:m,position:new i.Point(n.x+E.xOffset+this._letterSpacing/2,n.y+E.yOffset)}),n.x+=E.xAdvance+this._letterSpacing,h=n.x,g=Math.max(g,E.yOffset+E.texture.height),c=m,-1!==p&&l>0&&n.x>l&&(++_,i.utils.removeItems(o,1+p-_,1+y-p),y=p,p=-1,a.push(v),f=Math.max(f,v),d++,n.x=0,n.y+=t.lineHeight,c=null))}else a.push(h),f=Math.max(f,h),++d,++_,n.x=0,n.y+=t.lineHeight,c=null}var b=s.charAt(s.length-1);"\r"!==b&&"\n"!==b&&(/(?:\s)/.test(b)&&(h=v),a.push(h),f=Math.max(f,h));for(var T=[],R=0;R<=d;R++){var O=0;"right"===this._font.align?O=f-a[R]:"center"===this._font.align&&(O=(f-a[R])/2),T.push(O)}for(var S=o.length,C=this.tint,w=0;w<S;w++){var A=this._glyphs[w];A?A.texture=o[w].texture:(A=new i.Sprite(o[w].texture),this._glyphs.push(A)),A.position.x=(o[w].position.x+T[o[w].line])*r,A.position.y=o[w].position.y*r,A.scale.x=A.scale.y=r,A.tint=C,A.parent||this.addChild(A)}for(var P=S;P<this._glyphs.length;++P)this.removeChild(this._glyphs[P]);if(this._textWidth=f*r,this._textHeight=(n.y+t.lineHeight)*r,0!==this.anchor.x||0!==this.anchor.y)for(var M=0;M<S;M++)this._glyphs[M].x-=this._textWidth*this.anchor.x,this._glyphs[M].y-=this._textHeight*this.anchor.y;this._maxLineHeight=g*r},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},e.registerFont=function(t,r){var n={},o=t.getElementsByTagName("info")[0],u=t.getElementsByTagName("common")[0],l=t.getElementsByTagName("page"),c=(0,a.getResolutionOfUrl)(l[0].getAttribute("file"),s.default.RESOLUTION),h={};n.font=o.getAttribute("face"),n.size=parseInt(o.getAttribute("size"),10),n.lineHeight=parseInt(u.getAttribute("lineHeight"),10)/c,n.chars={},r instanceof i.Texture&&(r=[r]);for(var f=0;f<l.length;f++){var d=l[f].getAttribute("id"),p=l[f].getAttribute("file");h[d]=r instanceof Array?r[f]:r[p]}for(var v=t.getElementsByTagName("char"),_=0;_<v.length;_++){var g=v[_],y=parseInt(g.getAttribute("id"),10),m=g.getAttribute("page")||0,x=new i.Rectangle(parseInt(g.getAttribute("x"),10)/c+h[m].frame.x/c,parseInt(g.getAttribute("y"),10)/c+h[m].frame.y/c,parseInt(g.getAttribute("width"),10)/c,parseInt(g.getAttribute("height"),10)/c);n.chars[y]={xOffset:parseInt(g.getAttribute("xoffset"),10)/c,yOffset:parseInt(g.getAttribute("yoffset"),10)/c,xAdvance:parseInt(g.getAttribute("xadvance"),10)/c,kerning:{},texture:new i.Texture(h[m].baseTexture,x),page:m}}for(var E=t.getElementsByTagName("kerning"),b=0;b<E.length;b++){var T=E[b],R=parseInt(T.getAttribute("first"),10)/c,O=parseInt(T.getAttribute("second"),10)/c,S=parseInt(T.getAttribute("amount"),10)/c;n.chars[O]&&(n.chars[O].kerning[R]=S)}return e.fonts[n.font]=n,n},n(e,[{key:"tint",get:function(){return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},{key:"align",get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},{key:"anchor",get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copy(t)}},{key:"font",get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},{key:"text",get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}},{key:"maxWidth",get:function(){return this._maxWidth},set:function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)}},{key:"maxLineHeight",get:function(){return this.validate(),this._maxLineHeight}},{key:"textWidth",get:function(){return this.validate(),this._textWidth}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)}},{key:"textHeight",get:function(){return this.validate(),this._textHeight}}]),e}(i.Container);e.default=h,h.fonts={}},function(t,e,r){"use strict";var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=s(r(10)),o=s(r(12)),a=r(4);function s(t){return t&&t.__esModule?t:{default:t}}var u=n.DisplayObject,l=new n.Matrix;u.prototype._cacheAsBitmap=!1,u.prototype._cacheData=!1;var c=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.textureCacheId=null,this.originalRenderWebGL=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(u.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e=void 0;t?(this._cacheData||(this._cacheData=new c),(e=this._cacheData).originalRenderWebGL=this.renderWebGL,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.renderWebGL=e.originalRenderWebGL,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}}),u.prototype._renderCachedWebGL=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderWebGL(t))},u.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.currentRenderer.flush();var r=this.getLocalBounds().clone();if(this._filters&&this._filters.length){var s=this._filters[0].padding;r.pad(s)}r.ceil(n.settings.RESOLUTION);var u=t._activeRenderTarget,c=t.filterManager.filterStack,h=n.RenderTexture.create(r.width,r.height),f="cacheAsBitmap_"+(0,a.uid)();this._cacheData.textureCacheId=f,o.default.addToCache(h.baseTexture,f),i.default.addToCache(h,f);var d=l;d.tx=-r.x,d.ty=-r.y,this.transform.worldTransform.identity(),this.renderWebGL=this._cacheData.originalRenderWebGL,t.render(this,h,!0,d,!0),t.bindRenderTarget(u),t.filterManager.filterStack=c,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var p=new n.Sprite(h);p.transform.worldTransform=this.transform.worldTransform,p.anchor.x=-r.x/r.width,p.anchor.y=-r.y/r.height,p.alpha=e,p._bounds=this._bounds,this._cacheData.sprite=p,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=p.containsPoint.bind(p)}},u.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},u.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),r=this.alpha;this.alpha=1;var s=t.context;e.ceil(n.settings.RESOLUTION);var u=n.RenderTexture.create(e.width,e.height),c="cacheAsBitmap_"+(0,a.uid)();this._cacheData.textureCacheId=c,o.default.addToCache(u.baseTexture,c),i.default.addToCache(u,c);var h=l;this.transform.localTransform.copy(h),h.invert(),h.tx-=e.x,h.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,u,!0,h,!1),t.context=s,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var f=new n.Sprite(u);f.transform.worldTransform=this.transform.worldTransform,f.anchor.x=-e.x/e.width,f.anchor.y=-e.y/e.height,f.alpha=r,f._bounds=this._bounds,this._cacheData.sprite=f,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=f.containsPoint.bind(f)}},u.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._lastBoundsID=this._boundsID},u.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},u.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,o.default.removeFromCache(this._cacheData.textureCacheId),i.default.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},u.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)}},function(t,e,r){"use strict";var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));n.DisplayObject.prototype.name=null,n.Container.prototype.getChildByName=function(t){for(var e=0;e<this.children.length;e++)if(this.children[e].name===t)return this.children[e];return null}},function(t,e,r){"use strict";var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));n.DisplayObject.prototype.getGlobalPosition=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new n.Point,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(169);Object.defineProperty(e,"FXAAFilter",{enumerable:!0,get:function(){return h(n).default}});var i=r(170);Object.defineProperty(e,"NoiseFilter",{enumerable:!0,get:function(){return h(i).default}});var o=r(171);Object.defineProperty(e,"DisplacementFilter",{enumerable:!0,get:function(){return h(o).default}});var a=r(172);Object.defineProperty(e,"BlurFilter",{enumerable:!0,get:function(){return h(a).default}});var s=r(74);Object.defineProperty(e,"BlurXFilter",{enumerable:!0,get:function(){return h(s).default}});var u=r(78);Object.defineProperty(e,"BlurYFilter",{enumerable:!0,get:function(){return h(u).default}});var l=r(173);Object.defineProperty(e,"ColorMatrixFilter",{enumerable:!0,get:function(){return h(l).default}});var c=r(174);function h(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"AlphaFilter",{enumerable:!0,get:function(){return h(c).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));r(9);var i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nuniform vec4 filterArea;\n\nvarying vec2 vTextureCoord;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvoid texcoords(vec2 fragCoord, vec2 resolution,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n vec2 inverseVP = 1.0 / resolution.xy;\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n \n --\n \n From:\n https://github.com/mitsuhiko/webgl-meincraft\n \n Copyright (c) 2011 by Armin Ronacher.\n \n Some rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n \n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n \n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n \n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n \n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n \n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n \n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n vec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n'))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.Filter);e.default=i},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));r(9);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.random();o(this,e);var i=a(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n"));return i.noise=r,i.seed=n,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"noise",get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t}},{key:"seed",get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t}}]),e}(i.Filter);e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));r(9);var o=function(t){function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=new i.Matrix;r.renderable=!1;var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;\n vTextureCoord = aTextureCoord;\n}","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy *= scale / filterArea.xy;\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\n}\n"));return a.maskSprite=r,a.maskMatrix=o,a.uniforms.mapSampler=r._texture,a.uniforms.filterMatrix=o,a.uniforms.scale={x:1,y:1},null==n&&(n=20),a.scale=new i.Point(n,n),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.apply=function(t,e,r){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y,t.applyFilter(this,e,r)},n(e,[{key:"map",get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t}}]),e}(i.Filter);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=s(r(74)),a=s(r(78));function s(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(r,n,s,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var l=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return l.blurXFilter=new o.default(r,n,s,u),l.blurYFilter=new a.default(r,n,s,u),l.padding=0,l.resolution=s||i.settings.RESOLUTION,l.quality=n||4,l.blur=r||8,l}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.apply=function(t,e,r){var n=t.getRenderTarget(!0);this.blurXFilter.apply(t,e,n,!0),this.blurYFilter.apply(t,n,r,!1),t.returnRenderTarget(n)},n(e,[{key:"blur",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"quality",get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t}},{key:"blurX",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blurY",get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blendMode",get:function(){return this.blurYFilter._blendMode},set:function(t){this.blurYFilter._blendMode=t}}]),e}(i.Filter);e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));r(9);var o=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n"));return r.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],r.alpha=1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._loadMatrix=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t;e&&(this._multiply(r,this.uniforms.m,t),r=this._colorMatrix(r)),this.uniforms.m=r},e.prototype._multiply=function(t,e,r){return t[0]=e[0]*r[0]+e[1]*r[5]+e[2]*r[10]+e[3]*r[15],t[1]=e[0]*r[1]+e[1]*r[6]+e[2]*r[11]+e[3]*r[16],t[2]=e[0]*r[2]+e[1]*r[7]+e[2]*r[12]+e[3]*r[17],t[3]=e[0]*r[3]+e[1]*r[8]+e[2]*r[13]+e[3]*r[18],t[4]=e[0]*r[4]+e[1]*r[9]+e[2]*r[14]+e[3]*r[19]+e[4],t[5]=e[5]*r[0]+e[6]*r[5]+e[7]*r[10]+e[8]*r[15],t[6]=e[5]*r[1]+e[6]*r[6]+e[7]*r[11]+e[8]*r[16],t[7]=e[5]*r[2]+e[6]*r[7]+e[7]*r[12]+e[8]*r[17],t[8]=e[5]*r[3]+e[6]*r[8]+e[7]*r[13]+e[8]*r[18],t[9]=e[5]*r[4]+e[6]*r[9]+e[7]*r[14]+e[8]*r[19]+e[9],t[10]=e[10]*r[0]+e[11]*r[5]+e[12]*r[10]+e[13]*r[15],t[11]=e[10]*r[1]+e[11]*r[6]+e[12]*r[11]+e[13]*r[16],t[12]=e[10]*r[2]+e[11]*r[7]+e[12]*r[12]+e[13]*r[17],t[13]=e[10]*r[3]+e[11]*r[8]+e[12]*r[13]+e[13]*r[18],t[14]=e[10]*r[4]+e[11]*r[9]+e[12]*r[14]+e[13]*r[19]+e[14],t[15]=e[15]*r[0]+e[16]*r[5]+e[17]*r[10]+e[18]*r[15],t[16]=e[15]*r[1]+e[16]*r[6]+e[17]*r[11]+e[18]*r[16],t[17]=e[15]*r[2]+e[16]*r[7]+e[17]*r[12]+e[18]*r[17],t[18]=e[15]*r[3]+e[16]*r[8]+e[17]*r[13]+e[18]*r[18],t[19]=e[15]*r[4]+e[16]*r[9]+e[17]*r[14]+e[18]*r[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.greyscale=function(t,e){var r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var r=Math.cos(t),n=Math.sin(t),i=1/3,o=(0,Math.sqrt)(i),a=[r+(1-r)*i,i*(1-r)-o*n,i*(1-r)+o*n,0,0,i*(1-r)+o*n,r+i*(1-r),i*(1-r)-o*n,0,0,i*(1-r)-o*n,i*(1-r)+o*n,r+i*(1-r),0,0,0,0,0,1,0];this._loadMatrix(a,e)},e.prototype.contrast=function(t,e){var r=(t||0)+1,n=-.5*(r-1),i=[r,0,0,0,n,0,r,0,0,n,0,0,r,0,n,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.saturate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],r=2*t/3+1,n=-.5*(r-1),i=[r,n,n,0,0,n,r,n,0,0,n,n,r,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,e,r,n,i){var o=((r=r||16770432)>>16&255)/255,a=(r>>8&255)/255,s=(255&r)/255,u=((n=n||3375104)>>16&255)/255,l=(n>>8&255)/255,c=(255&n)/255,h=[.3,.59,.11,0,0,o,a,s,t=t||.2,0,u,l,c,e=e||.15,0,o-u,a-l,s-c,0,0];this._loadMatrix(h,i)},e.prototype.night=function(t,e){var r=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},n(e,[{key:"matrix",get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}},{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(i.Filter);e.default=o,o.prototype.grayscale=o.prototype.greyscale},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3));r(9);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;o(this,e);var n=a(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n"));return n.alpha=r,n.glShaderKey="alpha",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(i.Filter);e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n=r(79);Object.defineProperty(e,"InteractionData",{enumerable:!0,get:function(){return u(n).default}});var i=r(176);Object.defineProperty(e,"InteractionManager",{enumerable:!0,get:function(){return u(i).default}});var o=r(82);Object.defineProperty(e,"interactiveTarget",{enumerable:!0,get:function(){return u(o).default}});var a=r(81);Object.defineProperty(e,"InteractionTrackingData",{enumerable:!0,get:function(){return u(a).default}});var s=r(80);function u(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"InteractionEvent",{enumerable:!0,get:function(){return u(s).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=c(r(79)),a=c(r(80)),s=c(r(81)),u=c(r(11)),l=c(r(82));function c(t){return t&&t.__esModule?t:{default:t}}i.utils.mixins.delayMixin(i.DisplayObject.prototype,l.default);var h={target:null,data:{global:null}},f=function(t){function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return n=n||{},s.renderer=r,s.autoPreventDefault=void 0===n.autoPreventDefault||n.autoPreventDefault,s.interactionFrequency=n.interactionFrequency||10,s.mouse=new o.default,s.mouse.identifier=1,s.mouse.global.set(-999999),s.activeInteractionData={},s.activeInteractionData[1]=s.mouse,s.interactionDataPool=[],s.eventData=new a.default,s.interactionDOMElement=null,s.moveWhenInside=!1,s.eventsAdded=!1,s.mouseOverRenderer=!1,s.supportsTouchEvents="ontouchstart"in window,s.supportsPointerEvents=!!window.PointerEvent,s.onPointerUp=s.onPointerUp.bind(s),s.processPointerUp=s.processPointerUp.bind(s),s.onPointerCancel=s.onPointerCancel.bind(s),s.processPointerCancel=s.processPointerCancel.bind(s),s.onPointerDown=s.onPointerDown.bind(s),s.processPointerDown=s.processPointerDown.bind(s),s.onPointerMove=s.onPointerMove.bind(s),s.processPointerMove=s.processPointerMove.bind(s),s.onPointerOut=s.onPointerOut.bind(s),s.processPointerOverOut=s.processPointerOverOut.bind(s),s.onPointerOver=s.onPointerOver.bind(s),s.cursorStyles={default:"inherit",pointer:"pointer"},s.currentCursorMode=null,s.cursor=null,s._tempPoint=new i.Point,s.resolution=1,s.setTargetElement(s.renderer.view,s.renderer.resolution),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.hitTest=function(t,e){return h.target=null,h.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(h,e,null,!0),h.target},e.prototype.setTargetElement=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&(i.ticker.shared.add(this.update,this,i.UPDATE_PRIORITY.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.interactionDOMElement&&(i.ticker.shared.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},e.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.interactionDOMElement))if(this.didMove)this.didMove=!1;else{for(var e in this.cursor=null,this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(e)){var r=this.activeInteractionData[e];if(r.originalEvent&&"touch"!==r.pointerType){var n=this.configureInteractionEventForDOMEvent(this.eventData,r.originalEvent,r);this.processInteractive(n,this.renderer._lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},e.prototype.setCursorMode=function(t){if(t=t||"default",this.currentCursorMode!==t){this.currentCursorMode=t;var e=this.cursorStyles[t];if(e)switch(void 0===e?"undefined":n(e)){case"string":this.interactionDOMElement.style.cursor=e;break;case"function":e(t);break;case"object":Object.assign(this.interactionDOMElement.style,e)}else"string"!=typeof t||Object.prototype.hasOwnProperty.call(this.cursorStyles,t)||(this.interactionDOMElement.style.cursor=t)}},e.prototype.dispatchEvent=function(t,e,r){r.stopped||(r.currentTarget=t,r.type=e,t.emit(e,r),t[e]&&t[e](r))},e.prototype.mapPositionToPoint=function(t,e,r){var n=void 0;n=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0};var i=navigator.isCocoonJS?this.resolution:1/this.resolution;t.x=(e-n.left)*(this.interactionDOMElement.width/n.width)*i,t.y=(r-n.top)*(this.interactionDOMElement.height/n.height)*i},e.prototype.processInteractive=function(t,e,r,n,i){if(!e||!e.visible)return!1;var o=t.data.global,a=!1,s=i=e.interactive||i,u=!0;if(e.hitArea?(n&&(e.worldTransform.applyInverse(o,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?a=!0:(n=!1,u=!1)),s=!1):e._mask&&n&&(e._mask.containsPoint(o)||(n=!1,u=!1)),u&&e.interactiveChildren&&e.children)for(var l=e.children,c=l.length-1;c>=0;c--){var h=l[c],f=this.processInteractive(t,h,r,n,s);if(f){if(!h.parent)continue;s=!1,f&&(t.target&&(n=!1),a=!0)}}return i&&(n&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(a=!0),e.interactive&&(a&&!t.target&&(t.target=e),r&&r(t,e,!!a))),a},e.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);this.autoPreventDefault&&e[0].isNormalized&&t.preventDefault();for(var r=e.length,n=0;n<r;n++){var i=e[n],o=this.getInteractionDataForPointerId(i),a=this.configureInteractionEventForDOMEvent(this.eventData,i,o);if(a.data.originalEvent=t,this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",a),"touch"===i.pointerType)this.emit("touchstart",a);else if("mouse"===i.pointerType||"pen"===i.pointerType){var s=2===i.button;this.emit(s?"rightdown":"mousedown",this.eventData)}}}},e.prototype.processPointerDown=function(t,e,r){var n=t.data,i=t.data.identifier;if(r)if(e.trackedPointers[i]||(e.trackedPointers[i]=new s.default(i)),this.dispatchEvent(e,"pointerdown",t),"touch"===n.pointerType)this.dispatchEvent(e,"touchstart",t);else if("mouse"===n.pointerType||"pen"===n.pointerType){var o=2===n.button;o?e.trackedPointers[i].rightDown=!0:e.trackedPointers[i].leftDown=!0,this.dispatchEvent(e,o?"rightdown":"mousedown",t)}},e.prototype.onPointerComplete=function(t,e,r){for(var n=this.normalizeToPointerData(t),i=n.length,o=t.target!==this.interactionDOMElement?"outside":"",a=0;a<i;a++){var s=n[a],u=this.getInteractionDataForPointerId(s),l=this.configureInteractionEventForDOMEvent(this.eventData,s,u);if(l.data.originalEvent=t,this.processInteractive(l,this.renderer._lastObjectRendered,r,e||!o),this.emit(e?"pointercancel":"pointerup"+o,l),"mouse"===s.pointerType||"pen"===s.pointerType){var c=2===s.button;this.emit(c?"rightup"+o:"mouseup"+o,l)}else"touch"===s.pointerType&&(this.emit(e?"touchcancel":"touchend"+o,l),this.releaseInteractionDataForPointerId(s.pointerId,u))}},e.prototype.onPointerCancel=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!0,this.processPointerCancel)},e.prototype.processPointerCancel=function(t,e){var r=t.data,n=t.data.identifier;void 0!==e.trackedPointers[n]&&(delete e.trackedPointers[n],this.dispatchEvent(e,"pointercancel",t),"touch"===r.pointerType&&this.dispatchEvent(e,"touchcancel",t))},e.prototype.onPointerUp=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!1,this.processPointerUp)},e.prototype.processPointerUp=function(t,e,r){var n=t.data,i=t.data.identifier,o=e.trackedPointers[i],a="touch"===n.pointerType,u="mouse"===n.pointerType||"pen"===n.pointerType,l=!1;if(u){var c=2===n.button,h=s.default.FLAGS,f=c?h.RIGHT_DOWN:h.LEFT_DOWN,d=void 0!==o&&o.flags&f;r?(this.dispatchEvent(e,c?"rightup":"mouseup",t),d&&(this.dispatchEvent(e,c?"rightclick":"click",t),l=!0)):d&&this.dispatchEvent(e,c?"rightupoutside":"mouseupoutside",t),o&&(c?o.rightDown=!1:o.leftDown=!1)}r?(this.dispatchEvent(e,"pointerup",t),a&&this.dispatchEvent(e,"touchend",t),o&&(u&&!l||this.dispatchEvent(e,"pointertap",t),a&&(this.dispatchEvent(e,"tap",t),o.over=!1))):o&&(this.dispatchEvent(e,"pointerupoutside",t),a&&this.dispatchEvent(e,"touchendoutside",t)),o&&o.none&&delete e.trackedPointers[i]},e.prototype.onPointerMove=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);"mouse"!==e[0].pointerType&&"pen"!==e[0].pointerType||(this.didMove=!0,this.cursor=null);for(var r=e.length,n=0;n<r;n++){var i=e[n],o=this.getInteractionDataForPointerId(i),a=this.configureInteractionEventForDOMEvent(this.eventData,i,o);a.data.originalEvent=t;var s="touch"!==i.pointerType||this.moveWhenInside;this.processInteractive(a,this.renderer._lastObjectRendered,this.processPointerMove,s),this.emit("pointermove",a),"touch"===i.pointerType&&this.emit("touchmove",a),"mouse"!==i.pointerType&&"pen"!==i.pointerType||this.emit("mousemove",a)}"mouse"===e[0].pointerType&&this.setCursorMode(this.cursor)}},e.prototype.processPointerMove=function(t,e,r){var n=t.data,i="touch"===n.pointerType,o="mouse"===n.pointerType||"pen"===n.pointerType;o&&this.processPointerOverOut(t,e,r),this.moveWhenInside&&!r||(this.dispatchEvent(e,"pointermove",t),i&&this.dispatchEvent(e,"touchmove",t),o&&this.dispatchEvent(e,"mousemove",t))},e.prototype.onPointerOut=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t)[0];"mouse"===e.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var r=this.getInteractionDataForPointerId(e),n=this.configureInteractionEventForDOMEvent(this.eventData,e,r);n.data.originalEvent=e,this.processInteractive(n,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",n),"mouse"===e.pointerType||"pen"===e.pointerType?this.emit("mouseout",n):this.releaseInteractionDataForPointerId(r.identifier)}},e.prototype.processPointerOverOut=function(t,e,r){var n=t.data,i=t.data.identifier,o="mouse"===n.pointerType||"pen"===n.pointerType,a=e.trackedPointers[i];r&&!a&&(a=e.trackedPointers[i]=new s.default(i)),void 0!==a&&(r&&this.mouseOverRenderer?(a.over||(a.over=!0,this.dispatchEvent(e,"pointerover",t),o&&this.dispatchEvent(e,"mouseover",t)),o&&null===this.cursor&&(this.cursor=e.cursor)):a.over&&(a.over=!1,this.dispatchEvent(e,"pointerout",this.eventData),o&&this.dispatchEvent(e,"mouseout",t),a.none&&delete e.trackedPointers[i]))},e.prototype.onPointerOver=function(t){var e=this.normalizeToPointerData(t)[0],r=this.getInteractionDataForPointerId(e),n=this.configureInteractionEventForDOMEvent(this.eventData,e,r);n.data.originalEvent=e,"mouse"===e.pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",n),"mouse"!==e.pointerType&&"pen"!==e.pointerType||this.emit("mouseover",n)},e.prototype.getInteractionDataForPointerId=function(t){var e=t.pointerId,r=void 0;return 1===e||"mouse"===t.pointerType?r=this.mouse:this.activeInteractionData[e]?r=this.activeInteractionData[e]:((r=this.interactionDataPool.pop()||new o.default).identifier=e,this.activeInteractionData[e]=r),r.copyEvent(t),r},e.prototype.releaseInteractionDataForPointerId=function(t){var e=this.activeInteractionData[t];e&&(delete this.activeInteractionData[t],e.reset(),this.interactionDataPool.push(e))},e.prototype.configureInteractionEventForDOMEvent=function(t,e,r){return t.data=r,this.mapPositionToPoint(r.global,e.clientX,e.clientY),navigator.isCocoonJS&&"touch"===e.pointerType&&(r.global.x=r.global.x/this.resolution,r.global.y=r.global.y/this.resolution),"touch"===e.pointerType&&(e.globalX=r.global.x,e.globalY=r.global.y),r.originalEvent=e,t.reset(),t},e.prototype.normalizeToPointerData=function(t){var e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(var r=0,n=t.changedTouches.length;r<n;r++){var i=t.changedTouches[r];void 0===i.button&&(i.button=t.touches.length?1:0),void 0===i.buttons&&(i.buttons=t.touches.length?1:0),void 0===i.isPrimary&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),void 0===i.width&&(i.width=i.radiusX||1),void 0===i.height&&(i.height=i.radiusY||1),void 0===i.tiltX&&(i.tiltX=0),void 0===i.tiltY&&(i.tiltY=0),void 0===i.pointerType&&(i.pointerType="touch"),void 0===i.pointerId&&(i.pointerId=i.identifier||0),void 0===i.pressure&&(i.pressure=i.force||.5),void 0===i.twist&&(i.twist=0),void 0===i.tangentialPressure&&(i.tangentialPressure=0),void 0===i.layerX&&(i.layerX=i.offsetX=i.clientX),void 0===i.layerY&&(i.layerY=i.offsetY=i.clientY),i.isNormalized=!0,e.push(i)}else!(t instanceof MouseEvent)||this.supportsPointerEvents&&t instanceof window.PointerEvent||(void 0===t.isPrimary&&(t.isPrimary=!0),void 0===t.width&&(t.width=1),void 0===t.height&&(t.height=1),void 0===t.tiltX&&(t.tiltX=0),void 0===t.tiltY&&(t.tiltY=0),void 0===t.pointerType&&(t.pointerType="mouse"),void 0===t.pointerId&&(t.pointerId=1),void 0===t.pressure&&(t.pressure=.5),void 0===t.twist&&(t.twist=0),void 0===t.tangentialPressure&&(t.tangentialPressure=0),t.isNormalized=!0),e.push(t);return e},e.prototype.destroy=function(){this.removeEvents(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this._tempPoint=null},e}(u.default);e.default=f,i.WebGLRenderer.registerPlugin("interaction",f),i.CanvasRenderer.registerPlugin("interaction",f)},function(t,e,r){"use strict";e.__esModule=!0,e.shared=e.Resource=e.textureParser=e.getResourcePath=e.spritesheetParser=e.parseBitmapFontData=e.bitmapFontParser=e.Loader=void 0;var n=r(83);Object.defineProperty(e,"bitmapFontParser",{enumerable:!0,get:function(){return l(n).default}}),Object.defineProperty(e,"parseBitmapFontData",{enumerable:!0,get:function(){return n.parse}});var i=r(88);Object.defineProperty(e,"spritesheetParser",{enumerable:!0,get:function(){return l(i).default}}),Object.defineProperty(e,"getResourcePath",{enumerable:!0,get:function(){return i.getResourcePath}});var o=r(89);Object.defineProperty(e,"textureParser",{enumerable:!0,get:function(){return l(o).default}});var a=r(17);Object.defineProperty(e,"Resource",{enumerable:!0,get:function(){return a.Resource}});var s=l(r(70)),u=l(r(179));function l(t){return t&&t.__esModule?t:{default:t}}e.Loader=u.default;var c=new u.default;c.destroy=function(){},e.shared=c;var h=s.default.prototype;h._loader=null,Object.defineProperty(h,"loader",{get:function(){if(!this._loader){var t=this._options.sharedLoader;this._loader=t?c:new u.default}return this._loader}}),h._parentDestroy=h.destroy,h.destroy=function(t,e){this._loader&&(this._loader.destroy(),this._loader=null),this._parentDestroy(t,e)}},function(t,e,r){"use strict";e.__esModule=!0,e.Loader=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=l(r(84)),a=l(r(85)),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(86)),u=r(38);function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var h=/(#[\w-]+)?$/,f=e.Loader=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;c(this,t),this.baseUrl=r,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,r){return e._loadResource(t,r)},this._queue=s.queue(this._boundLoadResource,n),this._queue.pause(),this.resources={},this.onProgress=new o.default,this.onError=new o.default,this.onLoad=new o.default,this.onStart=new o.default,this.onComplete=new o.default;for(var i=0;i<t._defaultBeforeMiddleware.length;++i)this.pre(t._defaultBeforeMiddleware[i]);for(var a=0;a<t._defaultAfterMiddleware.length;++a)this.use(t._defaultAfterMiddleware[a])}return t.prototype.add=function(t,e,r,i){if(Array.isArray(t)){for(var o=0;o<t.length;++o)this.add(t[o]);return this}if("object"===(void 0===t?"undefined":n(t))&&(i=e||t.callback||t.onComplete,r=t,e=t.url,t=t.name||t.key||t.url),"string"!=typeof e&&(i=r,r=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");if("function"==typeof r&&(i=r,r=null),this.loading&&(!r||!r.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new u.Resource(t,e,r),"function"==typeof i&&this.resources[t].onAfterMiddleware.once(i),this.loading){for(var a=r.parentResource,s=[],l=0;l<a.children.length;++l)a.children[l].isComplete||s.push(a.children[l]);var c=a.progressChunk*(s.length+1)/(s.length+2);a.children.push(this.resources[t]),a.progressChunk=c;for(var h=0;h<s.length;++h)s[h].progressChunk=c;this.resources[t].progressChunk=c}return this._queue.push(this.resources[t]),this},t.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},t.prototype.use=function(t){return this._afterMiddleware.push(t),this},t.prototype.reset=function(){for(var t in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort()}return this.resources={},this},t.prototype.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var e=100/this._queue._tasks.length,r=0;r<this._queue._tasks.length;++r)this._queue._tasks[r].data.progressChunk=e;this._onStart(),this._queue.resume()}return this},t.prototype._prepareUrl=function(t){var e=(0,a.default)(t,{strictMode:!0}),r=void 0;if(r=e.protocol||!e.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var n=h.exec(r)[0];-1!==(r=r.substr(0,r.length-n.length)).indexOf("?")?r+="&"+this.defaultQueryString:r+="?"+this.defaultQueryString,r+=n}return r},t.prototype._loadResource=function(t,e){var r=this;t._dequeue=e,s.eachSeries(this._beforeMiddleware,(function(e,n){e.call(r,t,(function(){n(t.isComplete?{}:null)}))}),(function(){t.isComplete?r._onLoad(t):(t._onLoadBinding=t.onComplete.once(r._onLoad,r),t.load())}),!0)},t.prototype._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},t.prototype._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),s.eachSeries(this._afterMiddleware,(function(r,n){r.call(e,t,n)}),(function(){t.onAfterMiddleware.dispatch(t),e.progress=Math.min(100,e.progress+t.progressChunk),e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&e._onComplete()}),!0)},i(t,[{key:"concurrency",get:function(){return this._queue.concurrency},set:function(t){this._queue.concurrency=t}}]),t}();f._defaultBeforeMiddleware=[],f._defaultAfterMiddleware=[],f.pre=function(t){return f._defaultBeforeMiddleware.push(t),f},f.use=function(t){return f._defaultAfterMiddleware.push(t),f}},function(t,e,r){"use strict";e.__esModule=!0;var n=l(r(17)),i=r(180),o=l(r(11)),a=l(r(89)),s=l(r(88)),u=l(r(83));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,n));o.default.call(i);for(var a=0;a<e._pixiMiddleware.length;++a)i.use(e._pixiMiddleware[a]());return i.onStart.add((function(t){return i.emit("start",t)})),i.onProgress.add((function(t,e){return i.emit("progress",t,e)})),i.onError.add((function(t,e,r){return i.emit("error",t,e,r)})),i.onLoad.add((function(t,e){return i.emit("load",t,e)})),i.onComplete.add((function(t,e){return i.emit("complete",t,e)})),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.addPixiMiddleware=function(t){e._pixiMiddleware.push(t)},e.prototype.destroy=function(){this.removeAllListeners(),this.reset()},e}(n.default);for(var h in e.default=c,o.default.prototype)c.prototype[h]=o.default.prototype[h];c._pixiMiddleware=[i.blobMiddlewareFactory,a.default,s.default,u.default];var f=n.default.Resource;f.setExtensionXhrType("fnt",f.XHR_RESPONSE_TYPE.DOCUMENT)},function(t,e,r){"use strict";e.__esModule=!0,e.blobMiddlewareFactory=function(){return function(t,e){if(t.data){if(t.xhr&&t.xhrType===n.Resource.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var r=o.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=r,t.type=n.Resource.TYPE.IMAGE,void(t.data.onload=function(){o.revokeObjectURL(r),t.data.onload=null,e()})}}else{var a=t.xhr.getResponseHeader("content-type");if(a&&0===a.indexOf("image"))return t.data=new Image,t.data.src="data:"+a+";base64,"+(0,i.encodeBinary)(t.xhr.responseText),t.type=n.Resource.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}};var n=r(38),i=r(87),o=window.URL||window.webkitURL},function(t,e,r){"use strict";e.__esModule=!0;var n=r(18);Object.defineProperty(e,"Mesh",{enumerable:!0,get:function(){return l(n).default}});var i=r(182);Object.defineProperty(e,"MeshRenderer",{enumerable:!0,get:function(){return l(i).default}});var o=r(183);Object.defineProperty(e,"CanvasMeshRenderer",{enumerable:!0,get:function(){return l(o).default}});var a=r(90);Object.defineProperty(e,"Plane",{enumerable:!0,get:function(){return l(a).default}});var s=r(184);Object.defineProperty(e,"NineSlicePlane",{enumerable:!0,get:function(){return l(s).default}});var u=r(185);function l(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"Rope",{enumerable:!0,get:function(){return l(u).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=a(r(7)),o=a(r(18));r(9);function a(t){return t&&t.__esModule?t:{default:t}}var s=n.Matrix.IDENTITY,u=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.shader=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new n.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n")},e.prototype.render=function(t){var e=this.renderer,r=e.gl,a=t._texture;if(a.valid){var u=t._glDatas[e.CONTEXT_UID];u||(e.bindVao(null),(u={shader:this.shader,vertexBuffer:i.default.GLBuffer.createVertexBuffer(r,t.vertices,r.STREAM_DRAW),uvBuffer:i.default.GLBuffer.createVertexBuffer(r,t.uvs,r.STREAM_DRAW),indexBuffer:i.default.GLBuffer.createIndexBuffer(r,t.indices,r.STATIC_DRAW),vao:null,dirty:t.dirty,indexDirty:t.indexDirty,vertexDirty:t.vertexDirty}).vao=new i.default.VertexArrayObject(r).addIndex(u.indexBuffer).addAttribute(u.vertexBuffer,u.shader.attributes.aVertexPosition,r.FLOAT,!1,8,0).addAttribute(u.uvBuffer,u.shader.attributes.aTextureCoord,r.FLOAT,!1,8,0),t._glDatas[e.CONTEXT_UID]=u),e.bindVao(u.vao),t.dirty!==u.dirty&&(u.dirty=t.dirty,u.uvBuffer.upload(t.uvs)),t.indexDirty!==u.indexDirty&&(u.indexDirty=t.indexDirty,u.indexBuffer.upload(t.indices)),t.vertexDirty!==u.vertexDirty&&(u.vertexDirty=t.vertexDirty,u.vertexBuffer.upload(t.vertices)),e.bindShader(u.shader),u.shader.uniforms.uSampler=e.bindTexture(a),e.state.setBlendMode(n.utils.correctBlendMode(t.blendMode,a.baseTexture.premultipliedAlpha)),u.shader.uniforms.uTransform&&(t.uploadUvTransform?u.shader.uniforms.uTransform=t._uvTransform.mapCoord.toArray(!0):u.shader.uniforms.uTransform=s.toArray(!0)),u.shader.uniforms.translationMatrix=t.worldTransform.toArray(!0),u.shader.uniforms.uColor=n.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,u.shader.uniforms.uColor,a.baseTexture.premultipliedAlpha);var l=t.drawMode===o.default.DRAW_MODES.TRIANGLE_MESH?r.TRIANGLE_STRIP:r.TRIANGLES;u.vao.draw(l,t.indices.length,0)}},e}(n.ObjectRenderer);e.default=u,n.WebGLRenderer.registerPlugin("mesh",u)},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=r(18),a=(n=o)&&n.__esModule?n:{default:n};var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,r=e.context,n=t.worldTransform,i=e.resolution;e.roundPixels?r.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i|0,n.ty*i|0):r.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i,n.ty*i),e.context.globalAlpha=t.worldAlpha,e.setBlendMode(t.blendMode),t.drawMode===a.default.DRAW_MODES.TRIANGLE_MESH?this._renderTriangleMesh(t):this._renderTriangles(t)},t.prototype._renderTriangleMesh=function(t){for(var e=t.vertices.length/2,r=0;r<e-2;r++){var n=2*r;this._renderDrawTriangle(t,n,n+2,n+4)}},t.prototype._renderTriangles=function(t){for(var e=t.indices,r=e.length,n=0;n<r;n+=3){var i=2*e[n],o=2*e[n+1],a=2*e[n+2];this._renderDrawTriangle(t,i,o,a)}},t.prototype._renderDrawTriangle=function(t,e,r,n){var i=this.renderer.context,o=t.uvs,a=t.vertices,s=t._texture;if(s.valid){var u=s.baseTexture,l=u.source,c=u.width,h=u.height,f=void 0,d=void 0,p=void 0,v=void 0,_=void 0,g=void 0;if(t.uploadUvTransform){var y=t._uvTransform.mapCoord;f=(o[e]*y.a+o[e+1]*y.c+y.tx)*u.width,d=(o[r]*y.a+o[r+1]*y.c+y.tx)*u.width,p=(o[n]*y.a+o[n+1]*y.c+y.tx)*u.width,v=(o[e]*y.b+o[e+1]*y.d+y.ty)*u.height,_=(o[r]*y.b+o[r+1]*y.d+y.ty)*u.height,g=(o[n]*y.b+o[n+1]*y.d+y.ty)*u.height}else f=o[e]*u.width,d=o[r]*u.width,p=o[n]*u.width,v=o[e+1]*u.height,_=o[r+1]*u.height,g=o[n+1]*u.height;var m=a[e],x=a[r],E=a[n],b=a[e+1],T=a[r+1],R=a[n+1],O=t.canvasPadding/this.renderer.resolution;if(O>0){var S=O/Math.abs(t.worldTransform.a),C=O/Math.abs(t.worldTransform.d),w=(m+x+E)/3,A=(b+T+R)/3,P=m-w,M=b-A,I=Math.sqrt(P*P+M*M);m=w+P/I*(I+S),b=A+M/I*(I+C),M=T-A,x=w+(P=x-w)/(I=Math.sqrt(P*P+M*M))*(I+S),T=A+M/I*(I+C),M=R-A,E=w+(P=E-w)/(I=Math.sqrt(P*P+M*M))*(I+S),R=A+M/I*(I+C)}i.save(),i.beginPath(),i.moveTo(m,b),i.lineTo(x,T),i.lineTo(E,R),i.closePath(),i.clip();var D=f*_+v*p+d*g-_*p-v*d-f*g,L=m*_+v*E+x*g-_*E-v*x-m*g,U=f*x+m*p+d*E-x*p-m*d-f*E,N=f*_*E+v*x*p+m*d*g-m*_*p-v*d*E-f*x*g,F=b*_+v*R+T*g-_*R-v*T-b*g,j=f*T+b*p+d*R-T*p-b*d-f*R,k=f*_*R+v*T*p+b*d*g-b*_*p-v*d*R-f*T*g;i.transform(L/D,F/D,U/D,j/D,N/D,k/D),i.drawImage(l,0,0,c*u.resolution,h*u.resolution,0,0,c,h),i.restore(),this.renderer.invalidateBlendMode()}},t.prototype.renderMeshFlat=function(t){var e=this.renderer.context,r=t.vertices,n=r.length/2;e.beginPath();for(var i=1;i<n-2;++i){var o=2*i,a=r[o],s=r[o+1],u=r[o+2],l=r[o+3],c=r[o+4],h=r[o+5];e.moveTo(a,s),e.lineTo(u,l),e.lineTo(c,h)}e.fillStyle="#FF0000",e.fill(),e.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();e.default=s,i.CanvasRenderer.registerPlugin("mesh",s)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=a(r(90)),o=a(r(20));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(r,n,i,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,4,4));return s._origWidth=r.orig.width,s._origHeight=r.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=void 0!==n?n:10,s._rightWidth=void 0!==o?o:10,s._topHeight=void 0!==i?i:10,s._bottomHeight=void 0!==a?a:10,s._cachedTint=16777215,s._tintedTexture=null,s._canvasUvs=null,s.refresh(!0),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._topHeight+this._bottomHeight,r=this._height>e?1:this._height/e;t[9]=t[11]=t[13]=t[15]=this._topHeight*r,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*r,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._leftWidth+this._rightWidth,r=this._width>e?1:this._width/e;t[2]=t[10]=t[18]=t[26]=this._leftWidth*r,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*r,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._renderCanvas=function(t){var e=t.context,r=this.worldTransform,n=t.resolution,i=16777215!==this.tint,a=this._texture;i&&this._cachedTint!==this.tint&&(this._cachedTint=this.tint,this._tintedTexture=o.default.getTintedTexture(this,this.tint));var s=i?this._tintedTexture:a.baseTexture.source;this._canvasUvs||(this._canvasUvs=[0,0,0,0,0,0,0,0]);var u=this.vertices,l=this._canvasUvs,c=i?0:a.frame.x,h=i?0:a.frame.y,f=c+a.frame.width,d=h+a.frame.height;l[0]=c,l[1]=c+this._leftWidth,l[2]=f-this._rightWidth,l[3]=f,l[4]=h,l[5]=h+this._topHeight,l[6]=d-this._bottomHeight,l[7]=d;for(var p=0;p<8;p++)l[p]*=a.baseTexture.resolution;e.globalAlpha=this.worldAlpha,t.setBlendMode(this.blendMode),t.roundPixels?e.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n|0,r.ty*n|0):e.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n,r.ty*n);for(var v=0;v<3;v++)for(var _=0;_<3;_++){var g=2*_+8*v,y=Math.max(1,l[_+1]-l[_]),m=Math.max(1,l[v+5]-l[v+4]),x=Math.max(1,u[g+10]-u[g]),E=Math.max(1,u[g+11]-u[g+1]);e.drawImage(s,l[_],l[v+4],y,m,u[g],u[g+1],x,E)}},e.prototype._refresh=function(){t.prototype._refresh.call(this);var e=this.uvs,r=this._texture;this._origWidth=r.orig.width,this._origHeight=r.orig.height;var n=1/this._origWidth,i=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=n*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-n*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.dirty++,this.multiplyUvs()},n(e,[{key:"width",get:function(){return this._width},set:function(t){this._width=t,this._refresh()}},{key:"height",get:function(){return this._height},set:function(t){this._height=t,this._refresh()}},{key:"leftWidth",get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()}},{key:"rightWidth",get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()}},{key:"topHeight",get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()}},{key:"bottomHeight",get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()}}]),e}(i.default);e.default=s},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(18);var o=function(t){function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.points=n,i.vertices=new Float32Array(4*n.length),i.uvs=new Float32Array(4*n.length),i.colors=new Float32Array(2*n.length),i.indices=new Uint16Array(2*n.length),i.autoUpdate=!0,i.refresh(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){this.vertices.length/4!==t.length&&(this.vertices=new Float32Array(4*t.length),this.uvs=new Float32Array(4*t.length),this.colors=new Float32Array(2*t.length),this.indices=new Uint16Array(2*t.length));var e=this.uvs,r=this.indices,n=this.colors;e[0]=0,e[1]=0,e[2]=0,e[3]=1,n[0]=1,n[1]=1,r[0]=0,r[1]=1;for(var i=t.length,o=1;o<i;o++){var a=4*o,s=o/(i-1);e[a]=s,e[a+1]=0,e[a+2]=s,e[a+3]=1,n[a=2*o]=1,n[a+1]=1,r[a=2*o]=a,r[a+1]=a+1}this.dirty++,this.indexDirty++,this.multiplyUvs(),this.refreshVertices()}},e.prototype.refreshVertices=function(){var t=this.points;if(!(t.length<1))for(var e=t[0],r=void 0,n=0,i=0,o=this.vertices,a=t.length,s=0;s<a;s++){var u=t[s],l=4*s;i=-((r=s<t.length-1?t[s+1]:u).x-e.x),n=r.y-e.y;var c=10*(1-s/(a-1));c>1&&(c=1);var h=Math.sqrt(n*n+i*i),f=this._texture.height/2;n/=h,i/=h,n*=f,i*=f,o[l]=u.x+n,o[l+1]=u.y+i,o[l+2]=u.x-n,o[l+3]=u.y-i,e=u}},e.prototype.updateTransform=function(){this.autoUpdate&&this.refreshVertices(),this.containerUpdateTransform()},e}(((n=i)&&n.__esModule?n:{default:n}).default);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=r(187);Object.defineProperty(e,"ParticleContainer",{enumerable:!0,get:function(){return o(n).default}});var i=r(188);function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"ParticleRenderer",{enumerable:!0,get:function(){return o(i).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=r(4);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500,n=arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16384,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];a(this,e);var l=s(this,t.call(this)),c=16384;return o>c&&(o=c),o>r&&(o=r),l._properties=[!1,!0,!1,!1,!1],l._maxSize=r,l._batchSize=o,l._glBuffers={},l._bufferUpdateIDs=[],l._updateID=0,l.interactiveChildren=!1,l.blendMode=i.BLEND_MODES.NORMAL,l.autoResize=u,l.roundPixels=!0,l.baseTexture=null,l.setProperties(n),l._tint=0,l.tintRgb=new Float32Array(4),l.tint=16777215,l}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},e.prototype.renderWebGL=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",(function(){return e.onChildrenChange(0)}))),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.length<e;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[e]=++this._updateID},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var e=t.context,r=this.worldTransform,n=!0,i=0,o=0,a=0,s=0;t.setBlendMode(this.blendMode),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var u=0;u<this.children.length;++u){var l=this.children[u];if(l.visible){var c=l._texture.frame;if(e.globalAlpha=this.worldAlpha*l.alpha,l.rotation%(2*Math.PI)==0)n&&(e.setTransform(r.a,r.b,r.c,r.d,r.tx*t.resolution,r.ty*t.resolution),n=!1),i=l.anchor.x*(-c.width*l.scale.x)+l.position.x+.5,o=l.anchor.y*(-c.height*l.scale.y)+l.position.y+.5,a=c.width*l.scale.x,s=c.height*l.scale.y;else{n||(n=!0),l.displayObjectUpdateTransform();var h=l.worldTransform;t.roundPixels?e.setTransform(h.a,h.b,h.c,h.d,h.tx*t.resolution|0,h.ty*t.resolution|0):e.setTransform(h.a,h.b,h.c,h.d,h.tx*t.resolution,h.ty*t.resolution),i=l.anchor.x*-c.width+.5,o=l.anchor.y*-c.height+.5,a=c.width,s=c.height}var f=l._texture.baseTexture.resolution;e.drawImage(l._texture.baseTexture.source,c.x*f,c.y*f,c.width*f,c.height*f,i*t.resolution,o*t.resolution,a*t.resolution,s*t.resolution)}}}},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._buffers)for(var r=0;r<this._buffers.length;++r)this._buffers[r].destroy();this._properties=null,this._buffers=null,this._bufferUpdateIDs=null},n(e,[{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,(0,o.hex2rgb)(t,this.tintRgb)}}]),e}(i.Container);e.default=u},function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),i=s(r(189)),o=s(r(190)),a=r(4);function s(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.shader=null,i.indexBuffer=null,i.properties=null,i.tempMatrix=new n.Matrix,i.CONTEXT_UID=0,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.shader=new i.default(t),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,unsignedByte:!0,uploadFunction:this.uploadTint,offset:0}]},e.prototype.start=function(){this.renderer.bindShader(this.shader)},e.prototype.render=function(t){var e=t.children,r=t._maxSize,i=t._batchSize,o=this.renderer,a=e.length;if(0!==a){a>r&&(a=r);var s=t._glBuffers[o.CONTEXT_UID];s||(s=t._glBuffers[o.CONTEXT_UID]=this.generateBuffers(t));var u=e[0]._texture.baseTexture;this.renderer.setBlendMode(n.utils.correctBlendMode(t.blendMode,u.premultipliedAlpha));var l=o.gl,c=t.worldTransform.copy(this.tempMatrix);c.prepend(o._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=c.toArray(!0),this.shader.uniforms.uColor=n.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,u.premultipliedAlpha),this.shader.uniforms.uSampler=o.bindTexture(u);for(var h=!1,f=0,d=0;f<a;f+=i,d+=1){var p=a-f;if(p>i&&(p=i),d>=s.length){if(!t.autoResize)break;s.push(this._generateOneMoreBuffer(t))}var v=s[d];v.uploadDynamic(e,f,p);var _=t._bufferUpdateIDs[d]||0;(h=h||v._updateID<_)&&(v._updateID=t._updateID,v.uploadStatic(e,f,p)),o.bindVao(v.vao),v.vao.draw(l.TRIANGLES,6*p)}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,r=[],n=t._maxSize,i=t._batchSize,a=t._properties,s=0;s<n;s+=i)r.push(new o.default(e,this.properties,a,i));return r},e.prototype._generateOneMoreBuffer=function(t){var e=this.renderer.gl,r=t._batchSize,n=t._properties;return new o.default(e,this.properties,n,r)},e.prototype.uploadVertices=function(t,e,r,n,i,o){for(var a=0,s=0,u=0,l=0,c=0;c<r;++c){var h=t[e+c],f=h._texture,d=h.scale.x,p=h.scale.y,v=f.trim,_=f.orig;v?(a=(s=v.x-h.anchor.x*_.width)+v.width,u=(l=v.y-h.anchor.y*_.height)+v.height):(a=_.width*(1-h.anchor.x),s=_.width*-h.anchor.x,u=_.height*(1-h.anchor.y),l=_.height*-h.anchor.y),n[o]=s*d,n[o+1]=l*p,n[o+i]=a*d,n[o+i+1]=l*p,n[o+2*i]=a*d,n[o+2*i+1]=u*p,n[o+3*i]=s*d,n[o+3*i+1]=u*p,o+=4*i}},e.prototype.uploadPosition=function(t,e,r,n,i,o){for(var a=0;a<r;a++){var s=t[e+a].position;n[o]=s.x,n[o+1]=s.y,n[o+i]=s.x,n[o+i+1]=s.y,n[o+2*i]=s.x,n[o+2*i+1]=s.y,n[o+3*i]=s.x,n[o+3*i+1]=s.y,o+=4*i}},e.prototype.uploadRotation=function(t,e,r,n,i,o){for(var a=0;a<r;a++){var s=t[e+a].rotation;n[o]=s,n[o+i]=s,n[o+2*i]=s,n[o+3*i]=s,o+=4*i}},e.prototype.uploadUvs=function(t,e,r,n,i,o){for(var a=0;a<r;++a){var s=t[e+a]._texture._uvs;s?(n[o]=s.x0,n[o+1]=s.y0,n[o+i]=s.x1,n[o+i+1]=s.y1,n[o+2*i]=s.x2,n[o+2*i+1]=s.y2,n[o+3*i]=s.x3,n[o+3*i+1]=s.y3,o+=4*i):(n[o]=0,n[o+1]=0,n[o+i]=0,n[o+i+1]=0,n[o+2*i]=0,n[o+2*i+1]=0,n[o+3*i]=0,n[o+3*i+1]=0,o+=4*i)}},e.prototype.uploadTint=function(t,e,r,n,i,o){for(var s=0;s<r;++s){var u=t[e+s],l=u._texture.baseTexture.premultipliedAlpha,c=u.alpha,h=c<1&&l?(0,a.premultiplyTint)(u._tintRGB,c):u._tintRGB+(255*c<<24);n[o]=h,n[o+i]=h,n[o+2*i]=h,n[o+3*i]=h,o+=4*i}},e.prototype.destroy=function(){this.renderer.gl&&this.renderer.gl.deleteBuffer(this.indexBuffer),t.prototype.destroy.call(this),this.shader.destroy(),this.indices=null,this.tempMatrix=null},e}(n.ObjectRenderer);e.default=u,n.WebGLRenderer.registerPlugin("particle",u)},function(t,e,r){"use strict";e.__esModule=!0;var n,i=r(16);var o=function(t){function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","attribute vec2 aPositionCoord;","attribute float aRotation;","uniform mat3 projectionMatrix;","uniform vec4 uColor;","varying vec2 vTextureCoord;","varying vec4 vColor;","void main(void){"," float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);"," float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);"," vec2 v = vec2(x, y);"," v = v + aPositionCoord;"," gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;"," vColor = aColor * uColor;","}"].join("\n"),["varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","void main(void){"," vec4 color = texture2D(uSampler, vTextureCoord) * vColor;"," gl_FragColor = color;","}"].join("\n")))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((n=i)&&n.__esModule?n:{default:n}).default);e.default=o},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(7)),i=o(r(37));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(e,r,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(var o=0;o<r.length;++o){var a=r[o];a={attribute:a.attribute,size:a.size,uploadFunction:a.uploadFunction,unsignedByte:a.unsignedByte,offset:a.offset},n[o]?this.dynamicProperties.push(a):this.staticProperties.push(a)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}return t.prototype.initBuffers=function(){var t=this.gl,e=0;this.indices=(0,i.default)(this.size),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.dynamicStride=0;for(var r=0;r<this.dynamicProperties.length;++r){var o=this.dynamicProperties[r];o.offset=e,e+=o.size,this.dynamicStride+=o.size}var a=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(a),this.dynamicDataUint32=new Uint32Array(a),this.dynamicBuffer=n.default.GLBuffer.createVertexBuffer(t,a,t.STREAM_DRAW);var s=0;this.staticStride=0;for(var u=0;u<this.staticProperties.length;++u){var l=this.staticProperties[u];l.offset=s,s+=l.size,this.staticStride+=l.size}var c=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(c),this.staticDataUint32=new Uint32Array(c),this.staticBuffer=n.default.GLBuffer.createVertexBuffer(t,c,t.STATIC_DRAW),this.vao=new n.default.VertexArrayObject(t).addIndex(this.indexBuffer);for(var h=0;h<this.dynamicProperties.length;++h){var f=this.dynamicProperties[h];f.unsignedByte?this.vao.addAttribute(this.dynamicBuffer,f.attribute,t.UNSIGNED_BYTE,!0,4*this.dynamicStride,4*f.offset):this.vao.addAttribute(this.dynamicBuffer,f.attribute,t.FLOAT,!1,4*this.dynamicStride,4*f.offset)}for(var d=0;d<this.staticProperties.length;++d){var p=this.staticProperties[d];p.unsignedByte?this.vao.addAttribute(this.staticBuffer,p.attribute,t.UNSIGNED_BYTE,!0,4*this.staticStride,4*p.offset):this.vao.addAttribute(this.staticBuffer,p.attribute,t.FLOAT,!1,4*this.staticStride,4*p.offset)}},t.prototype.uploadDynamic=function(t,e,r){for(var n=0;n<this.dynamicProperties.length;n++){var i=this.dynamicProperties[n];i.uploadFunction(t,e,r,i.unsignedByte?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,i.offset)}this.dynamicBuffer.upload()},t.prototype.uploadStatic=function(t,e,r){for(var n=0;n<this.staticProperties.length;n++){var i=this.staticProperties[n];i.uploadFunction(t,e,r,i.unsignedByte?this.staticDataUint32:this.staticData,this.staticStride,i.offset)}this.staticBuffer.upload()},t.prototype.destroy=function(){this.dynamicProperties=null,this.dynamicBuffer.destroy(),this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer.destroy(),this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null},t}();e.default=a},function(t,e,r){"use strict";e.__esModule=!0;var n=r(192);Object.defineProperty(e,"webgl",{enumerable:!0,get:function(){return u(n).default}});var i=r(193);Object.defineProperty(e,"canvas",{enumerable:!0,get:function(){return u(i).default}});var o=r(39);Object.defineProperty(e,"BasePrepare",{enumerable:!0,get:function(){return u(o).default}});var a=r(91);Object.defineProperty(e,"CountLimiter",{enumerable:!0,get:function(){return u(a).default}});var s=r(194);function u(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"TimeLimiter",{enumerable:!0,get:function(){return u(s).default}})},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=r(39);var a=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.uploadHookHelper=n.renderer,n.registerFindHook(l),n.registerUploadHook(s),n.registerUploadHook(u),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((n=o)&&n.__esModule?n:{default:n}).default);function s(t,e){return e instanceof i.BaseTexture&&(e._glTextures[t.CONTEXT_UID]||t.textureManager.updateTexture(e),!0)}function u(t,e){return e instanceof i.Graphics&&((e.dirty||e.clearDirty||!e._webGL[t.plugins.graphics.CONTEXT_UID])&&t.plugins.graphics.updateGraphics(e),!0)}function l(t,e){return t instanceof i.Graphics&&(e.push(t),!0)}e.default=a,i.WebGLRenderer.registerPlugin("prepare",a)},function(t,e,r){"use strict";e.__esModule=!0;var n,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(3)),o=r(39),a=(n=o)&&n.__esModule?n:{default:n};var s=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.uploadHookHelper=n,n.canvas=document.createElement("canvas"),n.canvas.width=16,n.canvas.height=16,n.ctx=n.canvas.getContext("2d"),n.registerUploadHook(u),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}(a.default);function u(t,e){if(e instanceof i.BaseTexture){var r=e.source,n=0===r.width?t.canvas.width:Math.min(t.canvas.width,r.width),o=0===r.height?t.canvas.height:Math.min(t.canvas.height,r.height);return t.ctx.drawImage(r,0,0,n,o,0,0,t.canvas.width,t.canvas.height),!0}return!1}e.default=s,i.CanvasRenderer.registerPlugin("prepare",s)},function(t,e,r){"use strict";e.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.maxMilliseconds=e,this.frameStart=0}return t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds},t}();e.default=n},function(t,e){i||(i={}),Object.assign(PIXI.Container.prototype,{renderWebGL:function(t){this._activeParentLayer&&this._activeParentLayer!=t._activeLayer||(this.visible?(this.displayOrder=t.incDisplayOrder(),this.worldAlpha<=0||!this.renderable||(t._activeLayer=null,this.containerRenderWebGL(t),t._activeLayer=this._activeParentLayer)):this.displayOrder=0)},renderCanvas:function(t){this._activeParentLayer&&this._activeParentLayer!=t._activeLayer||(this.visible?(this.displayOrder=t.incDisplayOrder(),this.worldAlpha<=0||!this.renderable||(t._activeLayer=null,this.containerRenderCanvas(t),t._activeLayer=this._activeParentLayer)):this.displayOrder=0)},containerRenderWebGL:PIXI.Container.prototype.renderWebGL,containerRenderCanvas:PIXI.Container.prototype.renderCanvas}),Object.assign(PIXI.DisplayObject.prototype,{parentLayer:null,_activeParentLayer:null,parentGroup:null,zOrder:0,zIndex:0,updateOrder:0,displayOrder:0,layerableChildren:!0}),PIXI.particles&&PIXI.particles.ParticleContainer?PIXI.particles.ParticleContainer.prototype.layerableChildren=!1:PIXI.ParticleContainer&&(PIXI.ParticleContainer.prototype.layerableChildren=!1);var r,n,i,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});!function(t){var e=function(t){function e(e,r){var n=t.call(this)||this;return n._activeLayer=null,n._activeStage=null,n._activeChildren=[],n._lastUpdateId=-1,n.useRenderTexture=!1,n.useDoubleBuffer=!1,n.sortPriority=0,n.clearColor=new Float32Array([0,0,0,0]),n.canDrawWithoutLayer=!1,n.canDrawInParentStage=!0,n.zIndex=0,n.enableSort=!1,n._tempResult=[],n._tempZero=[],n.useZeroOptimization=!1,n.zIndex=e,n.enableSort=!!r,"function"==typeof r&&n.on("sort",r),n}return o(e,t),e.prototype.doSort=function(t,r){if(this.listeners("sort",!0))for(var n=0;n<r.length;n++)this.emit("sort",r[n]);this.useZeroOptimization?this.doSortWithZeroOptimization(t,r):r.sort(e.compareZIndex)},e.compareZIndex=function(t,e){return t.zIndex!==e.zIndex?t.zIndex-e.zIndex:t.zOrder>e.zOrder?-1:t.zOrder<e.zOrder?1:t.updateOrder-e.updateOrder},e.prototype.doSortWithZeroOptimization=function(t,e){throw new Error("not implemented yet")},e.prototype.clear=function(){this._activeLayer=null,this._activeStage=null,this._activeChildren.length=0},e.prototype.addDisplayObject=function(t,e){this.check(t),e._activeParentLayer=this._activeLayer,this._activeLayer?this._activeLayer._activeChildren.push(e):this._activeChildren.push(e)},e.prototype.foundLayer=function(t,r){this.check(t),null!=this._activeLayer&&e.conflict(),this._activeLayer=r,this._activeStage=t},e.prototype.foundStage=function(t){this._activeLayer||this.canDrawInParentStage||this.clear()},e.prototype.check=function(t){if(this._lastUpdateId<e._layerUpdateId)this._lastUpdateId=e._layerUpdateId,this.clear(),this._activeStage=t;else if(this.canDrawInParentStage){for(var r=this._activeStage;r&&r!=t;)r=r._activeParentStage;if(this._activeStage=r,null==r)return void this.clear()}},e.conflict=function(){e._lastLayerConflict+5e3<Date.now()&&(e._lastLayerConflict=Date.now(),console.log("PIXI-display plugin found two layers with the same group in one stage - that's not healthy. Please place a breakpoint here and debug it"))},e._layerUpdateId=0,e._lastLayerConflict=0,e}(PIXI.utils.EventEmitter);t.Group=e}(i||(i={})),i||(i={}),n=PIXI.interaction.InteractionManager,Object.assign(n.prototype,{_queue:[[],[]],_displayProcessInteractive:function(t,e,r,n,i){if(!e||!e.visible)return 0;var o=0,a=n=e.interactive||n;e.hitArea&&(a=!1),e._activeParentLayer&&(i=!1);var s=e._mask;r<1/0&&s&&(s.containsPoint(t)||(i=!0)),r<1/0&&e.filterArea&&(e.filterArea.contains(t.x,t.y)||(i=!0));var u=e.children;if(e.interactiveChildren&&u)for(var l=u.length-1;l>=0;l--){var c=u[l],h=this._displayProcessInteractive(t,c,r,a,i);if(h){if(!c.parent)continue;o=h,r=h}}return n&&(i?e.interactive&&this._queueAdd(e,0):(r<e.displayOrder&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)&&(o=e.displayOrder)):e.containsPoint&&e.containsPoint(t)&&(o=e.displayOrder)),e.interactive&&this._queueAdd(e,o===1/0?0:o))),o},processInteractive:function(t,e,r,n,i){var o=null,a=null;a=t.data&&t.data.global?(o=t).data.global:t,this._startInteractionProcess(),this._displayProcessInteractive(a,e,n?0:1/0,!1),this._finishInteractionProcess(o,r)},_startInteractionProcess:function(){this._eventDisplayOrder=1,this._queue||(this._queue=[[],[]]),this._queue[0].length=0,this._queue[1].length=0},_queueAdd:function(t,e){var r=this._queue;if(e<this._eventDisplayOrder)r[0].push(t);else{if(e>this._eventDisplayOrder){this._eventDisplayOrder=e;for(var n=r[1],i=0,o=n.length;i<o;i++)r[0].push(n[i]);r[1].length=0}r[1].push(t)}},_finishInteractionProcess:function(t,e){for(var r=this._queue,n=r[0],i=0,o=n.length;i<o;i++)t?e&&e(t,n[i],!1):e(n[i],!1);for(i=0,o=(n=r[1]).length;i<o;i++)t?(t.target||(t.target=n[i]),e&&e(t,n[i],!0)):e(n[i],!0)}}),function(t){var e=function(){function t(t){this.layer=t,this.renderTexture=null,this.doubleBuffer=null,this.currentBufferIndex=0,this._tempRenderTarget=null}return t.prototype.initRenderTexture=function(t){var e=t?t.screen.width:100,r=t?t.screen.height:100,n=t?t.resolution:PIXI.settings.RESOLUTION;this.renderTexture=PIXI.RenderTexture.create(e,r,void 0,n),this.layer.group.useDoubleBuffer&&(this.doubleBuffer=[PIXI.RenderTexture.create(e,r,void 0,n),PIXI.RenderTexture.create(e,r,void 0,n)])},t.prototype.getRenderTexture=function(){return this.renderTexture||this.initRenderTexture(),this.renderTexture},t.prototype.pushTexture=function(t){var e=t.screen;this.renderTexture||this.initRenderTexture(t);var r=this.renderTexture,n=this.layer.group,i=this.doubleBuffer;if(r.width===e.width&&r.height===e.height&&r.baseTexture.resolution===t.resolution||(r.baseTexture.resolution=t.resolution,r.resize(e.width,e.height),i&&(i[0].baseTexture.resolution=t.resolution,i[0].resize(e.width,e.height),i[1].baseTexture.resolution=t.resolution,i[1].resize(e.width,e.height))),this._tempRenderTarget=t._activeRenderTarget,t.currentRenderer.flush(),n.useDoubleBuffer){var o=i[this.currentBufferIndex];o.baseTexture._glTextures[t.CONTEXT_UID]||(t.bindRenderTexture(o,null),n.clearColor&&t.clear(n.clearColor)),t.unbindTexture(r),r.baseTexture._glTextures=o.baseTexture._glTextures,r.baseTexture._glRenderTargets=o.baseTexture._glRenderTargets,o=i[1-this.currentBufferIndex],t.bindRenderTexture(o,null)}else t.bindRenderTexture(r,void 0);n.clearColor&&t.clear(n.clearColor);var a=t.filterManager.filterData;a&&(a.stack[a.index].renderTarget=t._activeRenderTarget)},t.prototype.popTexture=function(t){t.currentRenderer.flush();var e=t.filterManager.filterData;e&&(e.stack[e.index].renderTarget=this._tempRenderTarget),t.bindRenderTarget(this._tempRenderTarget),this._tempRenderTarget=null;var r=this.renderTexture,n=this.layer.group,i=this.doubleBuffer;if(n.useDoubleBuffer){t.unbindTexture(r),this.currentBufferIndex=1-this.currentBufferIndex;var o=i[this.currentBufferIndex];r.baseTexture._glTextures=o.baseTexture._glTextures,r.baseTexture._glRenderTargets=o.baseTexture._glRenderTargets}},t.prototype.destroy=function(){this.renderTexture&&(this.renderTexture.destroy(),this.doubleBuffer&&(this.doubleBuffer[0].destroy(!0),this.doubleBuffer[1].destroy(!0)))},t}();t.LayerTextureCache=e;var r=function(r){function n(e){void 0===e&&(e=null);var n=r.call(this)||this;return n.isLayer=!0,n.group=null,n._activeChildren=[],n._tempChildren=null,n._activeStageParent=null,n._sortedChildren=[],n._tempLayerParent=null,n.insertChildrenBeforeActive=!0,n.insertChildrenAfterActive=!0,null!=e?(n.group=e,n.zIndex=e.zIndex):n.group=new t.Group(0,!1),n._tempChildren=n.children,n}return o(n,r),n.prototype.beginWork=function(t){var e=this._activeChildren;this._activeStageParent=t,this.group.foundLayer(t,this);var r=this.group._activeChildren;e.length=0;for(var n=0;n<r.length;n++)r[n]._activeParentLayer=this,e.push(r[n]);r.length=0},n.prototype.endWork=function(){for(var t=this.children,e=this._activeChildren,r=this._sortedChildren,n=0;n<e.length;n++)this.emit("display",e[n]);if(r.length=0,this.insertChildrenBeforeActive)for(n=0;n<t.length;n++)r.push(t[n]);for(n=0;n<e.length;n++)r.push(e[n]);if(!this.insertChildrenBeforeActive&&this.insertChildrenAfterActive)for(n=0;n<t.length;n++)r.push(t[n]);this.group.enableSort&&this.doSort()},Object.defineProperty(n.prototype,"useRenderTexture",{get:function(){return this.group.useRenderTexture},set:function(t){this.group.useRenderTexture=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"useDoubleBuffer",{get:function(){return this.group.useDoubleBuffer},set:function(t){this.group.useDoubleBuffer=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"clearColor",{get:function(){return this.group.clearColor},set:function(t){this.group.clearColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sortPriority",{get:function(){return this.group.sortPriority},set:function(t){this.group.sortPriority=t},enumerable:!0,configurable:!0}),n.prototype.getRenderTexture=function(){return this.textureCache||(this.textureCache=new e(this)),this.textureCache.getRenderTexture()},n.prototype.updateDisplayLayers=function(){},n.prototype.doSort=function(){this.group.doSort(this,this._sortedChildren)},n.prototype._preRender=function(t){return(!this._activeParentLayer||this._activeParentLayer==t._activeLayer)&&(this.visible?(this.displayOrder=t.incDisplayOrder(),!(this.worldAlpha<=0||!this.renderable)&&(this.children!==this._sortedChildren&&this._tempChildren!=this.children&&(this._tempChildren=this.children),this._boundsID++,this.children=this._sortedChildren,this._tempLayerParent=t._activeLayer,t._activeLayer=this,!0)):(this.displayOrder=0,!1))},n.prototype._postRender=function(t){this.children=this._tempChildren,t._activeLayer=this._tempLayerParent,this._tempLayerParent=null},n.prototype.renderWebGL=function(t){this._preRender(t)&&(this.group.useRenderTexture&&(this.textureCache||(this.textureCache=new e(this)),this.textureCache.pushTexture(t)),this.containerRenderWebGL(t),this._postRender(t),this.group.useRenderTexture&&this.textureCache.popTexture(t))},n.prototype.renderCanvas=function(t){this._preRender(t)&&(this.containerRenderCanvas(t),this._postRender(t))},n.prototype.destroy=function(t){this.textureCache&&(this.textureCache.destroy(),this.textureCache=null),r.prototype.destroy.call(this,t)},n}(PIXI.Container);t.Layer=r}(i||(i={})),i||(i={}),Object.assign(PIXI.WebGLRenderer.prototype,{_lastDisplayOrder:0,_activeLayer:null,incDisplayOrder:function(){return++this._lastDisplayOrder},_oldRender:PIXI.WebGLRenderer.prototype.render,render:function(t,e,r,n,i){e||(this._lastDisplayOrder=0),this._activeLayer=null,t.isStage&&t.updateStage(),this._oldRender(t,e,r,n,i)}}),Object.assign(PIXI.CanvasRenderer.prototype,{_lastDisplayOrder:0,_activeLayer:null,incDisplayOrder:function(){return++this._lastDisplayOrder},_oldRender:PIXI.CanvasRenderer.prototype.render,render:function(t,e,r,n,i){e||(this._lastDisplayOrder=0),this._activeLayer=null,t.isStage&&t.updateStage(),this._oldRender(t,e,r,n,i)}}),function(t){var e=function(e){function r(){var t=e.call(this)||this;return t.isStage=!0,t._tempGroups=[],t._activeLayers=[],t._activeParentStage=null,t}return o(r,e),r.prototype.clear=function(){this._activeLayers.length=0,this._tempGroups.length=0},r.prototype.destroy=function(t){this.clear(),e.prototype.destroy.call(this,t)},r.prototype._addRecursive=function(t){if(t.visible){if(t.isLayer){var e=t;this._activeLayers.push(e),e.beginWork(this)}if(t!=this&&t.isStage){t.updateAsChildStage(this)}else{var n=t.parentGroup;null!=n&&n.addDisplayObject(this,t);var i=t.parentLayer;if(null!=i&&(n=i.group).addDisplayObject(this,t),t.updateOrder=++r._updateOrderCounter,!(t.alpha<=0||!t.renderable||!t.layerableChildren||n&&n.sortPriority)){var o=t.children;if(o&&o.length)for(var a=0;a<o.length;a++)this._addRecursive(o[a])}}}},r.prototype._addRecursiveChildren=function(t){if(!(t.alpha<=0)&&t.renderable&&t.layerableChildren){var e=t.children;if(e&&e.length)for(var r=0;r<e.length;r++)this._addRecursive(e[r])}},r.prototype._updateStageInner=function(){this.clear(),this._addRecursive(this);for(var t=this._activeLayers,e=0;e<t.length;e++){if((i=t[e]).group.sortPriority){i.endWork();for(var r=i._sortedChildren,n=0;n<r.length;n++)this._addRecursiveChildren(r[n])}}for(e=0;e<t.length;e++){var i;(i=t[e]).group.sortPriority||i.endWork()}},r.prototype.updateAsChildStage=function(t){this._activeParentStage=t,r._updateOrderCounter=0,this._updateStageInner()},r.prototype.updateStage=function(){this._activeParentStage=null,t.Group._layerUpdateId++,this._updateStageInner()},r._updateOrderCounter=0,r}(t.Layer);t.Stage=e}(i||(i={})),function(t){PIXI.display=t}(i||(i={}))},function(t,e){var r,n;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],n=0;n<t.length;n+=3)for(var i=t[n]<<16|t[n+1]<<8|t[n+2],o=0;o<4;o++)8*n+6*o<=8*t.length?e.push(r.charAt(i>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,i=0;n<t.length;i=++n%4)0!=i&&e.push((r.indexOf(t.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|r.indexOf(t.charAt(n))>>>6-2*i);return e}},t.exports=n},function(t,e){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
|
|
38
15
|
/*!
|
|
39
16
|
* Determine if an object is a Buffer
|
|
40
17
|
*
|
|
41
|
-
* @author Feross Aboukhadijeh <
|
|
18
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
42
19
|
* @license MIT
|
|
43
20
|
*/
|
|
44
|
-
t.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e,r){"use strict";r.r(e);var n={};r.r(n),r.d(n,"add",function(){return B}),r.d(n,"and",function(){return H}),r.d(n,"calc",function(){return W}),r.d(n,"div",function(){return G}),r.d(n,"gt",function(){return Y}),r.d(n,"gte",function(){return z}),r.d(n,"if",function(){return V}),r.d(n,"lt",function(){return K}),r.d(n,"lte",function(){return q}),r.d(n,"max",function(){return Z}),r.d(n,"min",function(){return $}),r.d(n,"mul",function(){return J}),r.d(n,"not",function(){return Q}),r.d(n,"or",function(){return tt}),r.d(n,"processorParam",function(){return et}),r.d(n,"random",function(){return rt}),r.d(n,"rel",function(){return nt}),r.d(n,"state",function(){return it}),r.d(n,"sub",function(){return ot}),r.d(n,"concat",function(){return at});var i=r(0),o=r(8),a=r.n(o);class s extends i.utils.EventEmitter{constructor(t,e){super(),this._id=`_${i.utils.uid()}`,this.container=t,this.action=e,this._started=!1,this._ended=!1,this._active=!1}update(t){this._started||(this.emit("start",t),this._started=!0,this._active=!0);try{this._ended=this.action.update(this.container,t)}catch(t){console.error("Exception while animation:",t),this._ended=!0}this._ended&&this._active&&(this.emit("end",t),this._active=!1)}isEnded(){return this._ended}}class u{constructor(){this.actions={},this._actionsToDelete=[],this._last=0}update(t){let e;this._removeActions(),e=t||0===t?1e3*t:this._getDeltaMs(),Object.values(this.actions).forEach(({actionHandle:t})=>{t.update(e),t.isEnded()&&this._actionsToDelete.push(t)}),this._removeActions()}runAction(t,e){const r=new s(t,e);return this.actions[r._id]={actionHandle:r,container:t},r}cancelAction(t){this._actionsToDelete.push(t)}finishAction(t){this.actions[t._id]&&!this._actionsToDelete.includes(t)&&(t.action.finish(t.container),this._actionsToDelete.push(t))}cancelActionForContainer(t){Object.values(this.actions).forEach(({actionHandle:e,container:r})=>{t===r&&this._actionsToDelete.push(e)})}_remove(t){delete this.actions[t._id]}_removeActions(){if(this._actionsToDelete.length){for(let t=0;t<this._actionsToDelete.length;t+=1)this._remove(this._actionsToDelete[t]);this._actionsToDelete.length=0}}_getDeltaMs(){0===this._last&&(this._last=Date.now());const t=Date.now(),e=t-this._last;return this._last=t,e}}class l{reset(){}update(){throw new Error("Override me!")}finish(){this.reset()}}class c extends l{constructor(t){super(),this.time=1e3*t}reset(){this.restTime=this.time}update(t,e){return this.restTime-=e,this.restTime<=0&&(this.finish(t),!0)}}class h extends c{constructor(t,e){super(e),this.alpha=t,this.reset()}update(t,e){const{alpha:r}=t;return t.alpha+=(this.alpha-r)/this.restTime*e,super.update(t,e)}finish(t){t.alpha=this.alpha,super.finish(t)}}class f extends c{constructor(t,e=0){super(e),this.func=t||(()=>{}),this.reset()}update(t,e){return this.func(t,this.restTime,e),super.update(t,e)}}class d extends c{constructor(t){super(t),this.reset()}}const p=t=>e=>Math.pow(e,t),_=t=>e=>1-Math.abs(Math.pow(e-1,t)),v=t=>e=>e<.5?p(t)(2*e)/2:_(t)(2*e-1)/2+.5,g=v(1),y=p(2),m=_(2),E=v(2),x=p(3),b=_(3),T=v(3),R=p(4),O=_(4),S=v(4),w=p(5),C=_(5),A=v(5);class I extends l{constructor(t,e=m){if(super(),this.time=t.time,this.action=t,"string"!=typeof e)this.easeType=e;else if(this.easeType=I.TYPE[e],!this.easeType)throw new Error(`Wrong easeType ${e}`);this.reset()}reset(){this.originialTimePassed=0,this.timePassed=0,this.action.reset(),super.reset()}update(t,e){this.originialTimePassed+=e;const r=this.originialTimePassed<=this.time?Math.max(this.time*this.easeType(this.originialTimePassed/this.time)-this.timePassed,0):e;this.timePassed+=r;const n=this.action.update(t,r);return n&&this.finish(t),n}finish(t){this.action.finish(t),super.finish(t)}}I.TYPE={LINEAR:g,EASE_IN_QUAD:y,EASE_OUT_QUAD:m,EASE_IN_OUT_QUAD:E,EASE_IN_CUBIC:x,EASE_OUT_CUBIC:b,EASE_IN_OUT_CUBIC:T,EASE_IN_QUART:R,EASE_OUT_QUART:O,EASE_IN_OUT_QUART:S,EASE_IN_QUINT:w,EASE_OUT_QUINT:C,EASE_IN_OUT_QUINT:A};class P extends c{constructor(t){super(t),this.alpha=0,this.reset()}update(t,e){const{alpha:r}=t;return t.alpha+=(this.alpha-r)/this.restTime*e,super.update(t,e)}finish(t){t.alpha=this.alpha}}class M extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}reset(){super.reset(),this.tx=null,this.ty=null}update(t,e){const r=t.position;null!==this.tx&&null!==this.ty||(this.tx=r.x+this.x,this.ty=r.y+this.y);const n=(this.tx-r.x)/this.restTime*e,i=(this.ty-r.y)/this.restTime*e;return t.x+=n,t.y+=i,super.update(t,e)}finish(t){t.x=this.tx,t.y=this.ty,super.finish(t)}}class D extends l{constructor(t,e){super(),this.action=t,this.count=e,this.reset()}reset(){this._count=this.count,this._count||(this._count=1/0)}update(t,e){return this.action.update(t,e)&&(this.action.reset(),this._count-=1),this._count<=0&&(this.finish(t),!0)}}class L extends c{constructor(t,e){super(e),this.rotation=t,this.reset()}update(t,e){const{rotation:r}=t;for(;this.rotation-r>Math.PI;)this.rotation-=2*Math.PI;for(;this.rotation-r<-Math.PI;)this.rotation+=2*Math.PI;return t.rotation+=(this.rotation-r)/this.restTime*e,super.update(t,e)}finish(t){t.rotation=this.rotation,super.finish(t)}}class U extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}update(t,e){const{scale:r}=t,n=(this.x-r.x)/this.restTime*e,i=(this.y-r.y)/this.restTime*e;return t.scale.x+=n,t.scale.y+=i,super.update(t,e)}finish(t){t.scale.x=this.x,t.scale.y=this.y,super.finish(t)}}class N extends l{constructor(t){super(),this.actions=t,this.reset()}reset(){this._index=0}update(t,e){if(this._index>=this.actions.length)return!0;const r=this.actions[this._index];return r.update(t,e)&&(r.reset(),this._index+=1),!1}}class F extends l{constructor(t){super(),this.actions=t,this.reset()}reset(){this.actionsToRun=[].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(this.actions))}update(t,e){return this.actionsToRun=this.actionsToRun.filter(r=>{return!r.update(t,e)||(r.reset(),!1)}),0===this.actionsToRun.length&&(this.finish(t),!0)}}class j extends c{constructor(t,e){super(e),this.tint=t,this.reset()}update(t,e){return t.tint=this._interpolateColor(t.tint,this.tint,e),super.update(t,e)}finish(t){t.tint=this.tint,super.finish(t)}_interpolateColor(t,e,r){const n=j._getRGB(t),i=j._getRGB(e),o={};return o.r=n.r+(i.r-n.r)/this.restTime*r,o.g=n.g+(i.g-n.g)/this.restTime*r,o.b=n.b+(i.b-n.b)/this.restTime*r,j._packRGB(o)}static _getRGB(t){return{r:t>>>16,g:(65280&t)>>>8,b:255&t}}static _packRGB({r:t,g:e,b:r}){return t<<16|e<<8|r}}var k={ActionManager:u,AlphaBy:class extends c{constructor(t,e){super(e),this.alpha=t,this.reset()}reset(){super.reset(),this.talpha=null}update(t,e){const{alpha:r}=t;return null===this.talpha&&(this.talpha=r+this.alpha),t.alpha+=(this.talpha-r)/this.restTime*e,super.update(t,e)}finish(t){t.alpha=this.talpha,super.finish(t)}},AlphaTo:h,Blink:class extends c{constructor(t,e){super(e),this.count=t,this.reset()}reset(){this._count=2*this.count,this._gap=this.time/this._count,super.reset()}update(t,e){return this.restTime<=0?(t.visible=!t.visible,this.restTime=this._gap,this._count-=1):this.restTime-=e,this._count<=0&&(this.finish(t),!0)}},CallFunc:f,DelayTime:d,Ease:I,FadeIn:class extends c{constructor(t){super(t),this.alpha=1,this.reset()}update(t,e){const{alpha:r}=t;return t.alpha+=(this.alpha-r)/this.restTime*e,super.update(t,e)}finish(t){t.alpha=this.alpha}},FadeOut:P,FilterTo:class extends c{constructor(t,e,r,n){super(n),this.filterIdx=t,this.propName=e,this.propValue=r,this.reset()}update(t,e){const r=t.filters[this.filterIdx][this.propName];return t.filters[this.filterIdx][this.propName]+=(this.propValue-r)/this.restTime*e,super.update(t,e)}finish(t){t.filters[this.filterIdx][this.propName]=this.propValue,super.finish(t)}},MoveBy:M,MoveTo:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}update(t,e){const r=t.position,n=(this.x-r.x)/this.restTime*e,i=(this.y-r.y)/this.restTime*e;return t.x+=n,t.y+=i,super.update(t,e)}finish(t){t.x=this.x,t.y=this.y,super.finish(t)}},PivotBy:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}reset(){super.reset(),this.tx=null,this.ty=null}update(t,e){const{pivot:r}=t;null!==this.tx&&null!==this.ty||(this.tx=r.x+this.x,this.ty=r.y+this.y);const n=(this.tx-r.x)/this.restTime*e,i=(this.ty-r.y)/this.restTime*e;return t.pivot.x+=n,t.pivot.y+=i,super.update(t,e)}finish(t){t.pivot.x=this.tx,t.pivot.y=this.ty,super.finish(t)}},PivotTo:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}update(t,e){const{pivot:r}=t,n=(this.x-r.x)/this.restTime*e,i=(this.y-r.y)/this.restTime*e;return t.pivot.x+=n,t.pivot.y+=i,super.update(t,e)}finish(t){t.pivot.x=this.x,t.pivot.y=this.y,super.finish(t)}},Repeat:D,RotateBy:class extends c{constructor(t,e){super(e),this.rotation=t,this.reset()}reset(){super.reset(),this.trotation=null}update(t,e){const{rotation:r}=t;return null===this.trotation&&(this.trotation=r+this.rotation),t.rotation+=(this.trotation-r)/this.restTime*e,super.update(t,e)}finish(t){t.rotation=this.trotation,super.finish(t)}},RotateTo:L,ScaleBy:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}reset(){super.reset(),this.tx=null,this.ty=null}update(t,e){const{scale:r}=t;null!==this.tx&&null!==this.ty||(this.tx=r.x+this.x,this.ty=r.y+this.y);const n=(this.tx-r.x)/this.restTime*e,i=(this.ty-r.y)/this.restTime*e;return t.scale.x+=n,t.scale.y+=i,super.update(t,e)}finish(t){t.scale.x=this.tx,t.scale.y=this.ty,super.finish(t)}},ScaleTo:U,Sequence:N,SkewBy:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}reset(){super.reset(),this.tx=null,this.ty=null}update(t,e){const{skew:r}=t;null!==this.tx&&null!==this.ty||(this.tx=r.x+this.x,this.ty=r.y+this.y);const n=(this.tx-r.x)/this.restTime*e,i=(this.ty-r.y)/this.restTime*e;return t.skew.x+=n,t.skew.y+=i,super.update(t,e)}finish(t){t.skew.x=this.tx,t.skew.y=this.ty,super.finish(t)}},SkewTo:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}update(t,e){const{skew:r}=t,n=(this.x-r.x)/this.restTime*e,i=(this.y-r.y)/this.restTime*e;return t.skew.x+=n,t.skew.y+=i,super.update(t,e)}finish(t){t.skew.x=this.x,t.skew.y=this.y,super.finish(t)}},Spawn:F,TintBy:class extends c{constructor(t,e){super(e),this.tint=t,this.reset()}reset(){super.reset(),this.ttint=null}update(t,e){const{tint:r}=t;return null===this.ttint&&(this.ttint=r+this.tint),t.tint+=(this.ttint-r)/this.restTime*e,super.update(t,e)}finish(t){t.tint=this.ttint,super.finish(t)}},TintTo:j},B=t=>{let e=0;return t.forEach(t=>{e+=t}),e},H=t=>t.every(t=>t),X=function(t,e){if(!t||"^"===e)return t;const r=(e=(e=e.replace(/\[(\w+)]/g,".$1")).replace(/^\./,"")).split(".");for(;r.length&&t;){const e=r.shift();if(!(e in t))return;t=t[e]}return t},W=(t,{default:e,koef:r=1},n)=>{let i=X(n.calcs,t);return void 0===i&&(i=e),"number"==typeof i?r*i:i},G=([t,e])=>t/e,Y=([t,e])=>t>e,z=([t,e])=>t>=e,V=(t,{then:e=!0,else:r=!1})=>t?e:r,K=([t,e])=>t<e,q=([t,e])=>t<=e;var Z=t=>Math.max.apply(Math,function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(t));var $=t=>Math.min.apply(Math,function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(t)),J=t=>{let e=1;return t.forEach(t=>{e*=t}),e},Q=t=>!t,tt=t=>t.some(t=>t),et=(t,{default:e,koef:r=1},n)=>{let i=X(n,t);return void 0===i&&(i=e),"number"==typeof i?r*i:i},rt=t=>Math.random()*t,nt=(t,{default:e,koef:r=1},n)=>{let i=X(n.target||n.renderData,t);return void 0===i&&(i=e),"number"==typeof i?r*i:i},it=(t,{default:e,koef:r=1},n)=>{let i=X(n.state,t);return void 0===i&&(i=e),"number"==typeof i?r*i:i},ot=([t,...e])=>{let r=t;return e.forEach(t=>{r-=t}),r},at=t=>{let e="";return t.forEach(t=>{e+=t}),e};function st(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var ut={createAction({action:t,params:e},r){const n=k[t],i=this.parseExpressions(e,r);return new(Function.prototype.bind.apply(n,[null].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(i))))},parseExpressions(t,e){return t.map(t=>this.parseExpression(t,e))},parseExpression(t,e){if("function"==typeof t)return t(e);if(null===t||void 0===t)return t;if(Array.isArray(t))return this.parseExpressions(t,e);{const r=Object.keys(n).find(e=>Object.keys(t).includes(`$${e}`));if(r){const{[`$${r}`]:i}=t,o=st(t,[`$${r}`]);return n[r](this.parseExpression(i,e),this.parseExpression(o,e),e)}return t.action?this.createAction(t,e):"object"==typeof t?this.parseObjectValues(t,e):t}},parseObjectValues(t,e){const r={};return Object.entries(t).map(([t,r])=>[t,this.parseExpression(r,e)]).forEach(([t,e])=>{r[t]=e}),r},compileExpressions(t){const e=t.map(t=>this.compileExpression(t));return t=>e.map(e=>e(t))},compileExpression(t){if(null===t||void 0===t)return()=>t;if(Array.isArray(t))return this.compileExpressions(t);{const e=Object.keys(n).find(e=>Object.keys(t).includes(`$${e}`));if(e){const{[`$${e}`]:r}=t,i=st(t,[`$${e}`]);return function(t,e,r){return n=>t(e(n),r(n),n)}(n[e],this.compileExpression(r),this.compileExpression(i))}return"object"==typeof t?this.compileObjectValues(t):()=>t}},compileObjectValues(t){const e=Object.entries(t).map(([t,e])=>[t,this.compileExpression(e)]),r={};return t=>(e.forEach(([e,n])=>{r[e]="function"==typeof n?n(t):n}),r)},addTickerHandler(t,e){function r(t){try{e(t)}catch(t){i.ticker.shared.remove(r)}}i.ticker.shared.add(r),t.on("removed",()=>i.ticker.shared.remove(r))},alignPositionToPixels(t,e){t._position||(t._position=new i.Point(t.x,t.y)),t.position.copy(t._position);const r=t.getBounds();t.x+=(Math.round(r.x)-r.x)/e.scale.x,t.y+=(Math.round(r.y)-r.y)/e.scale.y},onTextureLoaded(t,e){t.baseTexture.hasLoaded?e():t.baseTexture.once("loaded",e)},enableTextureMipmap(t,e){t.bindTexture(e,!1,0);const r=e._glTextures[t.CONTEXT_UID];r.enableMipmap(),r.enableLinearScaling()},setSvgResizeHandler(t,e,r){if(r.scaledSvgTextures){const n=()=>{const n=t.app.stage.scale.x*t.options.VIEW_BOX;let i=r.scaledSvgTextures[n];if(!i){const t=Object.keys(r.scaledSvgTextures);i=r.scaledSvgTextures[t[t.length-1]]}this.onTextureLoaded(i,()=>{try{e.texture=i,e._parsedWidth&&e._parsedHeight&&(e.scale.x=e._parsedWidth/i.width,e.scale.y=e._parsedHeight/i.height)}catch(t){}})};t.app.renderer.on("_resized",n),e.on("removed",()=>t.app.renderer.off("_resized",n)),n()}}};r(195);
|
|
45
|
-
/*!
|
|
46
|
-
* pixi-filters - v2.0.1
|
|
47
|
-
* Compiled Tue, 12 Sep 2017 17:14:10 UTC
|
|
48
|
-
*
|
|
49
|
-
* pixi-filters is licensed under the MIT License.
|
|
50
|
-
* http://www.opensource.org/licenses/mit-license
|
|
51
|
-
*/
|
|
52
|
-
if("undefined"==typeof PIXI||void 0===PIXI.filters)throw"PixiJS is required";
|
|
53
|
-
/*!
|
|
54
|
-
* @pixi/filter-ascii - v2.0.1
|
|
55
|
-
* Compiled Tue, 12 Sep 2017 17:13:54 UTC
|
|
56
|
-
*
|
|
57
|
-
* pixi-filters is licensed under the MIT License.
|
|
58
|
-
* http://www.opensource.org/licenses/mit-license
|
|
59
|
-
*/var lt="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",ct="varying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform float pixelSize;\nuniform sampler2D uSampler;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n return floor( coord / size ) * size;\n}\n\nvec2 getMod(vec2 coord, vec2 size)\n{\n return mod( coord , size) / size;\n}\n\nfloat character(float n, vec2 p)\n{\n p = floor(p*vec2(4.0, -4.0) + 2.5);\n if (clamp(p.x, 0.0, 4.0) == p.x && clamp(p.y, 0.0, 4.0) == p.y)\n {\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\n }\n return 0.0;\n}\n\nvoid main()\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n // get the rounded color..\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\n pixCoord = unmapCoord(pixCoord);\n\n vec4 color = texture2D(uSampler, pixCoord);\n\n // determine the character to use\n float gray = (color.r + color.g + color.b) / 3.0;\n\n float n = 65536.0; // .\n if (gray > 0.2) n = 65600.0; // :\n if (gray > 0.3) n = 332772.0; // *\n if (gray > 0.4) n = 15255086.0; // o\n if (gray > 0.5) n = 23385164.0; // &\n if (gray > 0.6) n = 15252014.0; // 8\n if (gray > 0.7) n = 13199452.0; // @\n if (gray > 0.8) n = 11512810.0; // #\n\n // get the mod..\n vec2 modd = getMod(coord, vec2(pixelSize));\n\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\n\n}",ht=function(t){function e(e){void 0===e&&(e=8),t.call(this,lt,ct),this.size=e}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={size:{}};return r.size.get=function(){return this.uniforms.pixelSize},r.size.set=function(t){this.uniforms.pixelSize=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.AsciiFilter=ht;
|
|
60
|
-
/*!
|
|
61
|
-
* @pixi/filter-bloom - v2.0.1
|
|
62
|
-
* Compiled Tue, 12 Sep 2017 17:13:54 UTC
|
|
63
|
-
*
|
|
64
|
-
* pixi-filters is licensed under the MIT License.
|
|
65
|
-
* http://www.opensource.org/licenses/mit-license
|
|
66
|
-
*/
|
|
67
|
-
var ft=PIXI.filters,dt=ft.BlurXFilter,pt=ft.BlurYFilter,_t=ft.VoidFilter,vt=function(t){function e(e){void 0===e&&(e=2),t.call(this),this.blurXFilter=new dt,this.blurYFilter=new pt,this.blurYFilter.blendMode=PIXI.BLEND_MODES.SCREEN,this.defaultFilter=new _t,"number"==typeof e?this.blur=e:e instanceof PIXI.Point&&(this.blurX=e.x,this.blurY=e.y)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={blur:{},blurX:{},blurY:{}};return e.prototype.apply=function(t,e,r){var n=t.getRenderTarget(!0);this.defaultFilter.apply(t,e,r),this.blurXFilter.apply(t,e,n),this.blurYFilter.apply(t,n,r),t.returnRenderTarget(n)},r.blur.get=function(){return this.blurXFilter.blur},r.blur.set=function(t){this.blurXFilter.blur=this.blurYFilter.blur=t},r.blurX.get=function(){return this.blurXFilter.blur},r.blurX.set=function(t){this.blurXFilter.blur=t},r.blurY.get=function(){return this.blurYFilter.blur},r.blurY.set=function(t){this.blurYFilter.blur=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.BloomFilter=vt;
|
|
21
|
+
t.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e,r){"use strict";r.r(e),r.d(e,"GameRenderer",(function(){return nr})),r.d(e,"PIXI",(function(){return ir}));var n={};r.r(n),r.d(n,"add",(function(){return H})),r.d(n,"and",(function(){return W})),r.d(n,"calc",(function(){return X})),r.d(n,"div",(function(){return z})),r.d(n,"eq",(function(){return Y})),r.d(n,"gt",(function(){return V})),r.d(n,"gte",(function(){return K})),r.d(n,"if",(function(){return q})),r.d(n,"lt",(function(){return Z})),r.d(n,"lte",(function(){return $})),r.d(n,"max",(function(){return Q})),r.d(n,"min",(function(){return J})),r.d(n,"mul",(function(){return tt})),r.d(n,"not",(function(){return et})),r.d(n,"or",(function(){return rt})),r.d(n,"processorParam",(function(){return nt})),r.d(n,"random",(function(){return it})),r.d(n,"rel",(function(){return ot})),r.d(n,"state",(function(){return at})),r.d(n,"sub",(function(){return st})),r.d(n,"concat",(function(){return ut}));var i=r(0),o=r(8),a=r.n(o);class s extends i.utils.EventEmitter{constructor(t,e){super(),this._id="_"+i.utils.uid(),this.container=t,this.action=e,this._started=!1,this._ended=!1,this._active=!1}update(t){this._started||(this.emit("start",t),this._started=!0,this._active=!0);try{this._ended=this.action.update(this.container,t)}catch(t){console.error("Exception while animation:",t),this._ended=!0}this._ended&&this._active&&(this.emit("end",t),this._active=!1)}isEnded(){return this._ended}}class u{constructor(){this.actions={},this._actionsToDelete=[],this._last=0}update(t){let e;this._removeActions(),e=t||0===t?1e3*t:this._getDeltaMs(),Object.values(this.actions).forEach(({actionHandle:t})=>{t.update(e),t.isEnded()&&this._actionsToDelete.push(t)}),this._removeActions()}runAction(t,e){const r=new s(t,e);return this.actions[r._id]={actionHandle:r,container:t},r}cancelAction(t){this._actionsToDelete.push(t)}finishAction(t){this.actions[t._id]&&!this._actionsToDelete.includes(t)&&(t.action.finish(t.container),this._actionsToDelete.push(t))}cancelActionForContainer(t){Object.values(this.actions).forEach(({actionHandle:e,container:r})=>{t===r&&this._actionsToDelete.push(e)})}_remove(t){delete this.actions[t._id]}_removeActions(){if(this._actionsToDelete.length){for(let t=0;t<this._actionsToDelete.length;t+=1)this._remove(this._actionsToDelete[t]);this._actionsToDelete.length=0}}_getDeltaMs(){0===this._last&&(this._last=Date.now());const t=Date.now(),e=t-this._last;return this._last=t,e}}class l{reset(){}update(){throw new Error("Override me!")}finish(){this.reset()}}class c extends l{constructor(t){super(),this.time=1e3*t}reset(){this.restTime=this.time}update(t,e){return this.restTime-=e,this.restTime<=0&&(this.finish(t),!0)}}class h extends c{constructor(t,e){super(e),this.alpha=t,this.reset()}update(t,e){const{alpha:r}=t;return t.alpha+=(this.alpha-r)/this.restTime*e,super.update(t,e)}finish(t){t.alpha=this.alpha,super.finish(t)}}class f extends c{constructor(t,e=0){super(e),this.func=t||(()=>{}),this.reset()}update(t,e){return this.func(t,this.restTime,e),super.update(t,e)}}class d extends c{constructor(t){super(t),this.reset()}}const p=t=>e=>Math.pow(e,t),v=t=>e=>1-Math.abs(Math.pow(e-1,t)),_=t=>e=>e<.5?p(t)(2*e)/2:v(t)(2*e-1)/2+.5,g=_(1),y=p(2),m=v(2),x=_(2),E=p(3),b=v(3),T=_(3),R=p(4),O=v(4),S=_(4),C=p(5),w=v(5),A=_(5);class P extends l{constructor(t,e=m){if(super(),this.time=t.time,this.action=t,"string"!=typeof e)this.easeType=e;else if(this.easeType=P.TYPE[e],!this.easeType)throw new Error("Wrong easeType "+e);this.reset()}reset(){this.originialTimePassed=0,this.timePassed=0,this.action.reset(),super.reset()}update(t,e){this.originialTimePassed+=e;const r=this.originialTimePassed<=this.time?Math.max(this.time*this.easeType(this.originialTimePassed/this.time)-this.timePassed,0):e;this.timePassed+=r;const n=this.action.update(t,r);return n&&this.finish(t),n}finish(t){this.action.finish(t),super.finish(t)}}P.TYPE={LINEAR:g,EASE_IN_QUAD:y,EASE_OUT_QUAD:m,EASE_IN_OUT_QUAD:x,EASE_IN_CUBIC:E,EASE_OUT_CUBIC:b,EASE_IN_OUT_CUBIC:T,EASE_IN_QUART:R,EASE_OUT_QUART:O,EASE_IN_OUT_QUART:S,EASE_IN_QUINT:C,EASE_OUT_QUINT:w,EASE_IN_OUT_QUINT:A};var M=P;class I extends c{constructor(t){super(t),this.alpha=0,this.reset()}update(t,e){const{alpha:r}=t;return t.alpha+=(this.alpha-r)/this.restTime*e,super.update(t,e)}finish(t){t.alpha=this.alpha}}class D extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}reset(){super.reset(),this.tx=null,this.ty=null}update(t,e){const r=t.position;null!==this.tx&&null!==this.ty||(this.tx=r.x+this.x,this.ty=r.y+this.y);const n=(this.tx-r.x)/this.restTime*e,i=(this.ty-r.y)/this.restTime*e;return t.x+=n,t.y+=i,super.update(t,e)}finish(t){t.x=this.tx,t.y=this.ty,super.finish(t)}}class L extends l{constructor(t,e){super(),this.action=t,this.count=e,this.reset()}reset(){this._count=this.count,this._count||(this._count=1/0)}update(t,e){return this.action.update(t,e)&&(this.action.reset(),this._count-=1),this._count<=0&&(this.finish(t),!0)}}class U extends c{constructor(t,e){super(e),this.rotation=t,this.reset()}update(t,e){const{rotation:r}=t;for(;this.rotation-r>Math.PI;)this.rotation-=2*Math.PI;for(;this.rotation-r<-Math.PI;)this.rotation+=2*Math.PI;return t.rotation+=(this.rotation-r)/this.restTime*e,super.update(t,e)}finish(t){t.rotation=this.rotation,super.finish(t)}}class N extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}update(t,e){const{scale:r}=t,n=(this.x-r.x)/this.restTime*e,i=(this.y-r.y)/this.restTime*e;return t.scale.x+=n,t.scale.y+=i,super.update(t,e)}finish(t){t.scale.x=this.x,t.scale.y=this.y,super.finish(t)}}class F extends l{constructor(t){super(),this.actions=t,this.reset()}reset(){this._index=0}update(t,e){if(this._index>=this.actions.length)return!0;const r=this.actions[this._index];return r.update(t,e)&&(r.reset(),this._index+=1),!1}}class j extends l{constructor(t){super(),this.actions=t,this.reset()}reset(){this.actionsToRun=[].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(this.actions))}update(t,e){return this.actionsToRun=this.actionsToRun.filter(r=>!r.update(t,e)||(r.reset(),!1)),0===this.actionsToRun.length&&(this.finish(t),!0)}}class k extends c{constructor(t,e){super(e),this.tint=t,this.reset()}update(t,e){return t.tint=this._interpolateColor(t.tint,this.tint,e),super.update(t,e)}finish(t){t.tint=this.tint,super.finish(t)}_interpolateColor(t,e,r){const n=k._getRGB(t),i=k._getRGB(e),o={};return o.r=n.r+(i.r-n.r)/this.restTime*r,o.g=n.g+(i.g-n.g)/this.restTime*r,o.b=n.b+(i.b-n.b)/this.restTime*r,k._packRGB(o)}static _getRGB(t){return{r:t>>>16,g:(65280&t)>>>8,b:255&t}}static _packRGB({r:t,g:e,b:r}){return t<<16|e<<8|r}}var B={ActionManager:u,AlphaBy:class extends c{constructor(t,e){super(e),this.alpha=t,this.reset()}reset(){super.reset(),this.talpha=null}update(t,e){const{alpha:r}=t;return null===this.talpha&&(this.talpha=r+this.alpha),t.alpha+=(this.talpha-r)/this.restTime*e,super.update(t,e)}finish(t){t.alpha=this.talpha,super.finish(t)}},AlphaTo:h,Blink:class extends c{constructor(t,e){super(e),this.count=t,this.reset()}reset(){this._count=2*this.count,this._gap=this.time/this._count,super.reset()}update(t,e){return this.restTime<=0?(t.visible=!t.visible,this.restTime=this._gap,this._count-=1):this.restTime-=e,this._count<=0&&(this.finish(t),!0)}},CallFunc:f,DelayTime:d,Ease:M,FadeIn:class extends c{constructor(t){super(t),this.alpha=1,this.reset()}update(t,e){const{alpha:r}=t;return t.alpha+=(this.alpha-r)/this.restTime*e,super.update(t,e)}finish(t){t.alpha=this.alpha}},FadeOut:I,FilterTo:class extends c{constructor(t,e,r,n){super(n),this.filterIdx=t,this.propName=e,this.propValue=r,this.reset()}update(t,e){const r=t.filters[this.filterIdx][this.propName];return t.filters[this.filterIdx][this.propName]+=(this.propValue-r)/this.restTime*e,super.update(t,e)}finish(t){t.filters[this.filterIdx][this.propName]=this.propValue,super.finish(t)}},MoveBy:D,MoveTo:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}update(t,e){const r=t.position,n=(this.x-r.x)/this.restTime*e,i=(this.y-r.y)/this.restTime*e;return t.x+=n,t.y+=i,super.update(t,e)}finish(t){t.x=this.x,t.y=this.y,super.finish(t)}},PivotBy:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}reset(){super.reset(),this.tx=null,this.ty=null}update(t,e){const{pivot:r}=t;null!==this.tx&&null!==this.ty||(this.tx=r.x+this.x,this.ty=r.y+this.y);const n=(this.tx-r.x)/this.restTime*e,i=(this.ty-r.y)/this.restTime*e;return t.pivot.x+=n,t.pivot.y+=i,super.update(t,e)}finish(t){t.pivot.x=this.tx,t.pivot.y=this.ty,super.finish(t)}},PivotTo:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}update(t,e){const{pivot:r}=t,n=(this.x-r.x)/this.restTime*e,i=(this.y-r.y)/this.restTime*e;return t.pivot.x+=n,t.pivot.y+=i,super.update(t,e)}finish(t){t.pivot.x=this.x,t.pivot.y=this.y,super.finish(t)}},Repeat:L,RotateBy:class extends c{constructor(t,e){super(e),this.rotation=t,this.reset()}reset(){super.reset(),this.trotation=null}update(t,e){const{rotation:r}=t;return null===this.trotation&&(this.trotation=r+this.rotation),t.rotation+=(this.trotation-r)/this.restTime*e,super.update(t,e)}finish(t){t.rotation=this.trotation,super.finish(t)}},RotateTo:U,ScaleBy:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}reset(){super.reset(),this.tx=null,this.ty=null}update(t,e){const{scale:r}=t;null!==this.tx&&null!==this.ty||(this.tx=r.x+this.x,this.ty=r.y+this.y);const n=(this.tx-r.x)/this.restTime*e,i=(this.ty-r.y)/this.restTime*e;return t.scale.x+=n,t.scale.y+=i,super.update(t,e)}finish(t){t.scale.x=this.tx,t.scale.y=this.ty,super.finish(t)}},ScaleTo:N,Sequence:F,SkewBy:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}reset(){super.reset(),this.tx=null,this.ty=null}update(t,e){const{skew:r}=t;null!==this.tx&&null!==this.ty||(this.tx=r.x+this.x,this.ty=r.y+this.y);const n=(this.tx-r.x)/this.restTime*e,i=(this.ty-r.y)/this.restTime*e;return t.skew.x+=n,t.skew.y+=i,super.update(t,e)}finish(t){t.skew.x=this.tx,t.skew.y=this.ty,super.finish(t)}},SkewTo:class extends c{constructor(t,e,r){super(r),this.x=t,this.y=e,this.reset()}update(t,e){const{skew:r}=t,n=(this.x-r.x)/this.restTime*e,i=(this.y-r.y)/this.restTime*e;return t.skew.x+=n,t.skew.y+=i,super.update(t,e)}finish(t){t.skew.x=this.x,t.skew.y=this.y,super.finish(t)}},Spawn:j,TintBy:class extends c{constructor(t,e){super(e),this.tint=t,this.reset()}reset(){super.reset(),this.ttint=null}update(t,e){const{tint:r}=t;return null===this.ttint&&(this.ttint=r+this.tint),t.tint+=(this.ttint-r)/this.restTime*e,super.update(t,e)}finish(t){t.tint=this.ttint,super.finish(t)}},TintTo:k},H=t=>{let e=0;return t.forEach(t=>{e+=t}),e},W=t=>t.every(t=>t),G=function(t,e){if(!t||"^"===e)return t;const r=(e=(e=e.replace(/\[(\w+)]/g,".$1")).replace(/^\./,"")).split(".");for(;r.length&&t;){const e=r.shift();if(!(e in t))return;t=t[e]}return t},X=(t,{default:e,koef:r=1},n)=>{let i=G(n.calcs,t);return void 0===i&&(i=e),"number"==typeof i?r*i:i},z=([t,e])=>t/e,Y=([t,e])=>t==e,V=([t,e])=>t>e,K=([t,e])=>t>=e,q=(t,{then:e=!0,else:r=!1})=>t?e:r,Z=([t,e])=>t<e,$=([t,e])=>t<=e;var Q=t=>Math.max.apply(Math,function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(t));var J=t=>Math.min.apply(Math,function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(t)),tt=t=>{let e=1;return t.forEach(t=>{e*=t}),e},et=t=>!t,rt=t=>t.some(t=>t),nt=(t,{default:e,koef:r=1},n)=>{let i=G(n,t);return void 0===i&&(i=e),"number"==typeof i?r*i:i},it=t=>Math.random()*t,ot=(t,{default:e,koef:r=1},n)=>{let i=G(n.target||n.renderData,t);return void 0===i&&(i=e),"number"==typeof i?r*i:i},at=(t,{default:e,koef:r=1},n)=>{let i=G(n.state,t);return void 0===i&&(i=e),"number"==typeof i?r*i:i},st=([t,...e])=>{let r=t;return e.forEach(t=>{r-=t}),r},ut=t=>{let e="";return t.forEach(t=>{e+=t}),e};function lt(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var ct={createAction({action:t,params:e},r){const n=B[t],i=this.parseExpressions(e,r);return new(Function.prototype.bind.apply(n,[null].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(i))))},parseExpressions(t,e){return t.map(t=>this.parseExpression(t,e))},parseExpression(t,e){if("function"==typeof t)return t(e);if(null==t)return t;if(Array.isArray(t))return this.parseExpressions(t,e);{const r=Object.keys(n).find(e=>Object.keys(t).includes("$"+e));if(r){const{["$"+r]:i}=t,o=lt(t,["$"+r]);return n[r](this.parseExpression(i,e),this.parseExpression(o,e),e)}return t.action?this.createAction(t,e):"object"==typeof t?this.parseObjectValues(t,e):t}},parseObjectValues(t,e){const r=Object.entries(t).map(([t,r])=>[t,this.parseExpression(r,e)]),n={};return r.forEach(([t,e])=>{n[t]=e}),n},compileExpressions(t){const e=t.map(t=>this.compileExpression(t));return t=>e.map(e=>e(t))},compileExpression(t){if(null==t)return()=>t;if(Array.isArray(t))return this.compileExpressions(t);{const o=Object.keys(n).find(e=>Object.keys(t).includes("$"+e));if(o){const{["$"+o]:a}=t,s=lt(t,["$"+o]);return e=n[o],r=this.compileExpression(a),i=this.compileExpression(s),t=>e(r(t),i(t),t)}return"object"==typeof t?this.compileObjectValues(t):()=>t}var e,r,i},compileObjectValues(t){const e=Object.entries(t).map(([t,e])=>[t,this.compileExpression(e)]),r={};return t=>(e.forEach(([e,n])=>{r[e]="function"==typeof n?n(t):n}),r)},addTickerHandler(t,e){function r(t){try{e(t)}catch(t){i.ticker.shared.remove(r)}}i.ticker.shared.add(r),t.on("removed",()=>i.ticker.shared.remove(r))},alignPositionToPixels(t,e){t._position||(t._position=new i.Point(t.x,t.y)),t.position.copy(t._position);const r=t.getBounds();t.x+=(Math.round(r.x)-r.x)/e.scale.x,t.y+=(Math.round(r.y)-r.y)/e.scale.y},onTextureLoaded(t,e){t.baseTexture.hasLoaded?e():t.baseTexture.once("loaded",e)},enableTextureMipmap(t,e){t.bindTexture(e,!1,0);const r=e._glTextures[t.CONTEXT_UID];r.enableMipmap(),r.enableLinearScaling()},setSvgResizeHandler(t,e,r){if(r.scaledSvgTextures){const n=()=>{const n=t.app.stage.scale.x*t.options.VIEW_BOX;let i=r.scaledSvgTextures[n];if(!i){const t=Object.keys(r.scaledSvgTextures);i=r.scaledSvgTextures[t[t.length-1]]}this.onTextureLoaded(i,()=>{try{e.texture=i,e._parsedWidth&&e._parsedHeight&&(e.scale.x=e._parsedWidth/i.width,e.scale.y=e._parsedHeight/i.height)}catch(t){}})};t.app.renderer.on("_resized",n),e.on("removed",()=>t.app.renderer.off("_resized",n)),n()}}},ht=(r(195),function(t){function e(e){t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float gamma;\nuniform float contrast;\nuniform float saturation;\nuniform float brightness;\nuniform float red;\nuniform float green;\nuniform float blue;\nuniform float alpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (c.a > 0.0) {\n c.rgb /= c.a;\n\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n\n c.rgb *= c.a;\n }\n\n gl_FragColor = c * alpha;\n}\n"),Object.assign(this,{gamma:1,saturation:1,contrast:1,brightness:1,red:1,green:1,blue:1,alpha:1},e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t,e,r,n){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,t.applyFilter(this,e,r,n)}}(i.Filter),function(t){function e(e,r,n){void 0===e&&(e=4),void 0===r&&(r=3),void 0===n&&(n=!1),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",n?"\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample top right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}\n":"\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample top right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}"),this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new i.Point,this.pixelSize=1,this._clamp=n,this._kernels=null,Array.isArray(e)?this.kernels=e:(this._blur=e,this.quality=r)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={kernels:{configurable:!0},clamp:{configurable:!0},pixelSize:{configurable:!0},quality:{configurable:!0},blur:{configurable:!0}};return e.prototype.apply=function(t,e,r,n){var i,o=this.pixelSize.x/e.size.width,a=this.pixelSize.y/e.size.height;if(1===this._quality||0===this._blur)i=this._kernels[0]+.5,this.uniforms.uOffset[0]=i*o,this.uniforms.uOffset[1]=i*a,t.applyFilter(this,e,r,n);else{for(var s,u=t.getRenderTarget(!0),l=e,c=u,h=this._quality-1,f=0;f<h;f++)i=this._kernels[f]+.5,this.uniforms.uOffset[0]=i*o,this.uniforms.uOffset[1]=i*a,t.applyFilter(this,l,c,!0),s=l,l=c,c=s;i=this._kernels[h]+.5,this.uniforms.uOffset[0]=i*o,this.uniforms.uOffset[1]=i*a,t.applyFilter(this,l,r,n),t.returnRenderTarget(u)}},e.prototype._generateKernels=function(){var t=this._blur,e=this._quality,r=[t];if(t>0)for(var n=t,i=t/e,o=1;o<e;o++)n-=i,r.push(n);this._kernels=r},r.kernels.get=function(){return this._kernels},r.kernels.set=function(t){Array.isArray(t)&&t.length>0?(this._kernels=t,this._quality=t.length,this._blur=Math.max.apply(Math,t)):(this._kernels=[0],this._quality=1)},r.clamp.get=function(){return this._clamp},r.pixelSize.set=function(t){"number"==typeof t?(this._pixelSize.x=t,this._pixelSize.y=t):Array.isArray(t)?(this._pixelSize.x=t[0],this._pixelSize.y=t[1]):t instanceof i.Point?(this._pixelSize.x=t.x,this._pixelSize.y=t.y):(this._pixelSize.x=1,this._pixelSize.y=1)},r.pixelSize.get=function(){return this._pixelSize},r.quality.get=function(){return this._quality},r.quality.set=function(t){this._quality=Math.max(1,Math.round(t)),this._generateKernels()},r.blur.get=function(){return this._blur},r.blur.set=function(t){this._blur=t,this._generateKernels()},Object.defineProperties(e.prototype,r),e}(i.Filter)),ft="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",dt=function(t){function e(e){void 0===e&&(e=.5),t.call(this,ft,"\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform float threshold;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n // A simple & fast algorithm for getting brightness.\n // It's inaccuracy , but good enought for this feature.\n float _max = max(max(color.r, color.g), color.b);\n float _min = min(min(color.r, color.g), color.b);\n float brightness = (_max + _min) * 0.5;\n\n if(brightness > threshold) {\n gl_FragColor = color;\n } else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n}\n"),this.threshold=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={threshold:{configurable:!0}};return r.threshold.get=function(){return this.uniforms.threshold},r.threshold.set=function(t){this.uniforms.threshold=t},Object.defineProperties(e.prototype,r),e}(i.Filter),pt=(function(t){function e(e){t.call(this,ft,"uniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D bloomTexture;\nuniform float bloomScale;\nuniform float brightness;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n color.rgb *= brightness;\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\n bloomColor.rgb *= bloomScale;\n gl_FragColor = color + bloomColor;\n}\n"),"number"==typeof e&&(e={threshold:e}),e=Object.assign({threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:i.settings.RESOLUTION},e),this.bloomScale=e.bloomScale,this.brightness=e.brightness;var r=e.kernels,n=e.blur,o=e.quality,a=e.pixelSize,s=e.resolution;this._extractFilter=new dt(e.threshold),this._extractFilter.resolution=s,this._blurFilter=r?new ht(r):new ht(n,o),this.pixelSize=a,this.resolution=s}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={resolution:{configurable:!0},threshold:{configurable:!0},kernels:{configurable:!0},blur:{configurable:!0},quality:{configurable:!0},pixelSize:{configurable:!0}};e.prototype.apply=function(t,e,r,n,i){var o=t.getRenderTarget(!0);this._extractFilter.apply(t,e,o,!0,i);var a=t.getRenderTarget(!0);this._blurFilter.apply(t,o,a,!0,i),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=a,t.applyFilter(this,e,r,n),t.returnRenderTarget(a),t.returnRenderTarget(o)},r.resolution.get=function(){return this._resolution},r.resolution.set=function(t){this._resolution=t,this._extractFilter&&(this._extractFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)},r.threshold.get=function(){return this._extractFilter.threshold},r.threshold.set=function(t){this._extractFilter.threshold=t},r.kernels.get=function(){return this._blurFilter.kernels},r.kernels.set=function(t){this._blurFilter.kernels=t},r.blur.get=function(){return this._blurFilter.blur},r.blur.set=function(t){this._blurFilter.blur=t},r.quality.get=function(){return this._blurFilter.quality},r.quality.set=function(t){this._blurFilter.quality=t},r.pixelSize.get=function(){return this._blurFilter.pixelSize},r.pixelSize.set=function(t){this._blurFilter.pixelSize=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e){void 0===e&&(e=8),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform float pixelSize;\nuniform sampler2D uSampler;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n return floor( coord / size ) * size;\n}\n\nvec2 getMod(vec2 coord, vec2 size)\n{\n return mod( coord , size) / size;\n}\n\nfloat character(float n, vec2 p)\n{\n p = floor(p*vec2(4.0, -4.0) + 2.5);\n\n if (clamp(p.x, 0.0, 4.0) == p.x)\n {\n if (clamp(p.y, 0.0, 4.0) == p.y)\n {\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\n }\n }\n return 0.0;\n}\n\nvoid main()\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n // get the rounded color..\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\n pixCoord = unmapCoord(pixCoord);\n\n vec4 color = texture2D(uSampler, pixCoord);\n\n // determine the character to use\n float gray = (color.r + color.g + color.b) / 3.0;\n\n float n = 65536.0; // .\n if (gray > 0.2) n = 65600.0; // :\n if (gray > 0.3) n = 332772.0; // *\n if (gray > 0.4) n = 15255086.0; // o\n if (gray > 0.5) n = 23385164.0; // &\n if (gray > 0.6) n = 15252014.0; // 8\n if (gray > 0.7) n = 13199452.0; // @\n if (gray > 0.8) n = 11512810.0; // #\n\n // get the mod..\n vec2 modd = getMod(coord, vec2(pixelSize));\n\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\n\n}\n"),this.size=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={size:{configurable:!0}};r.size.get=function(){return this.uniforms.pixelSize},r.size.set=function(t){this.uniforms.pixelSize=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e){void 0===e&&(e={}),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float transformX;\nuniform float transformY;\nuniform vec3 lightColor;\nuniform float lightAlpha;\nuniform vec3 shadowColor;\nuniform float shadowAlpha;\n\nvoid main(void) {\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\n vec4 color = texture2D(uSampler, vTextureCoord);\n float light = texture2D(uSampler, vTextureCoord - transform).a;\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\n\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n"),this.uniforms.lightColor=new Float32Array(3),this.uniforms.shadowColor=new Float32Array(3),e=Object.assign({rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},e),this.rotation=e.rotation,this.thickness=e.thickness,this.lightColor=e.lightColor,this.lightAlpha=e.lightAlpha,this.shadowColor=e.shadowColor,this.shadowAlpha=e.shadowAlpha}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={rotation:{configurable:!0},thickness:{configurable:!0},lightColor:{configurable:!0},lightAlpha:{configurable:!0},shadowColor:{configurable:!0},shadowAlpha:{configurable:!0}};e.prototype._updateTransform=function(){this.uniforms.transformX=this._thickness*Math.cos(this._angle),this.uniforms.transformY=this._thickness*Math.sin(this._angle)},r.rotation.get=function(){return this._angle/i.DEG_TO_RAD},r.rotation.set=function(t){this._angle=t*i.DEG_TO_RAD,this._updateTransform()},r.thickness.get=function(){return this._thickness},r.thickness.set=function(t){this._thickness=t,this._updateTransform()},r.lightColor.get=function(){return i.utils.rgb2hex(this.uniforms.lightColor)},r.lightColor.set=function(t){i.utils.hex2rgb(t,this.uniforms.lightColor)},r.lightAlpha.get=function(){return this.uniforms.lightAlpha},r.lightAlpha.set=function(t){this.uniforms.lightAlpha=t},r.shadowColor.get=function(){return i.utils.rgb2hex(this.uniforms.shadowColor)},r.shadowColor.set=function(t){i.utils.hex2rgb(t,this.uniforms.shadowColor)},r.shadowAlpha.get=function(){return this.uniforms.shadowAlpha},r.shadowAlpha.set=function(t){this.uniforms.shadowAlpha=t},Object.defineProperties(e.prototype,r)}(i.Filter),i.filters),vt=pt.BlurXFilter,_t=pt.BlurYFilter,gt=pt.AlphaFilter,yt=(function(t){function e(e,r,n,o){var a,s;void 0===e&&(e=2),void 0===r&&(r=4),void 0===n&&(n=i.settings.RESOLUTION),void 0===o&&(o=5),t.call(this),"number"==typeof e?(a=e,s=e):e instanceof i.Point?(a=e.x,s=e.y):Array.isArray(e)&&(a=e[0],s=e[1]),this.blurXFilter=new vt(a,r,n,o),this.blurYFilter=new _t(s,r,n,o),this.blurYFilter.blendMode=i.BLEND_MODES.SCREEN,this.defaultFilter=new gt}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={blur:{configurable:!0},blurX:{configurable:!0},blurY:{configurable:!0}};e.prototype.apply=function(t,e,r){var n=t.getRenderTarget(!0);this.defaultFilter.apply(t,e,r),this.blurXFilter.apply(t,e,n),this.blurYFilter.apply(t,n,r),t.returnRenderTarget(n)},r.blur.get=function(){return this.blurXFilter.blur},r.blur.set=function(t){this.blurXFilter.blur=this.blurYFilter.blur=t},r.blurX.get=function(){return this.blurXFilter.blur},r.blurX.set=function(t){this.blurXFilter.blur=t},r.blurY.get=function(){return this.blurYFilter.blur},r.blurY.set=function(t){this.blurYFilter.blur=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n){t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","uniform float radius;\nuniform float strength;\nuniform vec2 center;\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nvoid main()\n{\n vec2 coord = vTextureCoord * filterArea.xy;\n coord -= center * dimensions.xy;\n float distance = length(coord);\n if (distance < radius) {\n float percent = distance / radius;\n if (strength > 0.0) {\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\n } else {\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\n }\n }\n coord += center * dimensions.xy;\n coord /= filterArea.xy;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n gl_FragColor = color;\n}\n"),this.uniforms.dimensions=new Float32Array(2),this.center=e||[.5,.5],this.radius="number"==typeof r?r:100,this.strength="number"==typeof n?n:1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={radius:{configurable:!0},strength:{configurable:!0},center:{configurable:!0}};e.prototype.apply=function(t,e,r,n){this.uniforms.dimensions[0]=e.sourceFrame.width,this.uniforms.dimensions[1]=e.sourceFrame.height,t.applyFilter(this,e,r,n)},r.radius.get=function(){return this.uniforms.radius},r.radius.set=function(t){this.uniforms.radius=t},r.strength.get=function(){return this.uniforms.strength},r.strength.set=function(t){this.uniforms.strength=t},r.center.get=function(){return this.uniforms.center},r.center.set=function(t){this.uniforms.center=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n){void 0===r&&(r=!1),void 0===n&&(n=1),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D colorMap;\nuniform float _mix;\nuniform float _size;\nuniform float _sliceSize;\nuniform float _slicePixelSize;\nuniform float _sliceInnerSize;\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\n\n vec4 adjusted;\n if (color.a > 0.0) {\n color.rgb /= color.a;\n float innerWidth = _size - 1.0;\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\n float s0 = xOffset + (zSlice0 * _sliceSize);\n float s1 = xOffset + (zSlice1 * _sliceSize);\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\n float zOffset = fract(color.b * innerWidth);\n adjusted = mix(slice0Color, slice1Color, zOffset);\n\n color.rgb *= color.a;\n }\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\n\n}"),this._size=0,this._sliceSize=0,this._slicePixelSize=0,this._sliceInnerSize=0,this._scaleMode=null,this._nearest=!1,this.nearest=r,this.mix=n,this.colorMap=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={colorSize:{configurable:!0},colorMap:{configurable:!0},nearest:{configurable:!0}};e.prototype.apply=function(t,e,r,n){this.uniforms._mix=this.mix,t.applyFilter(this,e,r,n)},r.colorSize.get=function(){return this._size},r.colorMap.get=function(){return this._colorMap},r.colorMap.set=function(t){t instanceof i.Texture||(t=i.Texture.from(t)),t&&t.baseTexture&&(t.baseTexture.scaleMode=this._scaleMode,t.baseTexture.mipmap=!1,this._size=t.height,this._sliceSize=1/this._size,this._slicePixelSize=this._sliceSize/this._size,this._sliceInnerSize=this._slicePixelSize*(this._size-1),this.uniforms._size=this._size,this.uniforms._sliceSize=this._sliceSize,this.uniforms._slicePixelSize=this._slicePixelSize,this.uniforms._sliceInnerSize=this._sliceInnerSize,this.uniforms.colorMap=t),this._colorMap=t},r.nearest.get=function(){return this._nearest},r.nearest.set=function(t){this._nearest=t,this._scaleMode=t?i.SCALE_MODES.NEAREST:i.SCALE_MODES.LINEAR;var e=this._colorMap;e&&e.baseTexture&&(e.baseTexture._glTextures={},e.baseTexture.scaleMode=this._scaleMode,e.baseTexture.mipmap=!1,e._updateID++,e.baseTexture.emit("update",e.baseTexture))},e.prototype.updateColorMap=function(){var t=this._colorMap;t&&t.baseTexture&&(t._updateID++,t.baseTexture.emit("update",t.baseTexture),this.colorMap=t)},e.prototype.destroy=function(e){this._colorMap&&this._colorMap.destroy(e),t.prototype.destroy.call(this)},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n){void 0===e&&(e=16711680),void 0===r&&(r=0),void 0===n&&(n=.4),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 originalColor;\nuniform vec3 newColor;\nuniform float epsilon;\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n float doReplace = step(colorDistance, epsilon);\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\n}\n"),this.uniforms.originalColor=new Float32Array(3),this.uniforms.newColor=new Float32Array(3),this.originalColor=e,this.newColor=r,this.epsilon=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={originalColor:{configurable:!0},newColor:{configurable:!0},epsilon:{configurable:!0}};r.originalColor.set=function(t){var e=this.uniforms.originalColor;"number"==typeof t?(i.utils.hex2rgb(t,e),this._originalColor=t):(e[0]=t[0],e[1]=t[1],e[2]=t[2],this._originalColor=i.utils.rgb2hex(e))},r.originalColor.get=function(){return this._originalColor},r.newColor.set=function(t){var e=this.uniforms.newColor;"number"==typeof t?(i.utils.hex2rgb(t,e),this._newColor=t):(e[0]=t[0],e[1]=t[1],e[2]=t[2],this._newColor=i.utils.rgb2hex(e))},r.newColor.get=function(){return this._newColor},r.epsilon.set=function(t){this.uniforms.epsilon=t},r.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n){void 0===r&&(r=200),void 0===n&&(n=200),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying mediump vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec2 texelSize;\nuniform float matrix[9];\n\nvoid main(void)\n{\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\n\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\n\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\n\n gl_FragColor =\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\n\n gl_FragColor.a = c22.a;\n}\n"),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),void 0!==e&&(this.matrix=e),this.width=r,this.height=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={matrix:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};r.matrix.get=function(){return this.uniforms.matrix},r.matrix.set=function(t){var e=this;t.forEach((function(t,r){return e.uniforms.matrix[r]=t}))},r.width.get=function(){return 1/this.uniforms.texelSize[0]},r.width.set=function(t){this.uniforms.texelSize[0]=1/t},r.height.get=function(){return 1/this.uniforms.texelSize[1]},r.height.set=function(t){this.uniforms.texelSize[1]=1/t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(){t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n\n if (lum < 1.00)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.75)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.50)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.3)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n}\n")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e}(i.Filter),function(t){function e(e){t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nconst float SQRT_2 = 1.414213;\n\nconst float light = 1.0;\n\nuniform float curvature;\nuniform float lineWidth;\nuniform float lineContrast;\nuniform bool verticalLine;\nuniform float noise;\nuniform float noiseSize;\n\nuniform float vignetting;\nuniform float vignettingAlpha;\nuniform float vignettingBlur;\n\nuniform float seed;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n vec2 dir = vec2(coord - vec2(0.5, 0.5));\n\n float _c = curvature > 0. ? curvature : 1.;\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\n vec2 uv = dir * k;\n\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 rgb = gl_FragColor.rgb;\n\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n rgb += _noise * noise;\n }\n\n if (lineWidth > 0.0) {\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\n rgb *= j;\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\n rgb *= 0.99 + ceil(segment) * 0.015;\n }\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n gl_FragColor.rgb = rgb;\n}\n"),this.uniforms.dimensions=new Float32Array(2),this.time=0,this.seed=0,Object.assign(this,{curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0},e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={curvature:{configurable:!0},lineWidth:{configurable:!0},lineContrast:{configurable:!0},verticalLine:{configurable:!0},noise:{configurable:!0},noiseSize:{configurable:!0},vignetting:{configurable:!0},vignettingAlpha:{configurable:!0},vignettingBlur:{configurable:!0}};e.prototype.apply=function(t,e,r,n){this.uniforms.dimensions[0]=e.sourceFrame.width,this.uniforms.dimensions[1]=e.sourceFrame.height,this.uniforms.seed=this.seed,this.uniforms.time=this.time,t.applyFilter(this,e,r,n)},r.curvature.set=function(t){this.uniforms.curvature=t},r.curvature.get=function(){return this.uniforms.curvature},r.lineWidth.set=function(t){this.uniforms.lineWidth=t},r.lineWidth.get=function(){return this.uniforms.lineWidth},r.lineContrast.set=function(t){this.uniforms.lineContrast=t},r.lineContrast.get=function(){return this.uniforms.lineContrast},r.verticalLine.set=function(t){this.uniforms.verticalLine=t},r.verticalLine.get=function(){return this.uniforms.verticalLine},r.noise.set=function(t){this.uniforms.noise=t},r.noise.get=function(){return this.uniforms.noise},r.noiseSize.set=function(t){this.uniforms.noiseSize=t},r.noiseSize.get=function(){return this.uniforms.noiseSize},r.vignetting.set=function(t){this.uniforms.vignetting=t},r.vignetting.get=function(){return this.uniforms.vignetting},r.vignettingAlpha.set=function(t){this.uniforms.vignettingAlpha=t},r.vignettingAlpha.get=function(){return this.uniforms.vignettingAlpha},r.vignettingBlur.set=function(t){this.uniforms.vignettingBlur=t},r.vignettingBlur.get=function(){return this.uniforms.vignettingBlur},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r){void 0===e&&(e=1),void 0===r&&(r=5),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 filterArea;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * filterArea.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n"),this.scale=e,this.angle=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={scale:{configurable:!0},angle:{configurable:!0}};r.scale.get=function(){return this.uniforms.scale},r.scale.set=function(t){this.uniforms.scale=t},r.angle.get=function(){return this.uniforms.angle},r.angle.set=function(t){this.uniforms.angle=t},Object.defineProperties(e.prototype,r)}(i.Filter),"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}"),mt="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform vec3 color;\nvoid main(void){\n vec4 sample = texture2D(uSampler, vTextureCoord);\n\n // Un-premultiply alpha before applying the color\n if (sample.a > 0.0) {\n sample.rgb /= sample.a;\n }\n\n // Premultiply alpha again\n sample.rgb = color.rgb * sample.a;\n\n // alpha user alpha\n sample *= alpha;\n\n gl_FragColor = sample;\n}",xt=(function(t){function e(e){e&&e.constructor!==Object&&(console.warn("DropShadowFilter now uses options instead of (rotation, distance, blur, color, alpha)"),e={rotation:e},void 0!==arguments[1]&&(e.distance=arguments[1]),void 0!==arguments[2]&&(e.blur=arguments[2]),void 0!==arguments[3]&&(e.color=arguments[3]),void 0!==arguments[4]&&(e.alpha=arguments[4])),e=Object.assign({rotation:45,distance:5,color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:i.settings.RESOLUTION},e),t.call(this);var r=e.kernels,n=e.blur,o=e.quality,a=e.pixelSize,s=e.resolution;this._tintFilter=new i.Filter(yt,mt),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.resolution=s,this._blurFilter=r?new ht(r):new ht(n,o),this.pixelSize=a,this.resolution=s,this.targetTransform=new i.Matrix;var u=e.shadowOnly,l=e.rotation,c=e.distance,h=e.alpha,f=e.color;this.shadowOnly=u,this.rotation=l,this.distance=c,this.alpha=h,this.color=f,this._updatePadding()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={resolution:{configurable:!0},distance:{configurable:!0},rotation:{configurable:!0},alpha:{configurable:!0},color:{configurable:!0},kernels:{configurable:!0},blur:{configurable:!0},quality:{configurable:!0},pixelSize:{configurable:!0}};e.prototype.apply=function(t,e,r,n){var i=t.getRenderTarget();i.transform=this.targetTransform,this._tintFilter.apply(t,e,i,!0),i.transform=null,this._blurFilter.apply(t,i,r,n),!0!==this.shadowOnly&&t.applyFilter(this,e,r,!1),t.returnRenderTarget(i)},e.prototype._updatePadding=function(){this.padding=this.distance+2*this.blur},e.prototype._updateTargetTransform=function(){this.targetTransform.tx=this.distance*Math.cos(this.angle),this.targetTransform.ty=this.distance*Math.sin(this.angle)},r.resolution.get=function(){return this._resolution},r.resolution.set=function(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)},r.distance.get=function(){return this._distance},r.distance.set=function(t){this._distance=t,this._updatePadding(),this._updateTargetTransform()},r.rotation.get=function(){return this.angle/i.DEG_TO_RAD},r.rotation.set=function(t){this.angle=t*i.DEG_TO_RAD,this._updateTargetTransform()},r.alpha.get=function(){return this._tintFilter.uniforms.alpha},r.alpha.set=function(t){this._tintFilter.uniforms.alpha=t},r.color.get=function(){return i.utils.rgb2hex(this._tintFilter.uniforms.color)},r.color.set=function(t){i.utils.hex2rgb(t,this._tintFilter.uniforms.color)},r.kernels.get=function(){return this._blurFilter.kernels},r.kernels.set=function(t){this._blurFilter.kernels=t},r.blur.get=function(){return this._blurFilter.blur},r.blur.set=function(t){this._blurFilter.blur=t,this._updatePadding()},r.quality.get=function(){return this._blurFilter.quality},r.quality.set=function(t){this._blurFilter.quality=t},r.pixelSize.get=function(){return this._blurFilter.pixelSize},r.pixelSize.set=function(t){this._blurFilter.pixelSize=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e){void 0===e&&(e=5),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float strength;\nuniform vec4 filterArea;\n\n\nvoid main(void)\n{\n\tvec2 onePixel = vec2(1.0 / filterArea);\n\n\tvec4 color;\n\n\tcolor.rgb = vec3(0.5);\n\n\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\n\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\n\n\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\n\n\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\n\n\tgl_FragColor = vec4(color.rgb * alpha, alpha);\n}\n"),this.strength=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={strength:{configurable:!0}};r.strength.get=function(){return this.uniforms.strength},r.strength.set=function(t){this.uniforms.strength=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e){void 0===e&&(e={}),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","// precision highp float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\nuniform float aspect;\n\nuniform sampler2D displacementMap;\nuniform float offset;\nuniform float sinDir;\nuniform float cosDir;\nuniform int fillMode;\n\nuniform float seed;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nconst int TRANSPARENT = 0;\nconst int ORIGINAL = 1;\nconst int LOOP = 2;\nconst int CLAMP = 3;\nconst int MIRROR = 4;\n\nvoid main(void)\n{\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\n\n if (coord.x > 1.0 || coord.y > 1.0) {\n return;\n }\n\n float cx = coord.x - 0.5;\n float cy = (coord.y - 0.5) * aspect;\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\n\n // displacementMap: repeat\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\n\n // displacementMap: mirror\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\n\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\n\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\n\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\n\n if (fillMode == CLAMP) {\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\n } else {\n if( coord.x > filterClamp.z ) {\n if (fillMode == ORIGINAL) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n } else if (fillMode == LOOP) {\n coord.x -= filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x = filterClamp.z * 2.0 - coord.x;\n } else {\n gl_FragColor = vec4(0., 0., 0., 0.);\n return;\n }\n } else if( coord.x < filterClamp.x ) {\n if (fillMode == ORIGINAL) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n } else if (fillMode == LOOP) {\n coord.x += filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x *= -filterClamp.z;\n } else {\n gl_FragColor = vec4(0., 0., 0., 0.);\n return;\n }\n }\n\n if( coord.y > filterClamp.w ) {\n if (fillMode == ORIGINAL) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n } else if (fillMode == LOOP) {\n coord.y -= filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y = filterClamp.w * 2.0 - coord.y;\n } else {\n gl_FragColor = vec4(0., 0., 0., 0.);\n return;\n }\n } else if( coord.y < filterClamp.y ) {\n if (fillMode == ORIGINAL) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n } else if (fillMode == LOOP) {\n coord.y += filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y *= -filterClamp.w;\n } else {\n gl_FragColor = vec4(0., 0., 0., 0.);\n return;\n }\n }\n }\n\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, coord).a;\n}\n"),this.uniforms.dimensions=new Float32Array(2),e=Object.assign({slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},e),this.direction=e.direction,this.red=e.red,this.green=e.green,this.blue=e.blue,this.offset=e.offset,this.fillMode=e.fillMode,this.average=e.average,this.seed=e.seed,this.minSize=e.minSize,this.sampleSize=e.sampleSize,this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=i.Texture.fromCanvas(this._canvas,i.SCALE_MODES.NEAREST),this._slices=0,this.slices=e.slices}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={sizes:{configurable:!0},offsets:{configurable:!0},slices:{configurable:!0},direction:{configurable:!0},red:{configurable:!0},green:{configurable:!0},blue:{configurable:!0}};return e.prototype.apply=function(t,e,r,n){var i=e.sourceFrame.width,o=e.sourceFrame.height;this.uniforms.dimensions[0]=i,this.uniforms.dimensions[1]=o,this.uniforms.aspect=o/i,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,t.applyFilter(this,e,r,n)},e.prototype._randomizeSizes=function(){var t=this._sizes,e=this._slices-1,r=this.sampleSize,n=Math.min(this.minSize/r,.9/this._slices);if(this.average){for(var i=this._slices,o=1,a=0;a<e;a++){var s=o/(i-a),u=Math.max(s*(1-.6*Math.random()),n);t[a]=u,o-=u}t[e]=o}else{for(var l=1,c=Math.sqrt(1/this._slices),h=0;h<e;h++){var f=Math.max(c*l*Math.random(),n);t[h]=f,l-=f}t[e]=l}this.shuffle()},e.prototype.shuffle=function(){for(var t=this._sizes,e=this._slices-1;e>0;e--){var r=Math.random()*e>>0,n=t[e];t[e]=t[r],t[r]=n}},e.prototype._randomizeOffsets=function(){for(var t=0;t<this._slices;t++)this._offsets[t]=Math.random()*(Math.random()<.5?-1:1)},e.prototype.refresh=function(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()},e.prototype.redraw=function(){var t,e=this.sampleSize,r=this.texture,n=this._canvas.getContext("2d");n.clearRect(0,0,8,e);for(var i=0,o=0;o<this._slices;o++){t=Math.floor(256*this._offsets[o]);var a=this._sizes[o]*e,s=t>0?t:0,u=t<0?-t:0;n.fillStyle="rgba("+s+", "+u+", 0, 1)",n.fillRect(0,i>>0,e,a+1>>0),i+=a}r.baseTexture.update(),this.uniforms.displacementMap=r},r.sizes.set=function(t){for(var e=Math.min(this._slices,t.length),r=0;r<e;r++)this._sizes[r]=t[r]},r.sizes.get=function(){return this._sizes},r.offsets.set=function(t){for(var e=Math.min(this._slices,t.length),r=0;r<e;r++)this._offsets[r]=t[r]},r.offsets.get=function(){return this._offsets},r.slices.get=function(){return this._slices},r.slices.set=function(t){this._slices!==t&&(this._slices=t,this.uniforms.slices=t,this._sizes=this.uniforms.slicesWidth=new Float32Array(t),this._offsets=this.uniforms.slicesOffset=new Float32Array(t),this.refresh())},r.direction.get=function(){return this._direction},r.direction.set=function(t){if(this._direction!==t){this._direction=t;var e=t*i.DEG_TO_RAD;this.uniforms.sinDir=Math.sin(e),this.uniforms.cosDir=Math.cos(e)}},r.red.get=function(){return this.uniforms.red},r.red.set=function(t){this.uniforms.red=t},r.green.get=function(){return this.uniforms.green},r.green.set=function(t){this.uniforms.green=t},r.blue.get=function(){return this.uniforms.blue},r.blue.set=function(t){this.uniforms.blue=t},e.prototype.destroy=function(){this.texture.destroy(!0),this.texture=null,this._canvas=null,this.red=null,this.green=null,this.blue=null,this._sizes=null,this._offsets=null},Object.defineProperties(e.prototype,r),e}(i.Filter));xt.TRANSPARENT=0,xt.ORIGINAL=1,xt.LOOP=2,xt.CLAMP=3,xt.MIRROR=4;
|
|
68
22
|
/*!
|
|
69
|
-
* @pixi/filter-
|
|
70
|
-
* Compiled
|
|
23
|
+
* @pixi/filter-glow - v2.7.0
|
|
24
|
+
* Compiled Sun, 13 Jan 2019 22:51:52 UTC
|
|
71
25
|
*
|
|
72
|
-
* pixi-
|
|
26
|
+
* @pixi/filter-glow is licensed under the MIT License.
|
|
73
27
|
* http://www.opensource.org/licenses/mit-license
|
|
74
28
|
*/
|
|
75
|
-
|
|
29
|
+
!function(t){function e(e,r,n,i,o){void 0===e&&(e=10),void 0===r&&(r=4),void 0===n&&(n=0),void 0===i&&(i=16777215),void 0===o&&(o=.1),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nuniform float distance;\nuniform float outerStrength;\nuniform float innerStrength;\nuniform vec4 glowColor;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nconst float PI = 3.14159265358979323846264;\n\nvoid main(void) {\n vec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float totalAlpha = 0.0;\n float maxTotalAlpha = 0.0;\n float cosAngle;\n float sinAngle;\n vec2 displaced;\n for (float angle = 0.0; angle <= PI * 2.0; angle += %QUALITY_DIST%) {\n cosAngle = cos(angle);\n sinAngle = sin(angle);\n for (float curDistance = 1.0; curDistance <= %DIST%; curDistance++) {\n displaced.x = vTextureCoord.x + cosAngle * curDistance * px.x;\n displaced.y = vTextureCoord.y + sinAngle * curDistance * px.y;\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n totalAlpha += (distance - curDistance) * curColor.a;\n maxTotalAlpha += (distance - curDistance);\n }\n }\n maxTotalAlpha = max(maxTotalAlpha, 0.0001);\n\n ownColor.a = max(ownColor.a, 0.0001);\n ownColor.rgb = ownColor.rgb / ownColor.a;\n float outerGlowAlpha = (totalAlpha / maxTotalAlpha) * outerStrength * (1. - ownColor.a);\n float innerGlowAlpha = ((maxTotalAlpha - totalAlpha) / maxTotalAlpha) * innerStrength * ownColor.a;\n float resultAlpha = (ownColor.a + outerGlowAlpha);\n gl_FragColor = vec4(mix(mix(ownColor.rgb, glowColor.rgb, innerGlowAlpha / ownColor.a), glowColor.rgb, outerGlowAlpha / resultAlpha) * resultAlpha, resultAlpha);\n}\n".replace(/%QUALITY_DIST%/gi,""+(1/o/e).toFixed(7)).replace(/%DIST%/gi,""+e.toFixed(7))),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.distance=e,this.color=i,this.outerStrength=r,this.innerStrength=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={color:{configurable:!0},distance:{configurable:!0},outerStrength:{configurable:!0},innerStrength:{configurable:!0}};r.color.get=function(){return i.utils.rgb2hex(this.uniforms.glowColor)},r.color.set=function(t){i.utils.hex2rgb(t,this.uniforms.glowColor)},r.distance.get=function(){return this.uniforms.distance},r.distance.set=function(t){this.uniforms.distance=t},r.outerStrength.get=function(){return this.uniforms.outerStrength},r.outerStrength.set=function(t){this.uniforms.outerStrength=t},r.innerStrength.get=function(){return this.uniforms.innerStrength},r.innerStrength.set=function(t){this.uniforms.innerStrength=t},Object.defineProperties(e.prototype,r)}(i.Filter);
|
|
76
30
|
/*!
|
|
77
|
-
* @pixi/filter-
|
|
78
|
-
* Compiled
|
|
31
|
+
* @pixi/filter-godray - v2.7.0
|
|
32
|
+
* Compiled Sun, 13 Jan 2019 22:51:52 UTC
|
|
79
33
|
*
|
|
80
|
-
* pixi-
|
|
34
|
+
* @pixi/filter-godray is licensed under the MIT License.
|
|
81
35
|
* http://www.opensource.org/licenses/mit-license
|
|
82
|
-
*/
|
|
83
|
-
var Et="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n",xt="varying vec2 vTextureCoord;\nuniform sampler2D texture;\nuniform vec3 originalColor;\nuniform vec3 newColor;\nuniform float epsilon;\nvoid main(void) {\n vec4 currentColor = texture2D(texture, vTextureCoord);\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n float doReplace = step(colorDistance, epsilon);\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\n}\n",bt=function(t){function e(e,r,n){void 0===e&&(e=16711680),void 0===r&&(r=0),void 0===n&&(n=.4),t.call(this,Et,xt),this.originalColor=e,this.newColor=r,this.epsilon=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={originalColor:{},newColor:{},epsilon:{}};return r.originalColor.set=function(t){var e=this.uniforms.originalColor;"number"==typeof t?(PIXI.utils.hex2rgb(t,e),this._originalColor=t):(e[0]=t[0],e[1]=t[1],e[2]=t[2],this._originalColor=PIXI.utils.rgb2hex(e))},r.originalColor.get=function(){return this._originalColor},r.newColor.set=function(t){var e=this.uniforms.newColor;"number"==typeof t?(PIXI.utils.hex2rgb(t,e),this._newColor=t):(e[0]=t[0],e[1]=t[1],e[2]=t[2],this._newColor=PIXI.utils.rgb2hex(e))},r.newColor.get=function(){return this._newColor},r.epsilon.set=function(t){this.uniforms.epsilon=t},r.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.ColorReplaceFilter=bt;
|
|
84
|
-
/*!
|
|
85
|
-
* @pixi/filter-convolution - v2.0.1
|
|
86
|
-
* Compiled Tue, 12 Sep 2017 17:13:57 UTC
|
|
87
|
-
*
|
|
88
|
-
* pixi-filters is licensed under the MIT License.
|
|
89
|
-
* http://www.opensource.org/licenses/mit-license
|
|
90
|
-
*/
|
|
91
|
-
var Tt="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",Rt="precision mediump float;\n\nvarying mediump vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec2 texelSize;\nuniform float matrix[9];\n\nvoid main(void)\n{\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\n\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\n\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\n\n gl_FragColor =\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\n\n gl_FragColor.a = c22.a;\n}\n",Ot=function(t){function e(e,r,n){t.call(this,Tt,Rt),this.matrix=e,this.width=r,this.height=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={matrix:{},width:{},height:{}};return r.matrix.get=function(){return this.uniforms.matrix},r.matrix.set=function(t){this.uniforms.matrix=new Float32Array(t)},r.width.get=function(){return 1/this.uniforms.texelSize[0]},r.width.set=function(t){this.uniforms.texelSize[0]=1/t},r.height.get=function(){return 1/this.uniforms.texelSize[1]},r.height.set=function(t){this.uniforms.texelSize[1]=1/t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.ConvolutionFilter=Ot;
|
|
92
|
-
/*!
|
|
93
|
-
* @pixi/filter-cross-hatch - v2.0.1
|
|
94
|
-
* Compiled Tue, 12 Sep 2017 17:13:57 UTC
|
|
95
|
-
*
|
|
96
|
-
* pixi-filters is licensed under the MIT License.
|
|
97
|
-
* http://www.opensource.org/licenses/mit-license
|
|
98
|
-
*/
|
|
99
|
-
var St="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",wt="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n\n if (lum < 1.00)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.75)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.50)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.3)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n}\n",Ct=function(t){function e(){t.call(this,St,wt)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(PIXI.Filter);PIXI.filters.CrossHatchFilter=Ct;
|
|
100
|
-
/*!
|
|
101
|
-
* @pixi/filter-dot - v2.0.1
|
|
102
|
-
* Compiled Tue, 12 Sep 2017 17:13:57 UTC
|
|
103
|
-
*
|
|
104
|
-
* pixi-filters is licensed under the MIT License.
|
|
105
|
-
* http://www.opensource.org/licenses/mit-license
|
|
106
|
-
*/
|
|
107
|
-
var At="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",It="precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 filterArea;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * filterArea.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n",Pt=function(t){function e(e,r){void 0===e&&(e=1),void 0===r&&(r=5),t.call(this,At,It),this.scale=e,this.angle=r}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={scale:{},angle:{}};return r.scale.get=function(){return this.uniforms.scale},r.scale.set=function(t){this.uniforms.scale=t},r.angle.get=function(){return this.uniforms.angle},r.angle.set=function(t){this.uniforms.angle=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.DotFilter=Pt;
|
|
36
|
+
*/var Et="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",bt="vec3 mod289(vec3 x)\n{\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x)\n{\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 permute(vec4 x)\n{\n return mod289(((x * 34.0) + 1.0) * x);\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec3 fade(vec3 t)\n{\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n}\n// Classic Perlin noise, periodic variant\nfloat pnoise(vec3 P, vec3 rep)\n{\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); // Fractional part for interpolation\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n return 2.2 * n_xyz;\n}\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain)\n{\n float sum = 0.0;\n float sc = 1.0;\n float totalgain = 1.0;\n for (float i = 0.0; i < 6.0; i++)\n {\n sum += totalgain * pnoise(P * sc, rep);\n sc *= lacunarity;\n totalgain *= gain;\n }\n return abs(sum);\n}\n",Tt="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nuniform vec2 light;\nuniform bool parallel;\nuniform float aspect;\n\nuniform float gain;\nuniform float lacunarity;\nuniform float time;\n\n${perlin}\n\nvoid main(void) {\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\n\n float d;\n\n if (parallel) {\n float _cos = light.x;\n float _sin = light.y;\n d = (_cos * coord.x) + (_sin * coord.y * aspect);\n } else {\n float dx = coord.x - light.x / dimensions.x;\n float dy = (coord.y - light.y / dimensions.y) * aspect;\n float dis = sqrt(dx * dx + dy * dy) + 0.00001;\n d = dy / dis;\n }\n\n vec3 dir = vec3(d, d, 0.0);\n\n float noise = turb(dir + vec3(time, 0.0, 62.1 + time) * 0.05, vec3(480.0, 320.0, 480.0), lacunarity, gain);\n noise = mix(noise, 0.0, 0.3);\n //fade vertically.\n vec4 mist = vec4(noise, noise, noise, 1.0) * (1.0 - coord.y);\n mist.a = 1.0;\n\n gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;\n}\n",Rt=(function(t){function e(e){t.call(this,Et,Tt.replace("${perlin}",bt)),this.uniforms.dimensions=new Float32Array(2),"number"==typeof e&&(console.warn("GodrayFilter now uses options instead of (angle, gain, lacunarity, time)"),e={angle:e},void 0!==arguments[1]&&(e.gain=arguments[1]),void 0!==arguments[2]&&(e.lacunarity=arguments[2]),void 0!==arguments[3]&&(e.time=arguments[3])),e=Object.assign({angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0]},e),this._angleLight=new i.Point,this.angle=e.angle,this.gain=e.gain,this.lacunarity=e.lacunarity,this.parallel=e.parallel,this.center=e.center,this.time=e.time}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={angle:{configurable:!0},gain:{configurable:!0},lacunarity:{configurable:!0}};e.prototype.apply=function(t,e,r,n){var i=e.sourceFrame,o=i.width,a=i.height;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=a,this.uniforms.aspect=a/o,this.uniforms.time=this.time,t.applyFilter(this,e,r,n)},r.angle.get=function(){return this._angle},r.angle.set=function(t){this._angle=t;var e=t*i.DEG_TO_RAD;this._angleLight.x=Math.cos(e),this._angleLight.y=Math.sin(e)},r.gain.get=function(){return this.uniforms.gain},r.gain.set=function(t){this.uniforms.gain=t},r.lacunarity.get=function(){return this.uniforms.lacunarity},r.lacunarity.set=function(t){this.uniforms.lacunarity=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n){void 0===e&&(e=[0,0]),void 0===r&&(r=5),void 0===n&&(n=0),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform vec2 uVelocity;\nuniform int uKernelSize;\nuniform float uOffset;\n\nconst int MAX_KERNEL_SIZE = 2048;\n\n// Notice:\n// the perfect way:\n// int kernelSize = min(uKernelSize, MAX_KERNELSIZE);\n// BUT in real use-case , uKernelSize < MAX_KERNELSIZE almost always.\n// So use uKernelSize directly.\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n if (uKernelSize == 0)\n {\n gl_FragColor = color;\n return;\n }\n\n vec2 velocity = uVelocity / filterArea.xy;\n float offset = -uOffset / length(uVelocity) - 0.5;\n int k = uKernelSize - 1;\n\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\n if (i == k) {\n break;\n }\n vec2 bias = velocity * (float(i) / float(k) + offset);\n color += texture2D(uSampler, vTextureCoord + bias);\n }\n gl_FragColor = color / float(uKernelSize);\n}\n"),this.uniforms.uVelocity=new Float32Array(2),this._velocity=new i.ObservablePoint(this.velocityChanged,this),this.velocity=e,this.kernelSize=r,this.offset=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={velocity:{configurable:!0},offset:{configurable:!0}};e.prototype.apply=function(t,e,r,n){var i=this.velocity,o=i.x,a=i.y;this.uniforms.uKernelSize=0!==o||0!==a?this.kernelSize:0,t.applyFilter(this,e,r,n)},r.velocity.set=function(t){Array.isArray(t)?this._velocity.set(t[0],t[1]):(t instanceof i.Point||t instanceof i.ObservablePoint)&&this._velocity.copy(t)},r.velocity.get=function(){return this._velocity},e.prototype.velocityChanged=function(){this.uniforms.uVelocity[0]=this._velocity.x,this.uniforms.uVelocity[1]=this._velocity.y},r.offset.set=function(t){this.uniforms.uOffset=t},r.offset.get=function(){return this.uniforms.uOffset},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n){void 0===r&&(r=.05),void 0===n&&(n=null),n=n||e.length,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float epsilon;\n\nconst int MAX_COLORS = %maxColors%;\n\nuniform vec3 originalColors[MAX_COLORS];\nuniform vec3 targetColors[MAX_COLORS];\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n\n float alpha = gl_FragColor.a;\n if (alpha < 0.0001)\n {\n return;\n }\n\n vec3 color = gl_FragColor.rgb / alpha;\n\n for(int i = 0; i < MAX_COLORS; i++)\n {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0)\n {\n break;\n }\n vec3 colorDiff = origColor - color;\n if (length(colorDiff) < epsilon)\n {\n vec3 targetColor = targetColors[i];\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\n return;\n }\n }\n}\n".replace(/%maxColors%/g,n)),this.epsilon=r,this._maxColors=n,this._replacements=null,this.uniforms.originalColors=new Float32Array(3*n),this.uniforms.targetColors=new Float32Array(3*n),this.replacements=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={replacements:{configurable:!0},maxColors:{configurable:!0},epsilon:{configurable:!0}};r.replacements.set=function(t){var e=this.uniforms.originalColors,r=this.uniforms.targetColors,n=t.length;if(n>this._maxColors)throw"Length of replacements ("+n+") exceeds the maximum colors length ("+this._maxColors+")";e[3*n]=-1;for(var o=0;o<n;o++){var a=t[o],s=a[0];"number"==typeof s?s=i.utils.hex2rgb(s):a[0]=i.utils.rgb2hex(s),e[3*o]=s[0],e[3*o+1]=s[1],e[3*o+2]=s[2];var u=a[1];"number"==typeof u?u=i.utils.hex2rgb(u):a[1]=i.utils.rgb2hex(u),r[3*o]=u[0],r[3*o+1]=u[1],r[3*o+2]=u[2]}this._replacements=t},r.replacements.get=function(){return this._replacements},e.prototype.refresh=function(){this.replacements=this._replacements},r.maxColors.get=function(){return this._maxColors},r.epsilon.set=function(t){this.uniforms.epsilon=t},r.epsilon.get=function(){return this.uniforms.epsilon},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r){void 0===r&&(r=0),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nuniform float sepia;\nuniform float noise;\nuniform float noiseSize;\nuniform float scratch;\nuniform float scratchDensity;\nuniform float scratchWidth;\nuniform float vignetting;\nuniform float vignettingAlpha;\nuniform float vignettingBlur;\nuniform float seed;\n\nconst float SQRT_2 = 1.414213;\nconst vec3 SEPIA_RGB = vec3(112.0 / 255.0, 66.0 / 255.0, 20.0 / 255.0);\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvec3 Overlay(vec3 src, vec3 dst)\n{\n // if (dst <= 0.5) then: 2 * src * dst\n // if (dst > 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\n}\n\n\nvoid main()\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 color = gl_FragColor.rgb;\n\n if (sepia > 0.0)\n {\n float gray = (color.x + color.y + color.z) / 3.0;\n vec3 grayscale = vec3(gray);\n\n color = Overlay(SEPIA_RGB, grayscale);\n\n color = grayscale + sepia * (color - grayscale);\n }\n\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\n dir.y *= dimensions.y / dimensions.x;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n if (scratchDensity > seed && scratch != 0.0)\n {\n float phase = seed * 256.0;\n float s = mod(floor(phase), 2.0);\n float dist = 1.0 / scratchDensity;\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\n if (d < seed * 0.6 + 0.4)\n {\n highp float period = scratchDensity * 10.0;\n\n float xx = coord.x * period + phase;\n float aa = abs(mod(xx, 0.5) * 4.0);\n float bb = mod(floor(xx / 0.5), 2.0);\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\n\n float kk = 2.0 * period;\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\n float dh = dw * kk;\n\n float tine = (yy - (2.0 - dh));\n\n if (tine > 0.0) {\n float _sign = sign(scratch);\n\n tine = s * tine / period + scratch + 0.1;\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\n\n color.rgb *= tine;\n }\n }\n }\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\n // float _noise = snoise(d) * 0.5;\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n color += _noise * noise;\n }\n\n gl_FragColor.rgb = color;\n}\n"),this.uniforms.dimensions=new Float32Array(2),"number"==typeof e?(this.seed=e,e=null):this.seed=r,Object.assign(this,{sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={sepia:{configurable:!0},noise:{configurable:!0},noiseSize:{configurable:!0},scratch:{configurable:!0},scratchDensity:{configurable:!0},scratchWidth:{configurable:!0},vignetting:{configurable:!0},vignettingAlpha:{configurable:!0},vignettingBlur:{configurable:!0}};e.prototype.apply=function(t,e,r,n){this.uniforms.dimensions[0]=e.sourceFrame.width,this.uniforms.dimensions[1]=e.sourceFrame.height,this.uniforms.seed=this.seed,t.applyFilter(this,e,r,n)},r.sepia.set=function(t){this.uniforms.sepia=t},r.sepia.get=function(){return this.uniforms.sepia},r.noise.set=function(t){this.uniforms.noise=t},r.noise.get=function(){return this.uniforms.noise},r.noiseSize.set=function(t){this.uniforms.noiseSize=t},r.noiseSize.get=function(){return this.uniforms.noiseSize},r.scratch.set=function(t){this.uniforms.scratch=t},r.scratch.get=function(){return this.uniforms.scratch},r.scratchDensity.set=function(t){this.uniforms.scratchDensity=t},r.scratchDensity.get=function(){return this.uniforms.scratchDensity},r.scratchWidth.set=function(t){this.uniforms.scratchWidth=t},r.scratchWidth.get=function(){return this.uniforms.scratchWidth},r.vignetting.set=function(t){this.uniforms.vignetting=t},r.vignetting.get=function(){return this.uniforms.vignetting},r.vignettingAlpha.set=function(t){this.uniforms.vignettingAlpha=t},r.vignettingAlpha.get=function(){return this.uniforms.vignettingAlpha},r.vignettingBlur.set=function(t){this.uniforms.vignettingBlur=t},r.vignettingBlur.get=function(){return this.uniforms.vignettingBlur},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(r,n,i){void 0===r&&(r=1),void 0===n&&(n=0),void 0===i&&(i=.1);var o=Math.max(i*e.MAX_SAMPLES,e.MIN_SAMPLES),a=(2*Math.PI/o).toFixed(7);t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 thickness;\nuniform vec4 outlineColor;\nuniform vec4 filterClamp;\n\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\n\nvoid main(void) {\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n vec2 displaced;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n".replace(/\$\{angleStep\}/,a)),this.uniforms.thickness=new Float32Array([0,0]),this.thickness=r,this.uniforms.outlineColor=new Float32Array([0,0,0,1]),this.color=n,this.quality=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={color:{configurable:!0}};return e.prototype.apply=function(t,e,r,n){this.uniforms.thickness[0]=this.thickness/e.size.width,this.uniforms.thickness[1]=this.thickness/e.size.height,t.applyFilter(this,e,r,n)},r.color.get=function(){return i.utils.rgb2hex(this.uniforms.outlineColor)},r.color.set=function(t){i.utils.hex2rgb(t,this.uniforms.outlineColor)},Object.defineProperties(e.prototype,r),e}(i.Filter));Rt.MIN_SAMPLES=1,Rt.MAX_SAMPLES=100;
|
|
108
37
|
/*!
|
|
109
|
-
* @pixi/filter-
|
|
110
|
-
* Compiled
|
|
38
|
+
* @pixi/filter-pixelate - v2.7.0
|
|
39
|
+
* Compiled Sun, 13 Jan 2019 22:51:52 UTC
|
|
111
40
|
*
|
|
112
|
-
* pixi-
|
|
41
|
+
* @pixi/filter-pixelate is licensed under the MIT License.
|
|
113
42
|
* http://www.opensource.org/licenses/mit-license
|
|
114
43
|
*/
|
|
115
|
-
var Mt="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",Dt="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform vec3 color;\nvoid main(void){\n vec4 sample = texture2D(uSampler, vTextureCoord);\n\n // Un-premultiply alpha before applying the color\n if (sample.a > 0.0) {\n sample.rgb /= sample.a;\n }\n\n // Premultiply alpha again\n sample.rgb = color.rgb * sample.a;\n\n // alpha user alpha\n sample *= alpha;\n\n gl_FragColor = sample;\n}",Lt=function(t){function e(e,r,n,i,o){void 0===e&&(e=45),void 0===r&&(r=5),void 0===n&&(n=2),void 0===i&&(i=0),void 0===o&&(o=.5),t.call(this),this.tintFilter=new PIXI.Filter(Mt,Dt),this.blurFilter=new PIXI.filters.BlurFilter,this.blurFilter.blur=n,this.rotation=e,this.padding=r,this.distance=r,this.alpha=o,this.color=i}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={distance:{},rotation:{},blur:{},alpha:{},color:{}};return e.prototype.apply=function(e,r,n){var i=e.getRenderTarget();i.transform=new PIXI.Matrix,i.transform.translate(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle)),this.tintFilter.apply(e,r,i,!0),this.blurFilter.apply(e,i,n),t.prototype.apply.call(this,e,r,n),i.transform=null,e.returnRenderTarget(i)},e.prototype.updatePadding=function(){this.padding=this.distance+2*this.blur},r.distance.get=function(){return this._distance},r.distance.set=function(t){this._distance=t,this.updatePadding()},r.rotation.get=function(){return this.angle/PIXI.DEG_TO_RAD},r.rotation.set=function(t){this.angle=t*PIXI.DEG_TO_RAD},r.blur.get=function(){return this.blurFilter.blur},r.blur.set=function(t){this.blurFilter.blur=t,this.updatePadding()},r.alpha.get=function(){return this.tintFilter.uniforms.alpha},r.alpha.set=function(t){this.tintFilter.uniforms.alpha=t},r.color.get=function(){return PIXI.utils.rgb2hex(this.tintFilter.uniforms.color)},r.color.set=function(t){PIXI.utils.hex2rgb(t,this.tintFilter.uniforms.color)},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.DropShadowFilter=Lt;
|
|
44
|
+
(function(t){function e(e){void 0===e&&(e=10),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform vec2 size;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n\treturn floor( coord / size ) * size;\n}\n\nvoid main(void)\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = pixelate(coord, size);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord);\n}\n"),this.size=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={size:{configurable:!0}};r.size.get=function(){return this.uniforms.size},r.size.set=function(t){"number"==typeof t&&(t=[t,t]),this.uniforms.size=t},Object.defineProperties(e.prototype,r)})(i.Filter),function(t){function e(e,r,n,i){void 0===e&&(e=0),void 0===r&&(r=[0,0]),void 0===n&&(n=5),void 0===i&&(i=-1),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float uRadian;\nuniform vec2 uCenter;\nuniform float uRadius;\nuniform int uKernelSize;\n\nconst int MAX_KERNEL_SIZE = 2048;\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n if (uKernelSize == 0)\n {\n gl_FragColor = color;\n return;\n }\n\n float aspect = filterArea.y / filterArea.x;\n vec2 center = uCenter.xy / filterArea.xy;\n float gradient = uRadius / filterArea.x * 0.3;\n float radius = uRadius / filterArea.x - gradient * 0.5;\n int k = uKernelSize - 1;\n\n vec2 coord = vTextureCoord;\n vec2 dir = vec2(center - coord);\n float dist = length(vec2(dir.x, dir.y * aspect));\n\n float radianStep = uRadian;\n if (radius >= 0.0 && dist > radius) {\n float delta = dist - radius;\n float gap = gradient;\n float scale = 1.0 - abs(delta / gap);\n if (scale <= 0.0) {\n gl_FragColor = color;\n return;\n }\n radianStep *= scale;\n }\n radianStep /= float(k);\n\n float s = sin(radianStep);\n float c = cos(radianStep);\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\n\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\n if (i == k) {\n break;\n }\n\n coord -= center;\n coord.y *= aspect;\n coord = rotationMatrix * coord;\n coord.y /= aspect;\n coord += center;\n\n vec4 sample = texture2D(uSampler, coord);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample;\n }\n\n gl_FragColor = color / float(uKernelSize);\n}\n"),this._angle=0,this.angle=e,this.center=r,this.kernelSize=n,this.radius=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={angle:{configurable:!0},center:{configurable:!0},radius:{configurable:!0}};e.prototype.apply=function(t,e,r,n){this.uniforms.uKernelSize=0!==this._angle?this.kernelSize:0,t.applyFilter(this,e,r,n)},r.angle.set=function(t){this._angle=t,this.uniforms.uRadian=t*Math.PI/180},r.angle.get=function(){return this._angle},r.center.get=function(){return this.uniforms.uCenter},r.center.set=function(t){this.uniforms.uCenter=t},r.radius.get=function(){return this.uniforms.uRadius},r.radius.set=function(t){(t<0||t===1/0)&&(t=-1),this.uniforms.uRadius=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e){t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nuniform bool mirror;\nuniform float boundary;\nuniform vec2 amplitude;\nuniform vec2 waveLength;\nuniform vec2 alpha;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n if (coord.y < boundary) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\n float areaY = boundary * dimensions.y / filterArea.y;\n float v = areaY + areaY - vTextureCoord.y;\n float y = mirror ? v : vTextureCoord.y;\n\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\n\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\n x = clamp(x, filterClamp.x, filterClamp.z);\n\n vec4 color = texture2D(uSampler, vec2(x, y));\n\n gl_FragColor = color * _alpha;\n}\n"),this.uniforms.amplitude=new Float32Array(2),this.uniforms.waveLength=new Float32Array(2),this.uniforms.alpha=new Float32Array(2),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,{mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0},e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={mirror:{configurable:!0},boundary:{configurable:!0},amplitude:{configurable:!0},waveLength:{configurable:!0},alpha:{configurable:!0}};e.prototype.apply=function(t,e,r,n){this.uniforms.dimensions[0]=e.sourceFrame.width,this.uniforms.dimensions[1]=e.sourceFrame.height,this.uniforms.time=this.time,t.applyFilter(this,e,r,n)},r.mirror.set=function(t){this.uniforms.mirror=t},r.mirror.get=function(){return this.uniforms.mirror},r.boundary.set=function(t){this.uniforms.boundary=t},r.boundary.get=function(){return this.uniforms.boundary},r.amplitude.set=function(t){this.uniforms.amplitude[0]=t[0],this.uniforms.amplitude[1]=t[1]},r.amplitude.get=function(){return this.uniforms.amplitude},r.waveLength.set=function(t){this.uniforms.waveLength[0]=t[0],this.uniforms.waveLength[1]=t[1]},r.waveLength.get=function(){return this.uniforms.waveLength},r.alpha.set=function(t){this.uniforms.alpha[0]=t[0],this.uniforms.alpha[1]=t[1]},r.alpha.get=function(){return this.uniforms.alpha},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n){void 0===e&&(e=[-10,0]),void 0===r&&(r=[0,10]),void 0===n&&(n=[0,0]),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n"),this.red=e,this.green=r,this.blue=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={red:{configurable:!0},green:{configurable:!0},blue:{configurable:!0}};r.red.get=function(){return this.uniforms.red},r.red.set=function(t){this.uniforms.red=t},r.green.get=function(){return this.uniforms.green},r.green.set=function(t){this.uniforms.green=t},r.blue.get=function(){return this.uniforms.blue},r.blue.set=function(t){this.uniforms.blue=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n){void 0===e&&(e=[0,0]),void 0===r&&(r={}),void 0===n&&(n=0),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nuniform vec2 center;\n\nuniform float amplitude;\nuniform float wavelength;\n// uniform float power;\nuniform float brightness;\nuniform float speed;\nuniform float radius;\n\nuniform float time;\n\nconst float PI = 3.14159;\n\nvoid main()\n{\n float halfWavelength = wavelength * 0.5 / filterArea.x;\n float maxRadius = radius / filterArea.x;\n float currentRadius = time * speed / filterArea.x;\n\n float fade = 1.0;\n\n if (maxRadius > 0.0) {\n if (currentRadius > maxRadius) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\n }\n\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\n dir.y *= filterArea.y / filterArea.x;\n float dist = length(dir);\n\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n vec2 diffUV = normalize(dir);\n\n float diff = (dist - currentRadius) / halfWavelength;\n\n float p = 1.0 - pow(abs(diff), 2.0);\n\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\n\n vec2 offset = diffUV * powDiff / filterArea.xy;\n\n // Do clamp :\n vec2 coord = vTextureCoord + offset;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n // No clamp :\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\n\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\n\n gl_FragColor = color;\n}\n"),this.center=e,Array.isArray(r)&&(console.warn("Deprecated Warning: ShockwaveFilter params Array has been changed to options Object."),r={}),r=Object.assign({amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1},r),this.amplitude=r.amplitude,this.wavelength=r.wavelength,this.brightness=r.brightness,this.speed=r.speed,this.radius=r.radius,this.time=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={center:{configurable:!0},amplitude:{configurable:!0},wavelength:{configurable:!0},brightness:{configurable:!0},speed:{configurable:!0},radius:{configurable:!0}};e.prototype.apply=function(t,e,r,n){this.uniforms.time=this.time,t.applyFilter(this,e,r,n)},r.center.get=function(){return this.uniforms.center},r.center.set=function(t){this.uniforms.center=t},r.amplitude.get=function(){return this.uniforms.amplitude},r.amplitude.set=function(t){this.uniforms.amplitude=t},r.wavelength.get=function(){return this.uniforms.wavelength},r.wavelength.set=function(t){this.uniforms.wavelength=t},r.brightness.get=function(){return this.uniforms.brightness},r.brightness.set=function(t){this.uniforms.brightness=t},r.speed.get=function(){return this.uniforms.speed},r.speed.set=function(t){this.uniforms.speed=t},r.radius.get=function(){return this.uniforms.radius},r.radius.set=function(t){this.uniforms.radius=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n){void 0===r&&(r=0),void 0===n&&(n=1),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D uLightmap;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\nuniform vec4 ambientColor;\nvoid main() {\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\n vec4 light = texture2D(uLightmap, lightCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vec4(finalColor, diffuseColor.a);\n}\n"),this.uniforms.dimensions=new Float32Array(2),this.uniforms.ambientColor=new Float32Array([0,0,0,n]),this.texture=e,this.color=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={texture:{configurable:!0},color:{configurable:!0},alpha:{configurable:!0}};e.prototype.apply=function(t,e,r,n){this.uniforms.dimensions[0]=e.sourceFrame.width,this.uniforms.dimensions[1]=e.sourceFrame.height,t.applyFilter(this,e,r,n)},r.texture.get=function(){return this.uniforms.uLightmap},r.texture.set=function(t){this.uniforms.uLightmap=t},r.color.set=function(t){var e=this.uniforms.ambientColor;"number"==typeof t?(i.utils.hex2rgb(t,e),this._color=t):(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this._color=i.utils.rgb2hex(e))},r.color.get=function(){return this._color},r.alpha.get=function(){return this.uniforms.ambientColor[3]},r.alpha.set=function(t){this.uniforms.ambientColor[3]=t},Object.defineProperties(e.prototype,r)}(i.Filter);
|
|
116
45
|
/*!
|
|
117
|
-
* @pixi/filter-
|
|
118
|
-
* Compiled
|
|
46
|
+
* @pixi/filter-radial-blur - v2.7.0
|
|
47
|
+
* Compiled Sun, 13 Jan 2019 22:51:52 UTC
|
|
119
48
|
*
|
|
120
|
-
* pixi-
|
|
49
|
+
* @pixi/filter-radial-blur is licensed under the MIT License.
|
|
121
50
|
* http://www.opensource.org/licenses/mit-license
|
|
122
|
-
*/
|
|
123
|
-
var Ut="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",Nt="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float strength;\nuniform vec4 filterArea;\n\n\nvoid main(void)\n{\n\tvec2 onePixel = vec2(1.0 / filterArea);\n\n\tvec4 color;\n\n\tcolor.rgb = vec3(0.5);\n\n\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\n\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\n\n\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\n\n\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\n\n\tgl_FragColor = vec4(color.rgb * alpha, alpha);\n}\n",Ft=function(t){function e(e){void 0===e&&(e=5),t.call(this,Ut,Nt),this.strength=e}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={strength:{}};return r.strength.get=function(){return this.uniforms.strength},r.strength.set=function(t){this.uniforms.strength=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.EmbossFilter=Ft;
|
|
124
|
-
/*!
|
|
125
|
-
* @pixi/filter-glow - v2.0.1
|
|
126
|
-
* Compiled Tue, 12 Sep 2017 17:14:01 UTC
|
|
127
|
-
*
|
|
128
|
-
* pixi-filters is licensed under the MIT License.
|
|
129
|
-
* http://www.opensource.org/licenses/mit-license
|
|
130
|
-
*/
|
|
131
|
-
var jt="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n",kt="varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nuniform float distance;\nuniform float outerStrength;\nuniform float innerStrength;\nuniform vec4 glowColor;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nvec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float totalAlpha = 0.0;\n float maxTotalAlpha = 0.0;\n float cosAngle;\n float sinAngle;\n vec2 displaced;\n for (float angle = 0.0; angle <= PI * 2.0; angle += %QUALITY_DIST%) {\n cosAngle = cos(angle);\n sinAngle = sin(angle);\n for (float curDistance = 1.0; curDistance <= %DIST%; curDistance++) {\n displaced.x = vTextureCoord.x + cosAngle * curDistance * px.x;\n displaced.y = vTextureCoord.y + sinAngle * curDistance * px.y;\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n totalAlpha += (distance - curDistance) * curColor.a;\n maxTotalAlpha += (distance - curDistance);\n }\n }\n maxTotalAlpha = max(maxTotalAlpha, 0.0001);\n\n ownColor.a = max(ownColor.a, 0.0001);\n ownColor.rgb = ownColor.rgb / ownColor.a;\n float outerGlowAlpha = (totalAlpha / maxTotalAlpha) * outerStrength * (1. - ownColor.a);\n float innerGlowAlpha = ((maxTotalAlpha - totalAlpha) / maxTotalAlpha) * innerStrength * ownColor.a;\n float resultAlpha = (ownColor.a + outerGlowAlpha);\n gl_FragColor = vec4(mix(mix(ownColor.rgb, glowColor.rgb, innerGlowAlpha / ownColor.a), glowColor.rgb, outerGlowAlpha / resultAlpha) * resultAlpha, resultAlpha);\n}\n",Bt=function(t){function e(e,r,n,i,o){void 0===e&&(e=10),void 0===r&&(r=4),void 0===n&&(n=0),void 0===i&&(i=16777215),void 0===o&&(o=.1),t.call(this,jt,kt.replace(/%QUALITY_DIST%/gi,""+(1/o/e).toFixed(7)).replace(/%DIST%/gi,""+e.toFixed(7))),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.distance=e,this.color=i,this.outerStrength=r,this.innerStrength=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={color:{},distance:{},outerStrength:{},innerStrength:{}};return r.color.get=function(){return PIXI.utils.rgb2hex(this.uniforms.glowColor)},r.color.set=function(t){PIXI.utils.hex2rgb(t,this.uniforms.glowColor)},r.distance.get=function(){return this.uniforms.distance},r.distance.set=function(t){this.uniforms.distance=t},r.outerStrength.get=function(){return this.uniforms.outerStrength},r.outerStrength.set=function(t){this.uniforms.outerStrength=t},r.innerStrength.get=function(){return this.uniforms.innerStrength},r.innerStrength.set=function(t){this.uniforms.innerStrength=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.GlowFilter=Bt;
|
|
132
|
-
/*!
|
|
133
|
-
* @pixi/filter-outline - v2.0.1
|
|
134
|
-
* Compiled Tue, 12 Sep 2017 17:14:01 UTC
|
|
135
|
-
*
|
|
136
|
-
* pixi-filters is licensed under the MIT License.
|
|
137
|
-
* http://www.opensource.org/licenses/mit-license
|
|
138
|
-
*/
|
|
139
|
-
var Ht="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n",Xt="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float thickness;\nuniform vec4 outlineColor;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nvec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\n\nvoid main(void) {\n const float PI = 3.14159265358979323846264;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n vec2 displaced;\n for (float angle = 0.; angle < PI * 2.; angle += %THICKNESS% ) {\n displaced.x = vTextureCoord.x + thickness * px.x * cos(angle);\n displaced.y = vTextureCoord.y + thickness * px.y * sin(angle);\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n",Wt=function(t){function e(e,r){void 0===e&&(e=1),void 0===r&&(r=0),t.call(this,Ht,Xt.replace(/%THICKNESS%/gi,(1/e).toFixed(7))),this.thickness=e,this.uniforms.outlineColor=new Float32Array([0,0,0,1]),this.color=r}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={color:{},thickness:{}};return r.color.get=function(){return PIXI.utils.rgb2hex(this.uniforms.outlineColor)},r.color.set=function(t){PIXI.utils.hex2rgb(t,this.uniforms.outlineColor)},r.thickness.get=function(){return this.uniforms.thickness},r.thickness.set=function(t){this.uniforms.thickness=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.OutlineFilter=Wt;
|
|
140
|
-
/*!
|
|
141
|
-
* @pixi/filter-pixelate - v2.0.1
|
|
142
|
-
* Compiled Tue, 12 Sep 2017 17:14:01 UTC
|
|
143
|
-
*
|
|
144
|
-
* pixi-filters is licensed under the MIT License.
|
|
145
|
-
* http://www.opensource.org/licenses/mit-license
|
|
146
|
-
*/
|
|
147
|
-
var Gt="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",Yt="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform vec2 size;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n\treturn floor( coord / size ) * size;\n}\n\nvoid main(void)\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = pixelate(coord, size);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord);\n}\n",zt=function(t){function e(e){void 0===e&&(e=10),t.call(this,Gt,Yt),this.size=e}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={size:{}};return r.size.get=function(){return this.uniforms.size},r.size.set=function(t){"number"==typeof t&&(t=[t,t]),this.uniforms.size=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.PixelateFilter=zt;
|
|
148
|
-
/*!
|
|
149
|
-
* @pixi/filter-rgb-split - v2.0.1
|
|
150
|
-
* Compiled Tue, 12 Sep 2017 17:14:04 UTC
|
|
151
|
-
*
|
|
152
|
-
* pixi-filters is licensed under the MIT License.
|
|
153
|
-
* http://www.opensource.org/licenses/mit-license
|
|
154
|
-
*/
|
|
155
|
-
var Vt="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",Kt="precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n",qt=function(t){function e(e,r,n){void 0===e&&(e=[-10,0]),void 0===r&&(r=[0,10]),void 0===n&&(n=[0,0]),t.call(this,Vt,Kt),this.red=e,this.green=r,this.blue=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={red:{},green:{},blue:{}};return r.red.get=function(){return this.uniforms.red},r.red.set=function(t){this.uniforms.red=t},r.green.get=function(){return this.uniforms.green},r.green.set=function(t){this.uniforms.green=t},r.blue.get=function(){return this.uniforms.blue},r.blue.set=function(t){this.uniforms.blue=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.RGBSplitFilter=qt;
|
|
156
|
-
/*!
|
|
157
|
-
* @pixi/filter-shockwave - v2.0.1
|
|
158
|
-
* Compiled Tue, 12 Sep 2017 17:14:04 UTC
|
|
159
|
-
*
|
|
160
|
-
* pixi-filters is licensed under the MIT License.
|
|
161
|
-
* http://www.opensource.org/licenses/mit-license
|
|
162
|
-
*/
|
|
163
|
-
var Zt="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",$t="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nuniform vec2 center;\nuniform vec3 params; // 10.0, 0.8, 0.1\nuniform float time;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nvoid main()\n{\n vec2 uv = vTextureCoord * filterArea.xy / dimensions.xy;\n vec2 coord = uv;\n\n float dist = distance(coord, center);\n\n if ( (dist <= (time + params.z)) && (dist >= (time - params.z)) )\n {\n float diff = (dist - time);\n float powDiff = 1.0 - pow(abs(diff*params.x), params.y);\n\n float diffTime = diff * powDiff;\n vec2 diffUV = normalize(uv - center);\n coord = uv + (diffUV * diffTime);\n }\n\n coord *= dimensions.xy / filterArea.xy;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n gl_FragColor = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n gl_FragColor *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n}\n",Jt=function(t){function e(e,r,n){void 0===e&&(e=[.5,.5]),void 0===r&&(r=[10,.8,.1]),void 0===n&&(n=0),t.call(this,Zt,$t,{center:{type:"v2",value:{x:.5,y:.5}},params:{type:"v3",value:{x:10,y:.8,z:.1}},time:{type:"1f",value:0},dimensions:{type:"2f",value:[0,0]}}),this.center=e,this.params=r,this.time=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={center:{},params:{},time:{}};return e.prototype.apply=function(t,e,r){this.uniforms.dimensions[0]=e.sourceFrame.width,this.uniforms.dimensions[1]=e.sourceFrame.height,t.applyFilter(this,e,r)},r.center.get=function(){return this.uniforms.center},r.center.set=function(t){this.uniforms.center=t},r.params.get=function(){return this.uniforms.params},r.params.set=function(t){this.uniforms.params=t},r.time.get=function(){return this.uniforms.time},r.time.set=function(t){this.uniforms.time=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.ShockwaveFilter=Jt;
|
|
164
|
-
/*!
|
|
165
|
-
* @pixi/filter-simple-lightmap - v2.0.1
|
|
166
|
-
* Compiled Tue, 12 Sep 2017 17:14:04 UTC
|
|
167
|
-
*
|
|
168
|
-
* pixi-filters is licensed under the MIT License.
|
|
169
|
-
* http://www.opensource.org/licenses/mit-license
|
|
170
|
-
*/
|
|
171
|
-
var Qt="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",te="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D uLightmap;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\nuniform vec4 ambientColor;\nvoid main() {\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\n vec4 light = texture2D(uLightmap, lightCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vec4(finalColor, diffuseColor.a);\n}\n",ee=function(t){function e(e,r){void 0===r&&(r=0),t.call(this,Qt,te),this.uniforms.ambientColor=new Float32Array([0,0,0,1]),this.texture=e,this.color=r}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={texture:{},color:{},alpha:{}};return e.prototype.apply=function(t,e,r,n){this.uniforms.dimensions[0]=e.sourceFrame.width,this.uniforms.dimensions[1]=e.sourceFrame.height,t.applyFilter(this,e,r,n)},r.texture.get=function(){return this.uniforms.uLightmap},r.texture.set=function(t){this.uniforms.uLightmap=t},r.color.set=function(t){var e=this.uniforms.ambientColor;"number"==typeof t?(PIXI.utils.hex2rgb(t,e),this._color=t):(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this._color=PIXI.utils.rgb2hex(e))},r.color.get=function(){return this._color},r.alpha.get=function(){return this.uniforms.ambientColor[3]},r.alpha.set=function(t){this.uniforms.ambientColor[3]=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.SimpleLightmapFilter=ee;
|
|
172
|
-
/*!
|
|
173
|
-
* @pixi/filter-tilt-shift - v2.0.1
|
|
174
|
-
* Compiled Tue, 12 Sep 2017 17:14:05 UTC
|
|
175
|
-
*
|
|
176
|
-
* pixi-filters is licensed under the MIT License.
|
|
177
|
-
* http://www.opensource.org/licenses/mit-license
|
|
178
|
-
*/
|
|
179
|
-
var re="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",ne="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\n\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\n\n for (float t = -30.0; t <= 30.0; t++)\n {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\n sample.rgb *= sample.a;\n color += sample * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n}\n",ie=function(t){function e(e,r,n,i){void 0===e&&(e=100),void 0===r&&(r=600),void 0===n&&(n=null),void 0===i&&(i=null),t.call(this,re,ne),this.uniforms.blur=e,this.uniforms.gradientBlur=r,this.uniforms.start=n||new PIXI.Point(0,window.innerHeight/2),this.uniforms.end=i||new PIXI.Point(600,window.innerHeight/2),this.uniforms.delta=new PIXI.Point(30,30),this.uniforms.texSize=new PIXI.Point(window.innerWidth,window.innerHeight),this.updateDelta()}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={blur:{},gradientBlur:{},start:{},end:{}};return e.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},r.blur.get=function(){return this.uniforms.blur},r.blur.set=function(t){this.uniforms.blur=t},r.gradientBlur.get=function(){return this.uniforms.gradientBlur},r.gradientBlur.set=function(t){this.uniforms.gradientBlur=t},r.start.get=function(){return this.uniforms.start},r.start.set=function(t){this.uniforms.start=t,this.updateDelta()},r.end.get=function(){return this.uniforms.end},r.end.set=function(t){this.uniforms.end=t,this.updateDelta()},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.TiltShiftAxisFilter=ie;var oe=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateDelta=function(){var t=this.uniforms.end.x-this.uniforms.start.x,e=this.uniforms.end.y-this.uniforms.start.y,r=Math.sqrt(t*t+e*e);this.uniforms.delta.x=t/r,this.uniforms.delta.y=e/r},e}(ie);PIXI.filters.TiltShiftXFilter=oe;var ae=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateDelta=function(){var t=this.uniforms.end.x-this.uniforms.start.x,e=this.uniforms.end.y-this.uniforms.start.y,r=Math.sqrt(t*t+e*e);this.uniforms.delta.x=-e/r,this.uniforms.delta.y=t/r},e}(ie);PIXI.filters.TiltShiftYFilter=ae;var se=function(t){function e(e,r,n,i){void 0===e&&(e=100),void 0===r&&(r=600),void 0===n&&(n=null),void 0===i&&(i=null),t.call(this),this.tiltShiftXFilter=new oe(e,r,n,i),this.tiltShiftYFilter=new ae(e,r,n,i)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={blur:{},gradientBlur:{},start:{},end:{}};return e.prototype.apply=function(t,e,r){var n=t.getRenderTarget(!0);this.tiltShiftXFilter.apply(t,e,n),this.tiltShiftYFilter.apply(t,n,r),t.returnRenderTarget(n)},r.blur.get=function(){return this.tiltShiftXFilter.blur},r.blur.set=function(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t},r.gradientBlur.get=function(){return this.tiltShiftXFilter.gradientBlur},r.gradientBlur.set=function(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t},r.start.get=function(){return this.tiltShiftXFilter.start},r.start.set=function(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t},r.end.get=function(){return this.tiltShiftXFilter.end},r.end.set=function(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.TiltShiftFilter=se;
|
|
180
|
-
/*!
|
|
181
|
-
* @pixi/filter-twist - v2.0.1
|
|
182
|
-
* Compiled Tue, 12 Sep 2017 17:14:07 UTC
|
|
183
|
-
*
|
|
184
|
-
* pixi-filters is licensed under the MIT License.
|
|
185
|
-
* http://www.opensource.org/licenses/mit-license
|
|
186
|
-
*/
|
|
187
|
-
var ue="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",le="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 twist(vec2 coord)\n{\n coord -= offset;\n\n float dist = length(coord);\n\n if (dist < radius)\n {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n\n coord += offset;\n\n return coord;\n}\n\nvoid main(void)\n{\n\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = twist(coord);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord );\n\n}\n",ce=function(t){function e(e,r,n){void 0===e&&(e=200),void 0===r&&(r=4),void 0===n&&(n=20),t.call(this,ue,le),this.radius=e,this.angle=r,this.padding=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={offset:{},radius:{},angle:{}};return r.offset.get=function(){return this.uniforms.offset},r.offset.set=function(t){this.uniforms.offset=t},r.radius.get=function(){return this.uniforms.radius},r.radius.set=function(t){this.uniforms.radius=t},r.angle.get=function(){return this.uniforms.angle},r.angle.set=function(t){this.uniforms.angle=t},Object.defineProperties(e.prototype,r),e}(PIXI.Filter);PIXI.filters.TwistFilter=ce;var he=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function fe(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,r){return function n(i,o){try{var a=e[i](o),s=a.value}catch(t){return void r(t)}if(!a.done)return Promise.resolve(s).then(function(t){n("next",t)},function(t){n("throw",t)});t(s)}("next")})}}const{TextureCache:de}=i.utils,pe=100,_e=3e3,ve=100,ge={};class ye{constructor(t){const{logger:e,world:r}=t;this.logger=e,this.world=r,this.delivering=!1,this.loadedResources={},this.queue=[],this.maxSvgSize=Math.round(_e/ve)*ve}load(t={},e=[]){return new Promise((e,r)=>{try{Object.keys(t).forEach(e=>i.loader.add(e,t[e])),i.loader.load((t,r)=>{Object.assign(this.loadedResources,r),e()})}catch(t){r(t)}}).then(()=>Promise.all(e.map(t=>{const e=this.loadedResources[t];return e||this.logger.error("Cannot create scaled textures for",t),e.texture._resourceName=e.name,new Promise((t,r)=>{if(ge[e.name])t();else{const n=new XMLHttpRequest;n.onload=(()=>{if(n.readyState!==n.DONE||200!==n.status)throw new Error("Failed to load SVG using XHR.");ge[e.name]=n.response,t()}),n.onerror=r,n.open("GET",e.url,!0),n.send()}}).then(()=>{const t=[];for(let r=pe;r<=this.maxSvgSize;r+=ve){let n=de[e.name+r];if(!n){const t=new i.BaseTexture;t.sourceScale=r/this.world.options.VIEW_BOX,t.imageUrl=e.url,t.source=e.data,t._loadSvgSourceUsingString(ge[e.name]),n=new i.Texture(t),i.Texture.addToCache(n,e.name+r)}e.scaledSvgTextures=e.scaledSvgTextures||{},e.scaledSvgTextures[r]=n,t.push(new Promise(t=>ut.onTextureLoaded(n,t)))}return Promise.all(t)})}))).then(()=>this.loadedResources)}getResource(t,...e){var r=this;return fe(function*(){const{logger:n}=r;return r.delivering?new Promise(function(i,o){n.debug(`Put resource to queue resource ${t}`),r.queue.push({resource:{name:t,otherParams:he({},e)},resolve:i,reject:o})}):(n.debug(`Getting resource ${t}`),r.loadedResources[t]||r._loadResource.apply(r,[t].concat(e)))})()}getCachedResource(t){return this.loadedResources[t]}release(){this.loadedResources={},i.loader.reset()}_loadResource(t,e=t){var r=this;return fe(function*(){const{logger:n}=r;r.delivering=!0;try{const o={loadType:2};return i.loader.add(t,e,o),n.debug(`Delivering resource ${t}`),(yield r.load())[t]}finally{i.loader.reset(),r.delivering=!1,r._loadRest()}})()}_loadRest(){var t=this;return fe(function*(){const{logger:e}=t,r=t.queue.shift();if(r){const{resource:{name:n},resolve:i,reject:o}=r,a=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(r.resource.otherParams,[]);try{e.debug(`Taking the next resource ${n}`),i(yield t.getResource.apply(t,[n].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(a))))}catch(t){e.warn(`Something wrong loading resource ${n}`,t),o(t)}yield t._loadRest()}else e.debug("No resource in queue. Idling")})()}}var me=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};const{BlurFilter:Ee}=i.filters;var xe=(t,e,r=[])=>{const{rootContainer:n,logger:i,id:o="object",payload:{id:a=o,parentId:s,addToParent:u=!0,Class:l=e,constructorParams:c=r,width:h,height:f,scale:d,shouldCreate:p=!0,pivot:_,anchor:v,blur:g}={},scope:y}=t,m=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(t.payload,["id","parentId","addToParent","Class","constructorParams","width","height","scale","shouldCreate","pivot","anchor","blur"]),E=y[a];if(E&&(E.destroy(),delete y[a]),!ut.parseExpression(p,t))return;const x=s?y[s]:n;if(!x)return void i.warn("No parent available with id",s);const b=new(Function.prototype.bind.apply(l,[null].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(c)))),T=d?me({},d):{x:1,y:1},R=_?me({},_):{},O=v?me({},v):{};if(void 0!==h&&(b._parsedWidth=ut.parseExpression(h,t),T.x=b._parsedWidth/b.width,void 0===f&&(T.y=T.x,b._parsedHeight=b._parsedWidth)),void 0!==f&&(b._parsedHeight=ut.parseExpression(f,t),T.y=b._parsedHeight/b.height,void 0===h&&(T.x=T.y,b._parsedWidth=b._parsedHeight)),void 0!==R.x?R.x=ut.parseExpression(R.x,t)/T.x:void 0===O.x&&(O.x=.5),void 0!==R.y?R.y=ut.parseExpression(R.y,t)/T.y:void 0===O.y&&(O.y=.5),Object.assign(b,ut.parseExpression(m,t)),Object.assign(b.scale,ut.parseExpression(T,t)),b.anchor&&Object.assign(b.anchor,ut.parseExpression(O,t)),Object.assign(b.pivot,ut.parseExpression(R,t)),void 0!==g){const e=new Ee(ut.parseExpression(g,t));e.blendMode=b.blendMode,b.filters=[e]}u&&x.addChild(b),y[a]=b;const S=b.destroy.bind(b);return b.destroy=(()=>{y[a]=void 0,S()}),b},be=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function Te(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var Re=t=>{const{logger:e,payload:{drawings:r=[]}={}}=t,n=Te(t.payload,["drawings"]),o=Te(t,["logger","payload"]),a=xe(Object.assign(t,be({logger:e,payload:n},o)),i.Graphics);return a&&r.forEach(({method:r,params:n=[]})=>{const i=ut.parseExpressions(n,t),o=a[r];o||e.warn("Cannot resolve drawing method",r),o.call.apply(o,[a].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(i)))}),a},Oe=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function Se(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var we=t=>{const{payload:{color:e,radius:r=25,stroke:n=0,strokeWidth:i}={}}=t,o=Se(t.payload,["color","radius","stroke","strokeWidth"]),a=Se(t,["payload"]),s=Re(Oe({payload:o},a));return s&&(i&&s.lineStyle(i,n,1),(e||0===e)&&s.beginFill(e),s.drawCircle(0,0,ut.parseExpression(r,t)),(e||0===e)&&s.endFill()),s},Ce=t=>xe(t,i.Container);const Ae=(t,e,r,n)=>{let i=Math.atan2(n-e,r-t)+Math.PI/2;return i>Math.PI?i-=2*Math.PI:i<-Math.PI&&(i+=2*Math.PI),i},Ie=({x:t,y:e},{CELL_SIZE:r})=>({x:r*t,y:r*e});const{BlurFilter:Pe}=i.filters,Me=.6,De=16770355,Le=16724787,Ue=16777011,Ne=2941736,Fe=13385022,je=3962311,ke=12164347,Be=16777215,He=16770355;function Xe(t,e,r){return t+(e-t)*r}function We(t,e,r,n,i,o,a){if(n.x===i.x&&n.y===i.y)return;const{ATTACK_PENETRATION:s}=a,{x:u,y:l}=Ie(i,a),{x:c,y:h}=Ie(n,a);e.x=c,e.y=h;const f=u-c,d=l-h,p=0!==f?f/Math.abs(f)*s:0,_=0!==d?d/Math.abs(d)*s:0;r.mainContainer&&t.push({action:new L(Ae(e.x,e.y,u,l),Math.max(o/5,.4)),target:r.mainContainer}),t.push({action:new N([new M(p,_,1*o/4),new M(-p,-_,3*o/4)]),target:e})}function Ge(t,e,r,n,i=0){const o=new N([new d(i),new h(1,(r-i)/4),new h(0,3*(r-i)/4)]);return t.coverSprite.children[0].tint=e,t.coverSprite.children[1].tint=e,n&&t.coverSprite.position.copy(n),{action:o,target:t.coverSprite}}function Ye(t,e,r,n=0){const i=new N([new d(n),new h(.5,(r-n)/4),new h(0,3*(r-n)/4)]);return t.childCoverSprite.tint=e,{action:i,target:t.childCoverSprite}}function ze(t,e,r,n,o,a,s,u=12,l,c=Me){const h=c*o,d=new i.Graphics;d.x=r.x,d.y=r.y;const{x:p,y:_}=Ie(n,a),v=p-d.x,g=_-d.y;return l&&(d.filters=[new Pe(l)],d.alpha=.7),e.app.renderer instanceof i.WebGLRenderer&&(d.blendMode=i.BLEND_MODES.ADD),d.parentLayer=e.layers.effects,t.addChild(d),{action:new f(function(t,e,r,n,i,o,a){return(s,u,l)=>{const c=u-l;if(c<=0)return void s.destroy(!0);let h=c/(1e3*t);s.clear(),s.lineStyle(e,r,1),h<.5?(h*=2,s.moveTo(n,i),s.lineTo(Xe(n,o,h),Xe(i,a,h))):(h=2*(h-.5),s.moveTo(n+(o-n)*h,i+(a-i)*h),s.lineTo(o,a))}}(h,u,s,v,g,0,0),h),target:d}}function Ve(t,e,r,n,i,o,a,s,u,l,c){t.push(ze(e,r,n,i,o,a,s,u,void 0,c)),t.push(ze(e,r,n,i,o,a,s,u,l,c))}const Ke=-Math.PI/2,qe=2*Math.PI/50/2,Ze=50,$e=18,Je={move:{color:11188165,order:0,backSide:!0},work:{color:16639348,order:1},carry:{color:6710886,order:6},attack:{color:16199233,order:2},ranged_attack:{color:8366053,order:3},heal:{color:5689182,order:4},claim:{color:12164347,order:5}};function Qe(t,e,r,n,o,a){const s=new i.Graphics;return s.lineStyle($e,t,1),s.arc(0,0,Ze-$e/2,Ke+e,Ke+r,a),s.tint=t,n.addChild(s),o.push(s),s}function tr(t){return Array.isArray(t)?t:Object.keys(t).sort().map(e=>t[e])}var er=r(1),rr=r.n(er);const nr={[rr.a.PWR_DISRUPT_SOURCE]:"disrupt-source",[rr.a.PWR_DISRUPT_SPAWN]:"disrupt-spawn",[rr.a.PWR_DISRUPT_TERMINAL]:"disrupt-terminal",[rr.a.PWR_DISRUPT_TOWER]:"disrupt-tower",[rr.a.PWR_REGEN_MINERAL]:"regen-mineral",[rr.a.PWR_REGEN_SOURCE]:"regen-source",[rr.a.PWR_GENERATE_OPS]:"generate-ops",[rr.a.PWR_OPERATE_EXTENSION]:"operate-extension",[rr.a.PWR_OPERATE_LAB]:"operate-lab",[rr.a.PWR_OPERATE_OBSERVER]:"operate-observer",[rr.a.PWR_OPERATE_SPAWN]:"operate-spawn",[rr.a.PWR_OPERATE_STORAGE]:"operate-storage",[rr.a.PWR_OPERATE_TERMINAL]:"operate-terminal",[rr.a.PWR_OPERATE_TOWER]:"operate-tower",[rr.a.PWR_SHIELD]:"shield",[rr.a.PWR_FORTIFY]:"fortify",[rr.a.PWR_OPERATE_CONTROLLER]:"operate-controller",[rr.a.PWR_OPERATE_POWER]:"operate-power",[rr.a.PWR_BERSERK]:"berserk",[rr.a.PWR_DEFEND]:"defend",[rr.a.PWR_DISABLE]:"disable",[rr.a.PWR_ENCOURAGE]:"encourage",[rr.a.PWR_EXHAUST]:"exhaust",[rr.a.PWR_RENEW]:"renew",[rr.a.PWR_SIGHT]:"sight",[rr.a.PWR_SUMMON]:"summon",[rr.a.PWR_DEMOLISH]:"demolish",[rr.a.PWR_HARVEST_ENERGY]:"harvest-energy",[rr.a.PWR_HARVEST_MINERAL]:"harvest-mineral",[rr.a.PWR_KILL]:"kill",[rr.a.PWR_MASS_REPAIR]:"mass-repair",[rr.a.PWR_PUNCH]:"punch",[rr.a.PWR_REFLECT]:"reflect",[rr.a.PWR_REINFORCE]:"reinforce",[rr.a.PWR_REMOTE_TRANSFER]:"remote-transfer",[rr.a.PWR_SNIPE]:"snipe"};var ir=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};const or={creepEnergy:{color:16770413,radius:20},energy:{color:16770413,radius:30},power:{color:15998771,radius:45}},ar={color:16777215,radius:45};function sr(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function ur(t){let e=Number(t).toString(16);return e.length<2&&(e=`0${e}`),e}function lr(t,e,r){let n,i,o;if(0===e)n=r,i=r,o=r;else{const a=r<.5?r*(1+e):r+(e-r*e),s=2*r-a;n=sr(s,a,t+1/3),i=sr(s,a,t),o=sr(s,a,t-1/3)}return[Math.round(255*n),Math.round(255*i),Math.round(255*o)]}function cr(t,e){let r=t;"string"==typeof t&&(r=parseInt(t.substr(1),16));const[n,i,o]=function(t,e,r){t/=255,e/=255,r/=255;const n=Math.max(t,e,r),i=Math.min(t,e,r);let o,a;const s=(n+i)/2;if(n===i)o=0,a=0;else{const u=n-i;switch(a=s>.5?u/(2-n-i):u/(n+i),n){case t:o=(e-r)/u+(e<r?6:0);break;case e:o=(r-t)/u+2;break;case r:o=(t-e)/u+4}o/=6}return[o,a,s]}(r>>16,r>>8&255,255&r),[a,s,u]=lr(n,i,o*e);return"string"==typeof t?`#${ur(a)}${ur(s)}${ur(u)}`:u+(s<<8)+(a<<16)}function hr(t,e){let r=t;"string"==typeof t&&(r=parseInt(t.substr(1),16));let[n,i,o]=[r>>16,r>>8&255,255&r];return n=Math.round(n*e),i=Math.round(i*e),o=Math.round(o*e),"string"==typeof t?`#${ur(n)}${ur(i)}${ur(o)}`:o+(i<<8)+(n<<16)}const fr=Math.sin(Math.PI/4);var dr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function pr(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var _r=t=>{const{world:e,logger:r,payload:{text:n="?",style:o}={}}=t,a=pr(t.payload,["text","style"]),s=pr(t,["world","logger","payload"]),u=ut.parseExpression(n,t),l=ut.parseExpression(o,t),{app:{stage:c}}=e,h=xe(dr({world:e,logger:r,payload:a},s),i.Text,[u,l]);return ut.addTickerHandler(h,()=>{h.scale.x=1/c.scale.x,h.scale.y=1/c.scale.y,h.style.fontSize=l.fontSize*c.scale.x,h.style.strokeThickness=(l.strokeThickness||0)*c.scale.x}),ut.addTickerHandler(h,()=>ut.alignPositionToPixels(h,c)),h};var vr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};var gr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function yr(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var mr=t=>{const{logger:e,rootContainer:r,scope:n,world:o,objectMetadata:{texture:s},payload:{parentId:u,texture:l=s}={},stage:{resourceManager:c}}=t,h=yr(t.payload,["parentId","texture"]),f=yr(t,["logger","rootContainer","scope","world","objectMetadata","payload","stage"]);if(!l)return void e.warn("texture is not provided");let d;const p=ut.parseExpression(l,t);if(a.a.isString(p))d=c.getCachedResource(p);else if(!(d=l))return void e.warn("Cannot find resource",l);if(d){const t=xe(gr({logger:e,payload:gr({},h,{parentId:u}),rootContainer:r,scope:n},f),i.Sprite,[d.texture]);return ut.setSvgResizeHandler(o,t,d),t}{const t=Ce(gr({logger:e,payload:{parentId:u},rootContainer:r,scope:n},f));return c.getResource(l).then(n=>{const a=xe(gr({logger:e,payload:gr({},h,{addToParent:!1}),rootContainer:r,scope:{}},f),i.Sprite,[n.texture]);ut.setSvgResizeHandler(o,a,n),a.zIndex=-1e3,t.addChild(a)}),t}},Er=r(93),xr=r.n(Er);const br=50;var Tr=(t,e,r,n=!1)=>{const i={},o={};let a,s="";if(0===t.length)return{md5:"",result:!1};for(let t=0;t<br;t+=1)i[t]=new Array(br),o[t]={};if(t.forEach(t=>{t.forEach(t=>{null!==t.x&&null!==t.y?(e(t)&&(i[t.x][t.y]=t,a=!0),o[t.x][t.y]=!1):console.error("null coordinates in object",t)})}),!a)return{md5:"",result:!1};const u=xr()(JSON.stringify(i,(t,e)=>{if(""===t||Array.isArray(e)&&"effects"!==t||"object"==typeof e&&"effects"!==t||"x"===t||"y"===t||"type"===t)return e}));if(u===r)return{md5:u,result:null};function l(t,e){t>0&&e>0&&!i[t-1][e]?s+="a 50 50 0 0 0 -50 -50 h 50 ":s+="v -50 "}function c(t,e){e>0&&t>0&&!i[t][e-1]?s+="v -50 a 50 50 0 0 0 50 50 ":s+="h 50 "}function h(t,e){0===t||i[t-1][e]||0===e||i[t][e-1]?s+="v -50 h 50 ":s+="a 50 50 0 0 1 50 -50 "}function f(t,e){e>0&&t<br-1&&!i[t][e-1]?s+="a 50 50 0 0 0 50 -50 v 50 ":s+="h 50 "}function d(t,e){t<br-1&&e>0&&!i[t+1][e]?s+="h 50 a 50 50 0 0 0 -50 50 ":s+="v 50 "}function p(t,e){t===br-1||i[t+1][e]||0===e||i[t][e-1]?s+="h 50 v 50 ":s+="a 50 50 0 0 1 50 50 "}function _(t,e){t===br-1||i[t+1][e]||e===br-1||i[t][e+1]||i[t+1][e+1]&&(i[t+1][e]||n)?s+="v 50 h -50 ":s+="a 50 50 0 0 1 -50 50 "}function v(t,e){0===t||i[t-1][e]||e===br-1||i[t][e+1]||i[t-1][e+1]&&(i[t-1][e]||n)?s+="h -50 v -50 ":s+="a 50 50 0 0 1 -50 -50 "}function g(t,e,r){o[t][e]?s+=r?"v 100 ":"h -100 ":(r?(0===t||0===e||i[t-1][e-1]&&(n||i[t-1][e]||i[t][e-1])?c(t,e):s+="h 50 ",t<br-1&&i[t+1][e]?(t===br-1||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?f(t,e):s+="h 50 ",g(t+1,e,1),s+="h -100 "):(t===br-1||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?(f(t,e),d(t,e)):p(t,e),_(t,e),s+="h -50 ")):(t===br-1||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?d(t,e):s+="v 50 ",e<br-1&&i[t][e+1]?(s+="v 50 ",g(t,e+1,0),s+="v -50 "):(_(t,e),v(t,e)),0===t||0===e||i[t-1][e-1]?l(t,e):s+="v -50 "),t<br&&e<br&&(o[t][e]=!0))}for(let t=0;t<br;t+=1)for(let e=0;e<br;e+=1)if(i[t][e]&&!o[t][e]){s+=`M ${100*t} ${100*e+50} `,o[t][e]=!0;let r=0;do{r+=1}while(t+r<br&&i[t+r][e]);let a=0;do{a+=1}while(e+a<br&&i[t][e+a]);a<r?(0===t||0===e||i[t-1][e-1]&&(n||i[t-1][e]||i[t][e-1])?(l(t,e),c(t,e)):h(t,e),t<br-1&&i[t+1][e]?(t===br-1||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?f(t,e):s+="h 50 ",g(t+1,e,1),s+="h -50 "):(t===br-1||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?(f(t,e),d(t,e)):p(t,e),_(t,e)),v(t,e)):(0===t||0===e||i[t-1][e-1]&&(n||i[t-1][e]||i[t][e-1])?(l(t,e),c(t,e)):h(t,e),t===br-1||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?(f(t,e),d(t,e)):p(t,e),e<br-1&&i[t][e+1]?(s+="v 50 ",g(t,e+1,0),s+="v -50 "):(_(t,e),v(t,e))),s+="Z "}return{md5:u,result:s}};const{TilingSprite:Rr}=i.extras,{BlurFilter:Or}=i.filters;function Sr(t,{size:{width:e,height:r},VIEW_BOX:n},o){const a={viewBox:`0 0 ${n} ${n}`,"shape-rendering":"optimizeSpeed"},s=Object.entries(a).map(([t,e])=>`${t}="${encodeURIComponent(e)}"`).join(" "),u=Object.entries(o).map(([t,e])=>`${t}="${encodeURIComponent(e)}"`).join(" "),l=`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${r}" ${s} data-timestamp="${Date.now()}"><path ${u} d="${t}" /></svg>`,c=i.Sprite.fromImage(`data:image/svg+xml;charset=utf8,${l}`);return c._generatedSvgTexture=!0,c}function wr(t,e,r){ut.addTickerHandler(t,n=>{t.tilePosition.x+=n*e,t.tilePosition.y+=n*r})}var Cr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function Ar(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}const Ir={radius:37,color:2236962},Pr={texture:null};const Mr={slow:[[.3,5],[1,5]],fast:[[.3,1],[1,1]],blink:[[.8,2],[1,.1],[.6,4],[1,.1],[.7,1],[1,.1]],neon:[[1,1],[.95,.07],[1,.07],[1,.07],[.9,.07],[1,.07],[.7,.07],[1,.07],[1,.1],[.9,.07],[1,.07],[1,1],[.95,.07],[1,.07],[1,.07],[.9,.07],[1,.07]],flash:[[1,.1],[0,1.5],[0,2]]};var Dr={circle:we,container:Ce,creepActions:t=>{const{logger:e,stage:r,rootContainer:n,scope:o,tickDuration:a,state:s,prevState:u,world:l,payload:{parentId:c}={},world:{options:h}}=t,{actionLog:{attacked:f=null,attack:d=null,build:p=null,harvest:_=null,heal:v=null,healed:g=null,power:y=null,rangedAttack:m=null,rangedHeal:E=null,repair:x=null,reserveController:b=null,runReaction:T=null,reverseReaction:R=null,transferEnergy:O=null,upgradeController:S=null}={}}=s,w=c?o[c]:n;if(!w)return void e.warn("No parent available with id",c);if(!u)return;o.coverSprite||function(t,e,r,n){const o=new i.Container;o.position.copy(e.position),o.alpha=0,e.parent.addChild(o),r.coverSprite=o,e.on("removed",()=>o.destroy());const a=new i.Sprite(t.cover.texture);a.anchor.x=.5,a.anchor.y=.5,a.alpha=.3,a.parentLayer=n.layers.effects,o.addChild(a);const s=new i.Sprite(t.flare2.texture);s.blendMode=i.BLEND_MODES.ADD,s.width=300,s.height=300,s.anchor.x=.5,s.anchor.y=.5,s.alpha=.05,s.parentLayer=n.layers.effects,o.addChild(s);const u=new i.Sprite(t.glow.texture);u.anchor.x=.5,u.anchor.y=.5,u.x=0,u.y=0,u.width=500,u.height=500,u.alpha=.5,u.parentLayer=n.layers.lighting,o.addChild(u)}(r.resources,n,o,l),o.childCoverSprite||function(t,e,r,n){const o=new i.Sprite(t.cover.texture);o.anchor.x=.5,o.anchor.y=.5,o.alpha=0,o.parentLayer=n.layers.effects,o.blendMode=i.BLEND_MODES.ADD,e.addChild(o),r.childCoverSprite=o}(r.resources,w,o,l);const C=[],A=u&&(s.x!==u.x||s.y!==u.y);if(d&&("tower"===s.type?Ve(C,r,l,n,d,a,h,je,18,5):A||We(C,n,o,s,d,a,h)),_&&(A||We(C,n,o,s,_,a,h),C.push(Ge(o,De,.9*a,Ie(_,h)))),b&&("invaderCore"===s.type?Ve(C,r,l,n,b,a,h,ke,18,5):A||We(C,n,o,s,b,a,h),C.push(Ge(o,ke,.9*a,Ie(b,h),"invaderCore"===s.type?.3*a:0))),v&&("tower"===s.type?Ve(C,r,l,n,v,a,h,Ne,18,5):A||We(C,n,o,s,v,a,h)),f&&g?C.push(Ye(o,Ue,.9*a)):g?C.push(Ye(o,Ne,.9*a)):f&&C.push(Ye(o,Le,.9*a)),m&&Ve(C,r,l,n,m,a,h,je,12,5),O&&Ve(C,r,l,n,O,a,h,He,18,5),E&&Ve(C,r,l,n,E,a,h,Ne,12,5),y&&Ve(C,r,l,n,y,a,h,Fe,12,5,.3),p&&(Ve(C,r,l,n,p,a,h,De,"invaderCore"===s.type?18:12,5),C.push(Ge(o,De,.9*a,Ie(p,h),.3*a))),S&&(Ve(C,r,l,n,S,a,h,De,"invaderCore"===s.type?18:12,5),C.push(Ge(o,De,.9*a,Ie(S,h),.3*a))),x&&(Ve(C,r,l,n,x,a,h,De,"tower"===s.type?18:12,5),C.push(Ge(o,De,.9*a,Ie(x,h),.3*a))),T){const{x1:t,y1:e,x2:n,y2:i}=T;Ve(C,r,l,Ie({x:t,y:e},h),s,a,h,Be,12,2),Ve(C,r,l,Ie({x:n,y:i},h),s,a,h,Be,12,2)}if(R){const{x1:t,y1:e,x2:i,y2:o}=R;Ve(C,r,l,n,{x:t,y:e},a,h,Be,12,2),Ve(C,r,l,n,{x:i,y:o},a,h,Be,12,2)}!function(t,e){t.forEach(({target:t,action:r})=>e.runAction(t,r))}(C,r.actionManager)},creepBuildBody:({logger:t,rootContainer:e,scope:r,stage:n,state:o,payload:{parentId:a}={}})=>{const{resources:s}=n,u=a?r[a]:e;if(!u)return void t.warn("No parent available with id",a);r.bodySprites?r.bodySprites.forEach(t=>u.removeChild(t)):r.bodySprites=[];const{body:l}=o,c=tr(l).filter(({type:t,hits:e})=>"tough"!==t&&"carry"!==t&&e>0),h=Object.values(c.reduce((t,{type:e,hits:r})=>{const n=t[e];return n?n.hits+=r:t[e]={type:e,hits:r},t},{}));h.sort((t,e)=>t.hits<e.hits?-1:t.hits>e.hits?1:0);let f=0,d=Math.PI;h.forEach(e=>{const n=Je[e.type];if(n){const{backSide:t,color:i}=n,o=t?d:f,a=qe*(e.hits/100);Qe(i,o,o+a,u,r.bodySprites,!1),Qe(i,-o,-(o+a),u,r.bodySprites,!0),t?d+=a:f+=a}else t.warn(`Unsupported type ${e.type}`)}),tr(l).filter(({type:t,hits:e})=>"tough"===t&&e>0).length>0&&function(t,e,r){const n=new i.Sprite(t.tough.texture);n.width=120,n.height=120,n.anchor.x=.5,n.anchor.y=.5,e.addChild(n),r.push(n)}(s,u,r.bodySprites)},disappear:({stage:t,rootContainer:e,tickDuration:r,callback:n})=>{const{actionManager:i}=t,o=new N([new P(r/2),new f(()=>{n()})]);i.runAction(e,o)},draw:Re,moveTo:({firstRun:t,state:e,payload:{targetKey:r,shouldRotate:n=!1}={},rootContainer:i,stage:o,prevState:a,scope:s,tickDuration:u,world:{options:l}})=>{const{actionManager:c}=o,{x:h,y:f}=Ie(e,l),d=r?s[r]:i;if(!t){const t=[];a&&n&&t.push(new L(Ae(d.x,d.y,h,f),u/5));const e=new F(t);s.moveToAction&&c.cancelAction(s.moveToAction),s.moveToAction=c.runAction(d,e)}},object:xe,powerInfluence:t=>{const{logger:e,stage:r,rootContainer:n,scope:o,tickDuration:a,state:s,prevState:u,world:l,payload:{parentId:c}={},world:{options:f}}=t,{actionLog:{power:p}={}}=s;if(!(c?o[c]:n))return void e.warn("No parent available with id",c);if(!u)return;const _=[];if(p){const t=nr[p.id];t||console.log("No texture key provided for power id",p.id);const e=r.resources[t];e||console.log("No texture provided for key ",t);const o=function(t,e,r,n){const o=new i.Container;o.position.copy(e.position),e.parent.addChild(o),e.on("removed",()=>o.destroy());const a=new i.Sprite(t.texture);return a.anchor.x=.5,a.anchor.y=.5,a.width=300,a.height=300,a.parentLayer=n.layers.effects,o.addChild(a),o}(e,n,0,l);_.push(function(t,e,r,n=0){const i=(e-n)/4,o=new N([new F([new U(.5,.5,0),new h(0,0)]),new d(n),new F([new U(1,1,i),new h(1,i)]),new h(0,i)]);return r&&t.position.copy(r),{action:o,target:t}}(o,.9*a,Ie({x:p.x,y:p.y},f),.3))}!function(t,e){t.forEach(({target:t,action:r})=>e.runAction(t,r))}(_,r.actionManager)},resourceCircle:t=>{const{state:{resourceType:e="creepEnergy",resourceType:r="energy",[r]:n,[`${r}Capacity`]:i=1250}={},prevState:{[r]:o}={},payload:{radius:a}={}}=t,s=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(t,["state","prevState","payload"]);if(o!==n){const{[e]:{color:r,radius:o}=ar}=or,u=(ut.parseExpression(a,t)||o)*Math.min(1,0!==i?n/i:0);return we(ir({payload:{color:r,radius:u}},s))}},road:t=>{const{rootContainer:e,id:r,scope:n,stateExtra:o,world:{app:a,layers:{terrain:s},options:{CELL_SIZE:u,lighting:l="normal"},decorations:c},state:{x:h,y:f}={},stateExtra:{objects:d}}=t,p=n[r],_=p?p.knownNodes:{mm:!1,zm:!1,pm:!1,mz:!1},v={mm:!1,zm:!1,pm:!1,mz:!1};let{roads:g}=o;g||(g=function(t){const e=[];t.forEach(t=>{const{type:r,x:n,y:i}=t;"road"===r&&(e[n]||(e[n]=[]),e[n][i]=t)}),e.push([]);for(let t=0;t<e.length;t+=1)e[t]||(e[t]=[]);return e}(d),o.roads=g),v.mm=Boolean(g[h-1][f-1]),v.zm=Boolean(g[h][f-1]),v.pm=Boolean(g[h+1][f-1]),v.mz=Boolean(g[h-1][f]);const y=c.find(t=>["landscape","floorLandscape"].includes(t.decoration.type));if(!p||Object.entries(v).some(([t,e])=>e!==_[t])||p.decorationFloorLandscape!==y){const t=0,o=.15*u,c=o*fr,h=u,f=h,d=new i.Graphics;d.parentLayer=s,d.zIndex=1,a.renderer instanceof i.WebGLRenderer?("disabled"===l&&(d.tint=10526880),"low"===l&&(d.tint=12632256)):d.tint=10526880;const _=y?cr(parseInt(y.roadsColor.substring(1),16),y.roadsBrightness):11184810;return d.clear(),d.beginFill(_),d.drawCircle(t,t,o),d.endFill(),v.mm&&(d.beginFill(_),d.moveTo(t+c,t-c),d.lineTo(t-c,t+c),d.lineTo(t-c-f,t+c-f),d.lineTo(t+c-f,t-c-f),d.lineTo(t+c,t-c),d.endFill()),v.zm&&(d.beginFill(_),d.moveTo(t+o,t),d.lineTo(t-o,t),d.lineTo(t-o,t-h),d.lineTo(t+o,t-h),d.lineTo(t+o,t),d.endFill()),v.pm&&(d.beginFill(_),d.moveTo(t-c,t-c),d.lineTo(t+c,t+c),d.lineTo(t+c+f,t+c-f),d.lineTo(t-c+f,t-c-f),d.lineTo(t-c,t-c),d.endFill()),v.mz&&(d.beginFill(_),d.moveTo(t,t+o),d.lineTo(t,t-o),d.lineTo(t-h,t-o),d.lineTo(t-h,t+o),d.lineTo(t,t+o),d.endFill()),p&&p.destroy(!0),d.knownNodes=v,d.decorationFloorLandscape=y,n[r]=d,e.addChild(d),d}},runAction:{config:{isOwner:!1},run:t=>{const{rootContainer:e,scope:r,payload:{id:n}={}}=t;return n?r[n]:e}},say:t=>{const{payload:{say:e},world:{app:{stage:r}},scope:n}=t,o=ut.parseExpression(e,t),a=o.isPublic?14518408:13421772,s={align:"center",fill:"#111",fontFamily:"Roboto, sans-serif",fontSize:60},u=xe(t,i.Container);n.sayContainer=u;const l=i.TextMetrics.measureText(o.message,new i.TextStyle(s)).width+60,c=new i.Graphics;c.lineStyle(8,0),c.beginFill(a),c.drawRoundedRect(-l/2,-170,l,100,30),c.drawPolygon([new i.Point(30,-74),new i.Point(0,-44),new i.Point(-30,-74)]),c.endFill(),u.addChild(c);const h=Object.assign({},t,{id:"sayText",payload:{parentId:"sayContainer",text:o.message,style:s,x:0,y:-120,anchor:{x:.5,y:.5}}});return _r(h),ut.addTickerHandler(u,()=>ut.alignPositionToPixels(u,r)),u},setBadgeUrls:({state:t,world:{options:{BADGE_URL:e}}})=>{const{users:r}=t;r&&Object.entries(r).forEach(([,t])=>{const{username:r}=t;t.badgeUrl=e.replace("%1",encodeURIComponent(r))})},siteProgress:t=>{const{rootContainer:e,scope:r,payload:n}=t,i=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(t,["rootContainer","scope","payload"]),o=ut.parseExpression(n.progress,t);if(o!==r.oldProgress){r.oldProgress=o;const a=Re(vr({rootContainer:e,scope:r},i)),s=ut.parseExpression(n.progressTotal,t),u=ut.parseExpression(n.color,t),l=ut.parseExpression(n.radius,t),c=ut.parseExpression(n.lineWidth,t);if(a.rotation=-Math.PI/2,a.beginFill(0,0),a.lineStyle(c,u,1),a.drawCircle(0,0,l+c/2),o>0&&s>0){const t=2*Math.PI*(Math.min(o,s)/s);a.beginFill(u),a.moveTo(0,0),a.lineStyle(1,u,1);const e=function(t,e){return{x:Math.cos(t)*e,y:Math.sin(t)*e}}(0,l);a.lineTo(e.x,e.y),a.arc(0,0,l,0,t),a.lineTo(0,0),a.endFill()}return a}},sprite:mr,terrain:t=>{const{world:{app:e,stage:r,decorations:n,layers:{terrain:o,lighting:a,effects:s},options:{size:u}},state:{gameData:{player:l,swampTexture:c="animated"},objects:h,users:f={},setTerrain:d},world:{options:{CELL_SIZE:p,RENDER_SIZE:_=u,VIEW_BOX:v,HALF_CELL_SIZE:g=p/2,lighting:y="normal"}}}=t,m=_.width/v;function E(t,e){return r.addChild(t),t.parentLayer=o,t.x=-p/2,t.y=-p/2,t.width=v,t.height=v,Object.assign(t,e),t}r.terrainObjects||(r.terrainObjects={},r.terrainObjects.wallMask=new i.Sprite(i.Texture.EMPTY),Object.assign(r.terrainObjects.wallMask,{x:-50,y:-50,width:5e3,height:5e3,renderable:!1}),r.addChild(r.terrainObjects.wallMask));const{terrainObjects:x}=r,b=n.find(t=>["landscape","wallLandscape"].includes(t.decoration.type)),T=n.find(t=>["landscape","floorLandscape"].includes(t.decoration.type));let{previousSwamps:R}=x;R||(R=[],x.previousSwamps=R),d&&(R=h.filter(({type:t})=>"swamp"===t),x.previousSwamps=R),T!==x.decorationFloorLandscape&&(x.previousSwampsMd5=null);const{result:O,md5:S}=Tr(d?[R]:[h,R],({type:t})=>"swamp"===t,x.previousSwampsMd5);if(x.previousSwampsMd5=S,O){let{swampObjects:t}=x;if(t?t.forEach(t=>t.destroy(t._generatedSvgTexture)):(t=[],x.swampObjects=t),e.renderer instanceof i.WebGLRenderer){let e;e="disabled"===y?8421504:"low"===y?10526880:16777215;let n="disabled"!==c?"#4a501e":"#465c03";T&&(n=T.swampColor);let o="disabled"!==c?"#4a501e":"#3b4019";T&&(o=T.swampStrokeColor),t[0]=E(Sr(O,{size:_,VIEW_BOX:v},{fill:n,stroke:o,"stroke-width":T?T.swampStrokeWidth:50,"paint-order":"stroke"}),{alpha:.4,tint:e}),"disabled"!==c&&(t[1]=E(Sr(O,{size:_,VIEW_BOX:v},{fill:"#fff"}),{alpha:.25}),t[2]=E(Sr(O,{size:_,VIEW_BOX:v},{fill:"#fff"}),{alpha:.25}),t[3]=E(new Rr(r.resources.noise2.texture,v,v),{alpha:"normal"===y?.3:.15,blendMode:i.BLEND_MODES.ADD,mask:t[1],tileScale:new i.Point(10,10),tint:6749952}),t[4]=E(new Rr(r.resources.noise2.texture,v,v),{alpha:"normal"===y?.3:.15,blendMode:i.BLEND_MODES.ADD,tileScale:new i.Point(14,14),mask:t[2],tint:6749952}),"animated"===c&&(wr(t[3],1.5,1.5),wr(t[4],-1.35,-1.35)))}else t[0]=E(Sr(O,{size:_,VIEW_BOX:v},{fill:T?T.swampColor:"#292b18",stroke:T?T.swampStrokeColor:"#252715","stroke-width":T?T.swampStrokeWidth:50,"paint-order":"stroke"}))}let{rampartsObjects:w}=x;w?Object.entries(w).forEach(([,t])=>{t.came=!1}):(w={},x.rampartsObjects=w),Object.keys(f).forEach(t=>{const{[t]:e={md5:"",sprite:null}}=w,{md5:r,result:n}=Tr([h],({type:e,isPublic:r,user:n})=>"rampart"===e&&!r&&n===t,e.md5,!0);e.md5=r,n?(e.sprite&&e.sprite.destroy(e.sprite._generatedSvgTexture),e.sprite=E(Sr(n,{size:_,VIEW_BOX:v},l===t?{fill:"#105010",stroke:"#44ff44","stroke-width":25,"paint-order":"stroke"}:{fill:"#501010",stroke:"#ff4444","stroke-width":25,"paint-order":"stroke"}),{alpha:.4,blendMode:i.BLEND_MODES.ADD,parentLayer:s})):!1===n&&e.sprite&&(e.sprite.destroy(e.sprite._generatedSvgTexture),e.sprite=null),e.came=!0,w[t]=e}),Object.entries(w).forEach(([t,e])=>{e.came||(e.sprite&&e.sprite.destroy(e.sprite._generatedSvgTexture),delete w[t])});let{previousWalls:C}=x;C||(C=[],x.previousWalls=C),d&&(C=h.filter(({type:t})=>"wall"===t),x.previousWalls=C);const A=d?[C]:[h,C];b!==x.decorationWallLandscape&&(x.previousWallsMd5=null);const{md5:I,result:P}=Tr(A,({type:t})=>"wall"===t||"constructedWall"===t,x.previousWallsMd5);if(x.previousWallsMd5=I,P){let{wallObjects:t}=x;const n=t||[];if(t=[],x.wallObjects=t,e.renderer instanceof i.WebGLRenderer){t[0]=i.RenderTexture.create(_.width,_.height),t[1]=E(new i.Sprite(i.Texture.WHITE),{zIndex:2,visible:!1});let o="disabled"===y?"#181818":"#111",s="#000";b&&(o=cr(b.backgroundColor,b.backgroundBrightness),s=cr(b.strokeColor,b.strokeBrightness),"disabled"===y&&(o=hr(o,.5),s=hr(s,.3)));const u=Sr(P,{size:_,VIEW_BOX:v},{fill:o,stroke:s,"stroke-width":b?b.strokeWidth:10,"paint-order":"stroke"});ut.onTextureLoaded(u.texture,()=>{e.renderer.render(u,t[0]),u.destroy(!0)});const l=Sr(P,{size:_,VIEW_BOX:v},{fill:"#fff"});x.wallMask.texture!==i.Texture.EMPTY&&x.wallMask.texture.destroy(!0),x.wallMask.texture=l.texture,ut.onTextureLoaded(l.texture,()=>{if("disabled"!==y){const n=new Rr(r.resources.noise1.texture,v,v);Object.assign(n,{alpha:.2,blendMode:i.BLEND_MODES.ADD,tileScale:new i.Point(8*m,8*m),mask:l}),e.renderer.render(n,t[0],!1),n.destroy()}l.destroy(),ut.enableTextureMipmap(e.renderer,t[0].baseTexture),[t[1].texture]=t,t[1].visible=!0,n[1]&&n[1].destroy(!0)}),t[2]=i.RenderTexture.create(_.width,_.height),t[3]=E(new i.Sprite(i.Texture.WHITE),{parentLayer:a,_overrideBlendMode:!0,blendMode:i.BLEND_MODES.MULTIPLY,visible:!1});const c=Sr(P,{size:_,VIEW_BOX:v},{fill:"#000"});ut.onTextureLoaded(c.texture,()=>{c.filters=[new Or(.006*_.width)],e.renderer.render(c,t[2]),c.destroy(!0),ut.enableTextureMipmap(e.renderer,t[2].baseTexture),[,,t[3].texture]=t,t[3].visible=!0,n[3]&&n[3].destroy(!0)}),t[4]=E(Sr(P,{size:_,VIEW_BOX:v},{fill:"#808080",stroke:b?function(t,e,r){const[n,i,o]=lr(t,e,r);return`#${ur(n)}${ur(i)}${ur(o)}`}(0,0,b.strokeLighting):"#000000","stroke-width":b?b.strokeWidth:10,"paint-order":"stroke"}),{parentLayer:a,visible:!1}),ut.onTextureLoaded(t[4].texture,()=>{t[4].visible=!0,n[4]&&n[4].destroy(!0)})}else t[0]=E(Sr(P,{size:_,VIEW_BOX:v},{fill:"#111",stroke:"#000","stroke-width":10,"paint-order":"stroke"}),{zIndex:2,visible:!1}),ut.onTextureLoaded(t[0].texture,()=>{t[0].visible=!0,n[0]&&n[0].destroy()})}if(!x.previousFloor||T!==x.decorationFloorLandscape){const t=x.previousFloor;x.previousFloor={};const n=new i.Graphics;let a,s=5592405;if("disabled"!==y&&e.renderer instanceof PIXI.WebGLRenderer||(s=2105376),"low"===y&&(s=3487029),T&&(s=cr(s=parseInt(T.floorBackgroundColor.substring(1),16),T.floorBackgroundBrightness),"low"===y&&(s=hr(s,.65)),"disabled"===y&&(s=hr(s,.5))),n.beginFill(s),n.drawRect(-g,-g,v,v),n.endFill(),o.addChild(n),x.previousFloor.background=n,T){T.decoration.tileScale?((a=Rr.fromImage(T.decoration.floorForegroundUrl,50*p,50*p)).texture.baseTexture.mipmap=!1,a.tileScale.x=T.decoration.tileScale,a.tileScale.y=T.decoration.tileScale):a=i.Sprite.fromImage(T.decoration.floorForegroundUrl);let t=cr(parseInt(T.floorForegroundColor.substr(1),16),T.floorForegroundBrightness);"low"===y&&(t=hr(t,.65)),"disabled"===y&&(t=hr(t,.5)),Object.assign(a,{x:-.5*p,y:-.5*p,width:50*p,height:50*p,alpha:T.floorForegroundAlpha,tint:t})}else{(a=new Rr(r.resources.ground.texture,v,v)).x=-g,a.y=-g,a.tileScale.x=3,a.tileScale.y=3,a.alpha="normal"===y?.3:"low"===y?.1:.2;const t=new Rr(r.resources["ground-mask"].texture,v,v);t.x=-g,t.y=-g,t.tileScale.x=7,t.tileScale.y=7,t.blendMode=i.BLEND_MODES.MULTIPLY,t.alpha="normal"===y?.15:"low"===y?.05:.1,x.previousFloor.ground2=t,o.addChild(t)}o.addChild(a),x.previousFloor.ground=a,t&&(t.background.destroy(),t.ground.destroy(),t.ground2&&t.ground2.destroy())}x.decorationFloorLandscape=T,x.decorationWallLandscape=b},text:_r,userBadge:t=>{const{payload:{parentId:e,radius:r=Ir.radius,color:n=Ir.color}={},scope:i,scope:{[e]:o},state:{user:a},stateExtra:{users:s={}},state:u,stateExtra:l}=t,c=Ar(t.payload,["parentId","radius","color"]),h=Ar(t,["payload","scope","scope","state","stateExtra","state","stateExtra"]),f=a&&s[a]&&s[a].badgeUrl;if(f){const t=Cr({},Pr,{width:2*r,texture:f,parentId:e},c);return mr(Cr({payload:t,scope:{[e]:o}},h))}return we(Cr({payload:{radius:r,color:n,parentId:e},scope:i},h))},creepDecoration:t=>{const{logger:e,stage:{actionManager:r},rootContainer:n,id:o="object",scope:a,state:s,payload:{parentId:u,id:l=o}={},world:{decorations:c=[],layers:f}}=t,d=u?a[u]:n;d?(a[l]&&(a[l].forEach(t=>t.destroy()),delete a[l]),a[l]=[],c.forEach(t=>{if("creep"!==t.decoration.type||s.user!==`${t.user}`||s.spawning)return;const e=t.nameFilter.split(/!SEP!/).some(t=>s.name.includes(t));if(!t.exclude&&!e||t.exclude&&e)return;const o=new i.Container;if(a[l].push(o),t.syncRotate?d.addChild(o):n.addChildAt(o,0),t.decoration.graphics.forEach(e=>{const r=i.Sprite.fromImage(e.url);Object.assign(r,{width:t.width,height:t.height,anchor:{x:.5,y:.5},parentLayer:"below"===t.position?f.objects:f.effects,zIndex:1}),void 0!==t[e.alpha]&&(r.alpha=t[e.alpha]),t[e.color]&&(r.tint=cr(parseInt(t[e.color].substring(1),16),t.brightness)),t.flip&&(r.scale.y*=-1),o.addChild(r)}),t.lighting&&t.decoration.graphics.forEach(e=>{const r=i.Sprite.fromImage(e.url);Object.assign(r,{width:t.width,height:t.height,anchor:{x:.5,y:.5},parentLayer:f.lighting}),void 0!==t[e.alpha]&&(r.alpha=t[e.alpha]),t.flip&&(r.scale.y*=-1),o.addChild(r)}),t.animation){const e=new D(new N(Mr[t.animation].map(t=>new F([new h(t[0],t[1])]))));r.runAction(o,e)}})):e.warn("No parent available with id",u)},objectDecoration:t=>{const{logger:e,stage:{actionManager:r},rootContainer:n,id:o="object",scope:a,state:s,payload:{parentId:u,id:l=o}={},world:{decorations:c=[],layers:f}}=t;(u?a[u]:n)?(a[l]&&(a[l].forEach(t=>t.destroy()),delete a[l]),a[l]=[],c.forEach(t=>{if("object"!==t.decoration.type||s.user!==`${t.user}`||t.decoration.objectType!==s.type)return;const e=new i.Container;if(a[l].push(e),n.addChildAt(e,0),t.decoration.graphics.forEach(r=>{const n=i.Sprite.fromImage(r.url);Object.assign(n,{width:t.width,height:t.height,anchor:{x:.5,y:.5},parentLayer:f.objects,zIndex:1}),void 0!==t[r.alpha]&&(n.alpha=t[r.alpha]),t[r.color]&&(n.tint=cr(parseInt(t[r.color].substring(1),16),t.brightness)),e.addChild(n)}),t.lighting&&t.decoration.graphics.forEach(r=>{const n=i.Sprite.fromImage(r.url);Object.assign(n,{width:t.width,height:t.height,anchor:{x:.5,y:.5},parentLayer:f.lighting}),void 0!==t[r.alpha]&&(n.alpha=t[r.alpha]),e.addChild(n)}),t.animation){const n=new D(new N(Mr[t.animation].map(t=>new F([new h(t[0],t[1])]))));r.runAction(e,n)}})):e.warn("No parent available with id",u)}},Lr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};class Ur{constructor(t,e,r){if(this.state=void 0,this.calcs={},this.rootContainer={},this.id=t,this.objectMetadata=e,this.world=r,this.rootContainer=r.createData(e),this.rootContainer.zIndex=e.zIndex||0,e.processors){let t=0;e.processors.forEach(e=>{e.id=e.id||`id#${Math.floor(1e5*Math.random())}`,e.zIndex=e.zIndex||t,t+=1})}e.actions&&e.actions.forEach(t=>{t.id=t.id||`id#${Math.floor(1e5*Math.random())}`}),this.scope={actions:{},processors:{}}}remove(t){const{world:e,rootContainer:r,scope:n,objectMetadata:i}=this,{disappearProcessor:o}=i;if(o){const a={objectMetadata:i,rootContainer:r,scope:n,tickDuration:t,callback:()=>this._destroy()};e.runProcessor(o,a)}else this._destroy()}_destroy(){const{world:t,rootContainer:e,scope:r,objectMetadata:n}=this;n.processors.forEach(t=>{const n={objectMetadata:t,rootContainer:e,scope:r};this.destructProcessor(r,t,n)}),this.world.cancelActionsForObj(e),t.destroyData(e)}applyState(t,e,r){const{state:n,calcs:i,world:o,rootContainer:a,scope:s,objectMetadata:u,world:{options:{logger:l}}}=this,c=!n,h=Lr({},i),f={calcs:h,firstRun:c,objectMetadata:u,prevCalcs:i,prevState:n,world:o,rootContainer:a,scope:s,state:t,stateExtra:r,tickDuration:e};c&&u.data&&Object.entries(u.data).forEach(([t,e])=>{this.rootContainer[t]=ut.parseExpression(e,f)}),u.calculations&&u.calculations.forEach(e=>{const r=this.propsChanged(e,f);if(this.shouldRun(e,f,{firstRun:c,propsChanged:r})){const{path:r=null,id:i="customField",func:o}=e,a=null===r?t:X(t,r),s=null===r?n:X(n,r),u=Lr({},f,{state:a,prevState:s,payload:e.payload});h[i]=ut.parseExpression(o,u),l.debug("Calculation",i,"set to",h[i])}}),u.actions&&u.actions.map(t=>{if(!t.targetId||s[t.targetId]){const e=t.targetId?s[t.targetId]:void 0,r=s.actions[t.id],{animations:n}=r||{},i=!r,o=this.propsChanged(t,f),a=this.shouldRun(t,f,{propsChanged:o,firstRun:i}),u=this.onceAllow(t,{propsChanged:o,firstRun:i}),l=!a&&this.shouldDestruct(t,f,{propsChanged:o,firstRun:i});a&&u?(n&&this.world.finishActions(n),s.actions[t.id]={animations:this.world.runActions(t.actions,f,e)}):l&&(n&&this.world.finishActions(n),delete s.actions[t.id])}return[]}),u.processors.forEach(e=>{const r=!s.processors[e.id],i=this.propsChanged(e,f),a=this.shouldRun(e,f,{propsChanged:i,firstRun:r}),u=!a&&this.shouldDestruct(e,f,{propsChanged:i,firstRun:r});if(a||u){const{layer:l,path:c=null,zIndex:h}=e,d=null===c?t:X(t,c),p=null===c?n:X(n,c),_=Lr({},f,{state:d,prevState:p},e),v=this.onceAllow(e,{propsChanged:i,firstRun:r});if(a&&v){const t=o.runProcessor(e,_);let r;t?(t.zIndex=h,l&&(t.parentLayer=this.world.layers[l]),r={actions:this.world.runActions(e.actions,_,t),obj:t}):r={},s.processors[e.id]=r}else u&&this.destructProcessor(s,e,_)}}),(t.temp||t.tempRemove)&&(this.rootContainer.alpha=.3),this.calcs=h,this.state=t}propsChanged(t,e){const{props:r="*"}=t,{prevState:n,state:i,prevCalcs:o,calcs:s}=e;return!n||("*"===r||!!r.find(t=>!a.a.isEqual(n[t],i[t]))||!!r.find(t=>!a.a.isEqual(o[t],s[t])))}shouldRun(t,e,{propsChanged:r}){const{shouldRun:n,when:i=n}=t,{prevState:o,state:a}=e;return!(i&&!ut.parseExpression(i,e))&&(!o||!a||r)}onceAllow(t,{firstRun:e}){const{once:r=!1}=t;return!r||e}shouldDestruct(t,e,{propsChanged:r}){const{shouldRun:n,until:i,when:o=n}=t;return r&&(!i&&o||i&&ut.parseExpression(i,e))}destructProcessor(t,e,r){const n=t.processors[e.id];if(n){const{actions:i,obj:o}=n;i&&this.world.finishActions(i),this.world.destructProcessor(e,r,o),delete t.processors[e.id]}else this.world.destructProcessor(e,r,null)}get rendererCounter(){return this.world.countObjects(this.rootContainer)}}var Nr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function Fr(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,r){return function n(i,o){try{var a=e[i](o),s=a.value}catch(t){return void r(t)}if(!a.done)return Promise.resolve(s).then(function(t){n("next",t)},function(t){n("throw",t)});t(s)}("next")})}}function jr(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}const{Layer:kr,Stage:Br}=i.display;class Hr{constructor(t){this.gameObjects={},this.decorations=[],this.options=t;const{app:e,actionManager:r,logger:n,metadata:o={},resourceMap:a,CELL_SIZE:s,VIEW_BOX:u}=this.options;this.metadata=o;const{objects:l={}}=this.metadata,{_all:{actions:c=[],calculations:h=[],processors:f=[],data:d={}}={}}=l,p=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(l,["_all"]);if(Object.entries(p).forEach(([,t])=>{if(t){const{actions:e=[],calculations:r=[],data:n=[],processors:i=[]}=t;t.actions=[].concat(jr(c),jr(e)),t.data=Nr({},d,n),t.calculations=[].concat(jr(h),jr(r)),t.processors=[].concat(jr(f),jr(i))}}),e.stage=new Br,e.stage.pivot.x=-s/2,e.stage.pivot.y=-s/2,this.app=e,this.stage=e.stage,this.stage.actionManager=r,this.resourceMap=a,this.resourceManager=new ye({logger:n,world:this}),this.stage.resourceManager=this.resourceManager,this.layers={},this.defaultLayerId=null,this.unmaskedRendererInfo=null,this.app.renderer instanceof i.WebGLRenderer){const{gl:t}=this.app.renderer.state,e=t.getExtension("WEBGL_debug_renderer_info");this.unmaskedRendererInfo=e&&t.getParameter(e.UNMASKED_RENDERER_WEBGL)}const _=new i.Graphics;_.drawRect(-s/2,-s/2,u,u),e.stage.addChild(_),e.stage.mask=_}init(){var t=this;return Fr(function*(){const{stage:e}=t;e.resources=yield t.resourceManager.load(t.resourceMap,t.options.rescaleResources),t.metadata.layers.forEach((()=>{var r=Fr(function*({id:r,isDefault:n=!1,afterCreate:i=function(){}}){const o=new kr;if(o.group.enableSort=!0,e.addChild(o),t.layers[r]=o,n){if(t.defaultLayerId)throw new Error("defaultLayer is already specified");t.defaultLayerId=r}yield i(o,{app:t.app,resourceManager:t.resourceManager,world:t})});return function(t){return r.apply(this,arguments)}})())})()}applyState(t,e=0,r=!0){const{gameObjects:n,metadata:{objects:i,preprocessors:o},options:{gameData:a={},logger:s,objectFilter:u}}=this,{objects:l}=t;if(t.gameData=a,this.runStatePreprocessor(o.map(t=>Dr[t]),{state:t,world:this}),!r)return;const c={};(u?u(l):l).forEach(t=>{const{type:e,room:r,x:o,y:a,_id:u=`${r}:${e}:${o}:${a}`}=t;let l=n[u];if(!l){const t=i[e];t?(l=new Ur(u,t,this),n[u]=l,s.debug(`Created new game object with ID ${u}`)):void 0===t&&s.warn(`Unsupported object type: ${e}`)}c[u]=t}),Object.values(n).forEach(i=>{const{id:o}=i,a=c[o];if(a)return s.debug(`Applying state to game object ${a.type} with ID ${o}`),i.applyState(a,e,t);r&&(i.remove(e),delete n[o],s.debug(`Remove game object with ID ${o}`))})}removeAllObjects(){Object.values(this.gameObjects).forEach(t=>{t.remove(0),delete this.gameObjects[t.id]})}runStatePreprocessor(t=[],e){t.forEach(t=>t(e))}release(){this.resourceManager.release()}get metrics(){let t=0,e=0;Object.values(this.gameObjects).forEach(r=>{t+=1,e+=r.rendererCounter});const r={size:this.app.renderer.width,maxSvgSize:this.resourceManager.maxSvgSize};return this.app.renderer instanceof i.WebGLRenderer?Object.assign(r,{WebGL:"enabled",GPU:this.unmaskedRendererInfo}):Object.assign(r,{WebGL:"disabled"}),{gameObjectCounter:t,rendererCounter:e,devicePixelRatio:window.devicePixelRatio,stageSize:this.app.stage.scale.x*this.options.VIEW_BOX,renderer:r}}getWorldPosition(){const{gameObjects:t}=this,e=Object.values(t);if(0===e.length)return{x:0,y:0};const{x:r,y:n}=e[0].state;return{x:r,y:n}}createData({layer:t=this.defaultLayerId}){const e=new i.Container;return e.parentLayer=this.layers[t],this.stage.addChild(e),e}destroyData(t){t.destroy()}runProcessor(t,e){const{name:r,type:n=r}=t,i=Dr[n].run||Dr[n];if(!i)throw new Error(`No processor found for ${n}`);const{logger:o}=this.options;return o.debug("run processor",n),i(Nr({stage:this.stage,logger:o},e))}destructProcessor(t,e,r){const{name:n,type:i=n}=t,{destruct:o,config:{isOwner:a=!0}={}}=Dr[i];if(o){const{logger:t}=this.options;return t.debug("run destruct",i),o(Nr({stage:this.stage,logger:t},e))}r&&a&&(this.cancelActionsForObj(r),r.destroy())}runActions(t=[],e,r=e.rootContainer){const{stage:{actionManager:n}}=this;return t.map(t=>ut.createAction(t,Nr({},e,{target:r}))).map(t=>n.runAction(r,t))}cancelActions(t){const{stage:{actionManager:e}}=this;t.forEach(t=>{e.cancelAction(t)})}cancelActionsForObj(t){const{stage:{actionManager:e}}=this;e.cancelActionForContainer(t);const{children:r}=t;r&&Array.isArray(r)&&r.forEach(t=>this.cancelActionsForObj(t))}finishActions(t){const{stage:{actionManager:e}}=this;t.forEach(t=>{e.finishAction(t)})}countObjects(t){let e=1;return t.children.forEach(t=>{e+=this.countObjects(t)}),e}}var Xr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};const{Application:Wr,utils:Gr}=i,Yr=500;class zr{static compileMetadata(t){t.isCompiled||(Object.values(t.objects).forEach(t=>{t.calculations&&t.calculations.forEach(t=>{if(a.a.isUndefined(t.func))throw new Error(`Calculation ${t.id} does not have a func specified`);a.a.isFunction(t.func)||(t.func=ut.compileExpression(t.func))}),t.processors&&t.processors.forEach(t=>{t.shouldRun&&!a.a.isFunction(t.shouldRun)&&(t.shouldRun=ut.compileExpression(t.shouldRun)),t.until&&!a.a.isFunction(t.until)&&(t.until=ut.compileExpression(t.until)),t.when&&!a.a.isFunction(t.when)&&(t.when=ut.compileExpression(t.when))}),t.data&&Object.entries(t.data).forEach(([e,r])=>{t.data[e]=ut.compileExpression(r)})}),t.isCompiled=!0)}constructor(t){this.released=!0,this.animate=this.animate.bind(this),this.animateChecker=this.animateChecker.bind(this),this.options=t,t.countMetrics&&(this.metrics={fps:0}),this.__ts=Date.now()}init(t){var e=this;return function(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,r){return function n(i,o){try{var a=e[i](o),s=a.value}catch(t){return void r(t)}if(!a.done)return Promise.resolve(s).then(function(t){n("next",t)},function(t){n("throw",t)});t(s)}("next")})}}(function*(){const{autoStart:r=!0,backgroundColor:n,size:{width:i,height:o}={width:800,height:800},worldConfigs:a,resourceMap:s,rescaleResources:l,useDefaultLogger:c=!1,logger:h=(c?console:new Proxy({},{get:function(){return function(){}}})),objectFilter:f}=e.options;e.released||e.release();const d=new Wr(i,o,{antialias:!0,transparent:!n,forceCanvas:a.forceCanvas});e.app=d,n&&(d.renderer.backgroundColor=n),e.actionManager=new u,e.world=new Hr(Xr({actionManager:e.actionManager,app:d,logger:h,objectFilter:f,rescaleResources:l,resourceMap:s,size:{width:i,height:o}},a)),e.resize(),e.released=!1,yield e.world.init(),t.appendChild(d.view),r&&e.start()})()}release(){this.released||(clearTimeout(this.animateCheckerTimer),this.world.release(),Gr.destroyTextureCache(),this.app.destroy(),this.released=!0)}start(){const{options:{countMetrics:t}}=this;t&&(this.lastLoopTime=new Date),this.lastAnimationRun=Date.now(),this.animateChecker(),this.app.ticker.add(this.animate)}animateChecker(){Date.now()-this.lastAnimationRun>Yr&&this.animate(),this.animateCheckerTimer=setTimeout(this.animateChecker,Yr)}applyState(t,e){return this.world.applyState(t,e)}get zoomLevel(){const{app:{stage:t}={}}=this;return t.scale.x}set zoomLevel(t){const{app:{stage:e,renderer:r}={}}=this;if(t=.02*Math.round(t/.02),e){const n=e.scale.x;e.scale.x=t,e.scale.y=t,t!==n&&r.emit("_resized")}}pan(t,e){this.app.stage.position.x+=t,this.app.stage.position.y+=e}zoomTo(t,e,r){const n=this.zoomLevel;this.zoomLevel=t;const i=(e-this.app.stage.position.x)*(1-this.zoomLevel/n),o=(r-this.app.stage.position.y)*(1-this.zoomLevel/n);this.pan(i,o)}setTerrain(t){return this.world.applyState({objects:t,setTerrain:!0},0,!1)}resize(t){const{app:{renderer:e}={}}=this;e&&t&&e.resize(t.width,t.height)}animate(){this.lastAnimationRun=Date.now(),this.actionManager.update();const{options:{countMetrics:t,onGameLoop:e}}=this;if(t){const t=new Date,e=1e3/(t-this.lastLoopTime);this.metrics.fps=Math.round(.95*this.metrics.fps+.05*e),this.lastLoopTime=t,Object.assign(this.metrics,this.world.metrics)}e&&e()}erase(){this.world.removeAllObjects()}setDecorations(t){!function(t,e){const{world:r,world:{options:{CELL_SIZE:n,lighting:o="normal"},stage:{actionManager:a}}}=e;r.app.renderer instanceof i.WebGLRenderer&&(r.decorations=t,r.decorationsContainer&&r.decorationsContainer.destroy({children:!0,texture:!0,baseTexture:!1}),r.decorationsContainer=new i.Container,r.stage.addChild(r.decorationsContainer),t.forEach(t=>{if("wallGraffiti"===t.decoration.type&&t.decoration.graphics.forEach(e=>{if(e.visible&&!t[e.visible])return;function o(){let o;if(t.decoration.tiling?((o=i.TilingSprite.fromImage(e.url,t.width*n,t.height*n)).texture.baseTexture.mipmap=!1,o.tileScale.x=t.tileScale,o.tileScale.y=t.tileScale):o=i.Sprite.fromImage(e.url),Object.assign(o,{anchor:{x:.5,y:.5},x:Math.floor((t.x+-.5+t.width/2)*n),y:Math.floor((t.y+-.5+t.height/2)*n),width:t.width*n,height:t.height*n,mask:r.stage.terrainObjects.wallMask,zIndex:2}),t.flip&&(o.scale.x*=-1),t.rotation&&(o.rotation=t.rotation),t.animation){const e=new D(new N(Mr[t.animation].map(t=>new F([new h(t[0],t[1])]))));a.runAction(o,e)}return o}const s=new i.Container;r.decorationsContainer.addChild(s),s.alpha=t.alpha;const u=o();if(u.parentLayer=r.layers.wallGraffiti,e.color&&(u.tint=cr(parseInt(t[e.color].substr(1),16),t.brightness)),s.addChild(u),t.lighting){const t=o();t.parentLayer=r.layers.lighting,s.addChild(t)}}),["landscape","wallLandscape"].includes(t.decoration.type)){let e=cr(parseInt(t.foregroundColor.substr(1),16),t.foregroundBrightness);"disabled"===o&&(e=hr(e,.6));const a=i.Sprite.fromImage(t.decoration.foregroundUrl);Object.assign(a,{x:-.5*n,y:-.5*n,width:50*n,height:50*n,parentLayer:r.layers.wallGraffiti,alpha:t.foregroundAlpha,tint:e,mask:r.stage.terrainObjects.wallMask,zIndex:1}),r.decorationsContainer.addChild(a)}}))}(t,{world:this.world})}static isWebGLSupported(){return Gr.isWebGLSupported()}}r.d(e,"GameRenderer",function(){return Vr}),r.d(e,"PIXI",function(){return Kr}),window&&(window.GameRenderer=zr);const Vr=zr,Kr=i;e.default=Vr}])});
|
|
51
|
+
*/var Ot=function(t){function e(e,r,n,o){void 0===e&&(e=100),void 0===r&&(r=600),void 0===n&&(n=null),void 0===o&&(o=null),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\n\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\n\n for (float t = -30.0; t <= 30.0; t++)\n {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\n sample.rgb *= sample.a;\n color += sample * weight;\n total += weight;\n }\n\n color /= total;\n color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n"),this.uniforms.blur=e,this.uniforms.gradientBlur=r,this.uniforms.start=n||new i.Point(0,window.innerHeight/2),this.uniforms.end=o||new i.Point(600,window.innerHeight/2),this.uniforms.delta=new i.Point(30,30),this.uniforms.texSize=new i.Point(window.innerWidth,window.innerHeight),this.updateDelta()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={blur:{configurable:!0},gradientBlur:{configurable:!0},start:{configurable:!0},end:{configurable:!0}};return e.prototype.updateDelta=function(){this.uniforms.delta.x=0,this.uniforms.delta.y=0},r.blur.get=function(){return this.uniforms.blur},r.blur.set=function(t){this.uniforms.blur=t},r.gradientBlur.get=function(){return this.uniforms.gradientBlur},r.gradientBlur.set=function(t){this.uniforms.gradientBlur=t},r.start.get=function(){return this.uniforms.start},r.start.set=function(t){this.uniforms.start=t,this.updateDelta()},r.end.get=function(){return this.uniforms.end},r.end.set=function(t){this.uniforms.end=t,this.updateDelta()},Object.defineProperties(e.prototype,r),e}(i.Filter),St=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateDelta=function(){var t=this.uniforms.end.x-this.uniforms.start.x,e=this.uniforms.end.y-this.uniforms.start.y,r=Math.sqrt(t*t+e*e);this.uniforms.delta.x=t/r,this.uniforms.delta.y=e/r},e}(Ot),Ct=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateDelta=function(){var t=this.uniforms.end.x-this.uniforms.start.x,e=this.uniforms.end.y-this.uniforms.start.y,r=Math.sqrt(t*t+e*e);this.uniforms.delta.x=-e/r,this.uniforms.delta.y=t/r},e}(Ot),wt=(function(t){function e(e,r,n,i){void 0===e&&(e=100),void 0===r&&(r=600),void 0===n&&(n=null),void 0===i&&(i=null),t.call(this),this.tiltShiftXFilter=new St(e,r,n,i),this.tiltShiftYFilter=new Ct(e,r,n,i)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={blur:{configurable:!0},gradientBlur:{configurable:!0},start:{configurable:!0},end:{configurable:!0}};e.prototype.apply=function(t,e,r){var n=t.getRenderTarget(!0);this.tiltShiftXFilter.apply(t,e,n),this.tiltShiftYFilter.apply(t,n,r),t.returnRenderTarget(n)},r.blur.get=function(){return this.tiltShiftXFilter.blur},r.blur.set=function(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t},r.gradientBlur.get=function(){return this.tiltShiftXFilter.gradientBlur},r.gradientBlur.set=function(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t},r.start.get=function(){return this.tiltShiftXFilter.start},r.start.set=function(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t},r.end.get=function(){return this.tiltShiftXFilter.end},r.end.set=function(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n){void 0===e&&(e=200),void 0===r&&(r=4),void 0===n&&(n=20),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 twist(vec2 coord)\n{\n coord -= offset;\n\n float dist = length(coord);\n\n if (dist < radius)\n {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n\n coord += offset;\n\n return coord;\n}\n\nvoid main(void)\n{\n\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = twist(coord);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord );\n\n}\n"),this.radius=e,this.angle=r,this.padding=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offset:{configurable:!0},radius:{configurable:!0},angle:{configurable:!0}};r.offset.get=function(){return this.uniforms.offset},r.offset.set=function(t){this.uniforms.offset=t},r.radius.get=function(){return this.uniforms.radius},r.radius.set=function(t){this.uniforms.radius=t},r.angle.get=function(){return this.uniforms.angle},r.angle.set=function(t){this.uniforms.angle=t},Object.defineProperties(e.prototype,r)}(i.Filter),function(t){function e(e,r,n,i){void 0===e&&(e=.1),void 0===r&&(r=[0,0]),void 0===n&&(n=0),void 0===i&&(i=-1),t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform vec2 uCenter;\nuniform float uStrength;\nuniform float uInnerRadius;\nuniform float uRadius;\n\nconst float MAX_KERNEL_SIZE = 32.0;\n\n// author: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\nhighp float rand(vec2 co, float seed) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159);\n return fract(sin(sn) * c + seed);\n}\n\nvoid main() {\n\n float minGradient = uInnerRadius * 0.3;\n float innerRadius = (uInnerRadius + minGradient * 0.5) / filterArea.x;\n\n float gradient = uRadius * 0.3;\n float radius = (uRadius - gradient * 0.5) / filterArea.x;\n\n float countLimit = MAX_KERNEL_SIZE;\n\n vec2 dir = vec2(uCenter.xy / filterArea.xy - vTextureCoord);\n float dist = length(vec2(dir.x, dir.y * filterArea.y / filterArea.x));\n\n float strength = uStrength;\n\n float delta = 0.0;\n float gap;\n if (dist < innerRadius) {\n delta = innerRadius - dist;\n gap = minGradient;\n } else if (radius >= 0.0 && dist > radius) { // radius < 0 means it's infinity\n delta = dist - radius;\n gap = gradient;\n }\n\n if (delta > 0.0) {\n float normalCount = gap / filterArea.x;\n delta = (normalCount - delta) / normalCount;\n countLimit *= delta;\n strength *= delta;\n if (countLimit < 1.0)\n {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n }\n\n // randomize the lookup values to hide the fixed number of samples\n float offset = rand(vTextureCoord, 0.0);\n\n float total = 0.0;\n vec4 color = vec4(0.0);\n\n dir *= strength;\n\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\n float percent = (t + offset) / MAX_KERNEL_SIZE;\n float weight = 4.0 * (percent - percent * percent);\n vec2 p = vTextureCoord + dir * percent;\n vec4 sample = texture2D(uSampler, p);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample * weight;\n total += weight;\n\n if (t > countLimit){\n break;\n }\n }\n\n color /= total;\n // switch back from pre-multiplied alpha\n // color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n"),this.center=r,this.strength=e,this.innerRadius=n,this.radius=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={center:{configurable:!0},strength:{configurable:!0},innerRadius:{configurable:!0},radius:{configurable:!0}};r.center.get=function(){return this.uniforms.uCenter},r.center.set=function(t){this.uniforms.uCenter=t},r.strength.get=function(){return this.uniforms.uStrength},r.strength.set=function(t){this.uniforms.uStrength=t},r.innerRadius.get=function(){return this.uniforms.uInnerRadius},r.innerRadius.set=function(t){this.uniforms.uInnerRadius=t},r.radius.get=function(){return this.uniforms.uRadius},r.radius.set=function(t){(t<0||t===1/0)&&(t=-1),this.uniforms.uRadius=t},Object.defineProperties(e.prototype,r)}(i.Filter),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t});function At(t){return function(){var e=t.apply(this,arguments);return new Promise((function(t,r){return function n(i,o){try{var a=e[i](o),s=a.value}catch(t){return void r(t)}if(!a.done)return Promise.resolve(s).then((function(t){n("next",t)}),(function(t){n("throw",t)}));t(s)}("next")}))}}const{TextureCache:Pt}=i.utils,Mt={};class It{constructor(t){const{logger:e,world:r}=t;this.logger=e,this.world=r,this.delivering=!1,this.loadedResources={},this.queue=[],this.maxSvgSize=100*Math.round(30)}load(t={},e=[]){return new Promise((e,r)=>{try{Object.keys(t).forEach(e=>i.loader.add(e,t[e])),i.loader.load((t,r)=>{Object.assign(this.loadedResources,r),e()})}catch(t){r(t)}}).then(()=>Promise.all(e.map(t=>{const e=this.loadedResources[t];return e||this.logger.error("Cannot create scaled textures for",t),e.texture._resourceName=e.name,new Promise((t,r)=>{if(Mt[e.name])t();else{const n=new XMLHttpRequest;n.onload=()=>{if(n.readyState!==n.DONE||200!==n.status)throw new Error("Failed to load SVG using XHR.");Mt[e.name]=n.response,t()},n.onerror=r,n.open("GET",e.url,!0),n.send()}}).then(()=>{const t=[];for(let r=100;r<=this.maxSvgSize;r+=100){let n=Pt[e.name+r];if(!n){const t=new i.BaseTexture;t.sourceScale=r/this.world.options.VIEW_BOX,t.imageUrl=e.url,t.source=e.data,t._loadSvgSourceUsingString(Mt[e.name]),n=new i.Texture(t),i.Texture.addToCache(n,e.name+r)}e.scaledSvgTextures=e.scaledSvgTextures||{},e.scaledSvgTextures[r]=n,t.push(new Promise(t=>ct.onTextureLoaded(n,t)))}return Promise.all(t)})}))).then(()=>this.loadedResources)}getResource(t,...e){var r=this;return At((function*(){const{logger:n}=r;return r.delivering?new Promise((function(i,o){n.debug("Put resource to queue resource "+t),r.queue.push({resource:{name:t,otherParams:wt({},e)},resolve:i,reject:o})})):(n.debug("Getting resource "+t),r.loadedResources[t]||r._loadResource.apply(r,[t].concat(e)))}))()}getCachedResource(t){return this.loadedResources[t]}release(){this.loadedResources={},i.loader.reset()}_loadResource(t,e=t){var r=this;return At((function*(){const{logger:n}=r;r.delivering=!0;try{const o={loadType:2};i.loader.add(t,e,o),n.debug("Delivering resource "+t);return(yield r.load())[t]}finally{i.loader.reset(),r.delivering=!1,r._loadRest()}}))()}_loadRest(){var t=this;return At((function*(){const{logger:e}=t,r=t.queue.shift();if(r){const{resource:{name:n},resolve:i,reject:o}=r,a=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(r.resource.otherParams,[]);try{e.debug("Taking the next resource "+n),i(yield t.getResource.apply(t,[n].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(a))))}catch(t){e.warn("Something wrong loading resource "+n,t),o(t)}yield t._loadRest()}else e.debug("No resource in queue. Idling")}))()}}var Dt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};const{BlurFilter:Lt}=i.filters;var Ut=(t,e,r=[])=>{const{rootContainer:n,logger:i,id:o="object",payload:{id:a=o,parentId:s,addToParent:u=!0,Class:l=e,constructorParams:c=r,width:h,height:f,scale:d,shouldCreate:p=!0,pivot:v,anchor:_,blur:g}={},scope:y}=t,m=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(t.payload,["id","parentId","addToParent","Class","constructorParams","width","height","scale","shouldCreate","pivot","anchor","blur"]),x=y[a];if(x&&(x.destroy(),delete y[a]),!ct.parseExpression(p,t))return;const E=s?y[s]:n;if(!E)return void i.warn("No parent available with id",s);const b=new(Function.prototype.bind.apply(l,[null].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(c)))),T=d?Dt({},d):{x:1,y:1},R=v?Dt({},v):{},O=_?Dt({},_):{};if(void 0!==h&&(b._parsedWidth=ct.parseExpression(h,t),T.x=b._parsedWidth/b.width,void 0===f&&(T.y=T.x,b._parsedHeight=b._parsedWidth)),void 0!==f&&(b._parsedHeight=ct.parseExpression(f,t),T.y=b._parsedHeight/b.height,void 0===h&&(T.x=T.y,b._parsedWidth=b._parsedHeight)),void 0!==R.x?R.x=ct.parseExpression(R.x,t)/T.x:void 0===O.x&&(O.x=.5),void 0!==R.y?R.y=ct.parseExpression(R.y,t)/T.y:void 0===O.y&&(O.y=.5),Object.assign(b,ct.parseExpression(m,t)),Object.assign(b.scale,ct.parseExpression(T,t)),b.anchor&&Object.assign(b.anchor,ct.parseExpression(O,t)),Object.assign(b.pivot,ct.parseExpression(R,t)),void 0!==g){const e=new Lt(ct.parseExpression(g,t));e.blendMode=b.blendMode,b.filters=[e]}u&&E.addChild(b),y[a]=b;const S=b.destroy.bind(b);return b.destroy=()=>{y[a]=void 0,S()},b},Nt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function Ft(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var jt=t=>{const{logger:e,payload:{drawings:r=[]}={}}=t,n=Ft(t.payload,["drawings"]),o=Ft(t,["logger","payload"]),a=Ut(Object.assign(t,Nt({logger:e,payload:n},o)),i.Graphics);return a&&r.forEach(({method:r,params:n=[]})=>{const i=ct.parseExpressions(n,t),o=a[r];o||e.warn("Cannot resolve drawing method",r),o.call.apply(o,[a].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(i)))}),a},kt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function Bt(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var Ht=t=>{const{payload:{color:e,radius:r=25,stroke:n=0,strokeWidth:i}={}}=t,o=Bt(t.payload,["color","radius","stroke","strokeWidth"]),a=Bt(t,["payload"]),s=jt(kt({payload:o},a));return s&&(i&&s.lineStyle(i,n,1),(e||0===e)&&s.beginFill(e),s.drawCircle(0,0,ct.parseExpression(r,t)),(e||0===e)&&s.endFill()),s},Wt=t=>Ut(t,i.Container);const Gt=(t,e,r,n)=>{let i=Math.atan2(n-e,r-t)+Math.PI/2;return i>Math.PI?i-=2*Math.PI:i<-Math.PI&&(i+=2*Math.PI),i},Xt=({x:t,y:e},{CELL_SIZE:r})=>({x:r*t,y:r*e});const{BlurFilter:zt}=i.filters,Yt=16770355,Vt=16724787,Kt=16777011,qt=2941736,Zt=13385022,$t=3962311,Qt=12164347,Jt=16777215,te=16770355;function ee(t,e,r){return t+(e-t)*r}function re(t,e,r,n,i,o,a){if(n.x===i.x&&n.y===i.y)return;const{ATTACK_PENETRATION:s}=a,{x:u,y:l}=Xt(i,a),{x:c,y:h}=Xt(n,a);e.x=c,e.y=h;const f=u-c,d=l-h,p=0!==f?f/Math.abs(f)*s:0,v=0!==d?d/Math.abs(d)*s:0;r.mainContainer&&t.push({action:new U(Gt(e.x,e.y,u,l),Math.max(o/5,.4)),target:r.mainContainer}),t.push({action:new F([new D(p,v,1*o/4),new D(-p,-v,3*o/4)]),target:e})}function ne(t,e,r,n,i=0){const o=new F([new d(i),new h(1,(r-i)/4),new h(0,3*(r-i)/4)]);return t.coverSprite.children[0].tint=e,t.coverSprite.children[1].tint=e,n&&t.coverSprite.position.copy(n),{action:o,target:t.coverSprite}}function ie(t,e,r,n=0){const i=new F([new d(n),new h(.5,(r-n)/4),new h(0,3*(r-n)/4)]);return t.childCoverSprite.tint=e,{action:i,target:t.childCoverSprite}}function oe(t,e,r,n,o,a,s,u=12,l,c=.6){const h=c*o,d=new i.Graphics;d.x=r.x,d.y=r.y;const{x:p,y:v}=Xt(n,a),_=p-d.x,g=v-d.y;l&&(d.filters=[new zt(l)],d.alpha=.7),e.app.renderer instanceof i.WebGLRenderer&&(d.blendMode=i.BLEND_MODES.ADD),d.parentLayer=e.layers.effects,t.addChild(d);return{action:new f(function(t,e,r,n,i,o,a){return(s,u,l)=>{const c=u-l;if(c<=0)return void s.destroy(!0);let h=c/(1e3*t);s.clear(),s.lineStyle(e,r,1),h<.5?(h*=2,s.moveTo(n,i),s.lineTo(ee(n,o,h),ee(i,a,h))):(h=2*(h-.5),s.moveTo(n+(o-n)*h,i+(a-i)*h),s.lineTo(o,a))}}(h,u,s,_,g,0,0),h),target:d}}function ae(t,e,r,n,i,o,a,s,u,l,c){t.push(oe(e,r,n,i,o,a,s,u,void 0,c)),t.push(oe(e,r,n,i,o,a,s,u,l,c))}const se=-Math.PI/2,ue=2*Math.PI/50/2,le={move:{color:11188165,order:0,backSide:!0},work:{color:16639348,order:1},carry:{color:6710886,order:6},attack:{color:16199233,order:2},ranged_attack:{color:8366053,order:3},heal:{color:5689182,order:4},claim:{color:12164347,order:5}};function ce(t,e,r,n,o,a){const s=new i.Graphics;return s.lineStyle(18,t,1),s.arc(0,0,41,se+e,se+r,a),s.tint=t,n.addChild(s),o.push(s),s}function he(t){return Array.isArray(t)?t:Object.keys(t).sort().map(e=>t[e])}var fe=r(1),de=r.n(fe);const pe={[de.a.PWR_DISRUPT_SOURCE]:"disrupt-source",[de.a.PWR_DISRUPT_SPAWN]:"disrupt-spawn",[de.a.PWR_DISRUPT_TERMINAL]:"disrupt-terminal",[de.a.PWR_DISRUPT_TOWER]:"disrupt-tower",[de.a.PWR_REGEN_MINERAL]:"regen-mineral",[de.a.PWR_REGEN_SOURCE]:"regen-source",[de.a.PWR_GENERATE_OPS]:"generate-ops",[de.a.PWR_OPERATE_EXTENSION]:"operate-extension",[de.a.PWR_OPERATE_LAB]:"operate-lab",[de.a.PWR_OPERATE_OBSERVER]:"operate-observer",[de.a.PWR_OPERATE_SPAWN]:"operate-spawn",[de.a.PWR_OPERATE_STORAGE]:"operate-storage",[de.a.PWR_OPERATE_TERMINAL]:"operate-terminal",[de.a.PWR_OPERATE_TOWER]:"operate-tower",[de.a.PWR_SHIELD]:"shield",[de.a.PWR_FORTIFY]:"fortify",[de.a.PWR_OPERATE_CONTROLLER]:"operate-controller",[de.a.PWR_OPERATE_POWER]:"operate-power",[de.a.PWR_BERSERK]:"berserk",[de.a.PWR_DEFEND]:"defend",[de.a.PWR_DISABLE]:"disable",[de.a.PWR_ENCOURAGE]:"encourage",[de.a.PWR_EXHAUST]:"exhaust",[de.a.PWR_RENEW]:"renew",[de.a.PWR_SIGHT]:"sight",[de.a.PWR_SUMMON]:"summon",[de.a.PWR_DEMOLISH]:"demolish",[de.a.PWR_HARVEST_ENERGY]:"harvest-energy",[de.a.PWR_HARVEST_MINERAL]:"harvest-mineral",[de.a.PWR_KILL]:"kill",[de.a.PWR_MASS_REPAIR]:"mass-repair",[de.a.PWR_PUNCH]:"punch",[de.a.PWR_REFLECT]:"reflect",[de.a.PWR_REINFORCE]:"reinforce",[de.a.PWR_REMOTE_TRANSFER]:"remote-transfer",[de.a.PWR_SNIPE]:"snipe"};var ve=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};const _e={creepEnergy:{color:16770413,radius:20},energy:{color:16770413,radius:30},power:{color:15998771,radius:45}},ge={color:16777215,radius:45};function ye(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function me(t){let e=Number(t).toString(16);return e.length<2&&(e="0"+e),e}function xe(t,e,r){let n,i,o;if(0===e)n=r,i=r,o=r;else{const a=r<.5?r*(1+e):r+(e-r*e),s=2*r-a;n=ye(s,a,t+1/3),i=ye(s,a,t),o=ye(s,a,t-1/3)}return[Math.round(255*n),Math.round(255*i),Math.round(255*o)]}function Ee(t,e,r){const[n,i,o]=xe(t,e,r);return`#${me(n)}${me(i)}${me(o)}`}function be(t,e){let r=t;"string"==typeof t&&(r=parseInt(t.substr(1),16));const[n,i,o]=function(t,e,r){t/=255,e/=255,r/=255;const n=Math.max(t,e,r),i=Math.min(t,e,r);let o,a;const s=(n+i)/2;if(n===i)o=0,a=0;else{const u=n-i;switch(a=s>.5?u/(2-n-i):u/(n+i),n){case t:o=(e-r)/u+(e<r?6:0);break;case e:o=(r-t)/u+2;break;case r:o=(t-e)/u+4}o/=6}return[o,a,s]}(r>>16,r>>8&255,255&r),[a,s,u]=xe(n,i,o*e);return"string"==typeof t?`#${me(a)}${me(s)}${me(u)}`:u+(s<<8)+(a<<16)}function Te(t,e){let r=t;"string"==typeof t&&(r=parseInt(t.substr(1),16));let[n,i,o]=[r>>16,r>>8&255,255&r];return n=Math.round(n*e),i=Math.round(i*e),o=Math.round(o*e),"string"==typeof t?`#${me(n)}${me(i)}${me(o)}`:o+(i<<8)+(n<<16)}const Re=Math.sin(Math.PI/4);var Oe=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function Se(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var Ce=t=>{const{world:e,logger:r,payload:{text:n="?",style:o}={}}=t,a=Se(t.payload,["text","style"]),s=Se(t,["world","logger","payload"]),u=ct.parseExpression(n,t),l=ct.parseExpression(o,t),{app:{stage:c}}=e,h=Ut(Oe({world:e,logger:r,payload:a},s),i.Text,[u,l]);return ct.addTickerHandler(h,()=>{h.scale.x=1/c.scale.x,h.scale.y=1/c.scale.y,h.style.fontSize=l.fontSize*c.scale.x,h.style.strokeThickness=(l.strokeThickness||0)*c.scale.x}),ct.addTickerHandler(h,()=>ct.alignPositionToPixels(h,c)),h};var we=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};var Ae=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function Pe(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}var Me=t=>{const{logger:e,rootContainer:r,scope:n,world:o,objectMetadata:{texture:s},payload:{parentId:u,texture:l=s}={},stage:{resourceManager:c}}=t,h=Pe(t.payload,["parentId","texture"]),f=Pe(t,["logger","rootContainer","scope","world","objectMetadata","payload","stage"]);if(!l)return void e.warn("texture is not provided");let d;const p=ct.parseExpression(l,t);if(a.a.isString(p))d=c.getCachedResource(p);else if(d=l,!d)return void e.warn("Cannot find resource",l);if(d){const t=Ut(Ae({logger:e,payload:Ae({},h,{parentId:u}),rootContainer:r,scope:n},f),i.Sprite,[d.texture]);return ct.setSvgResizeHandler(o,t,d),t}{const t=Wt(Ae({logger:e,payload:{parentId:u},rootContainer:r,scope:n},f));return c.getResource(l).then(n=>{const a=Ut(Ae({logger:e,payload:Ae({},h,{addToParent:!1}),rootContainer:r,scope:{}},f),i.Sprite,[n.texture]);ct.setSvgResizeHandler(o,a,n),a.zIndex=-1e3,t.addChild(a)}),t}},Ie=r(93),De=r.n(Ie);var Le=(t,e,r,n=!1)=>{const i={},o={};let a,s="";if(0===t.length)return{md5:"",result:!1};for(let t=0;t<50;t+=1)i[t]=new Array(50),o[t]={};if(t.forEach(t=>{t.forEach(t=>{null!==t.x&&null!==t.y?(e(t)&&(i[t.x][t.y]=t,a=!0),o[t.x][t.y]=!1):console.error("null coordinates in object",t)})}),!a)return{md5:"",result:!1};const u=De()(JSON.stringify(i,(t,e)=>{if(""===t||Array.isArray(e)&&"effects"!==t||"object"==typeof e&&"effects"!==t||"x"===t||"y"===t||"type"===t)return e}));if(u===r)return{md5:u,result:null};function l(t,e){t>0&&e>0&&!i[t-1][e]?s+="a 50 50 0 0 0 -50 -50 h 50 ":s+="v -50 "}function c(t,e){e>0&&t>0&&!i[t][e-1]?s+="v -50 a 50 50 0 0 0 50 50 ":s+="h 50 "}function h(t,e){0===t||i[t-1][e]||0===e||i[t][e-1]?s+="v -50 h 50 ":s+="a 50 50 0 0 1 50 -50 "}function f(t,e){e>0&&t<49&&!i[t][e-1]?s+="a 50 50 0 0 0 50 -50 v 50 ":s+="h 50 "}function d(t,e){t<49&&e>0&&!i[t+1][e]?s+="h 50 a 50 50 0 0 0 -50 50 ":s+="v 50 "}function p(t,e){49===t||i[t+1][e]||0===e||i[t][e-1]?s+="h 50 v 50 ":s+="a 50 50 0 0 1 50 50 "}function v(t,e){49===t||i[t+1][e]||49===e||i[t][e+1]||i[t+1][e+1]&&(i[t+1][e]||n)?s+="v 50 h -50 ":s+="a 50 50 0 0 1 -50 50 "}function _(t,e){0===t||i[t-1][e]||49===e||i[t][e+1]||i[t-1][e+1]&&(i[t-1][e]||n)?s+="h -50 v -50 ":s+="a 50 50 0 0 1 -50 -50 "}function g(t,e,r){o[t][e]?s+=r?"v 100 ":"h -100 ":(r?(0===t||0===e||i[t-1][e-1]&&(n||i[t-1][e]||i[t][e-1])?c(t,e):s+="h 50 ",t<49&&i[t+1][e]?(49===t||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?f(t,e):s+="h 50 ",g(t+1,e,1),s+="h -100 "):(49===t||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?(f(t,e),d(t,e)):p(t,e),v(t,e),s+="h -50 ")):(49===t||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?d(t,e):s+="v 50 ",e<49&&i[t][e+1]?(s+="v 50 ",g(t,e+1,0),s+="v -50 "):(v(t,e),_(t,e)),0===t||0===e||i[t-1][e-1]?l(t,e):s+="v -50 "),t<50&&e<50&&(o[t][e]=!0))}for(let t=0;t<50;t+=1)for(let e=0;e<50;e+=1)if(i[t][e]&&!o[t][e]){s+=`M ${100*t} ${100*e+50} `,o[t][e]=!0;let r=0;do{r+=1}while(t+r<50&&i[t+r][e]);let a=0;do{a+=1}while(e+a<50&&i[t][e+a]);a<r?(0===t||0===e||i[t-1][e-1]&&(n||i[t-1][e]||i[t][e-1])?(l(t,e),c(t,e)):h(t,e),t<49&&i[t+1][e]?(49===t||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?f(t,e):s+="h 50 ",g(t+1,e,1),s+="h -50 "):(49===t||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?(f(t,e),d(t,e)):p(t,e),v(t,e)),_(t,e)):(0===t||0===e||i[t-1][e-1]&&(n||i[t-1][e]||i[t][e-1])?(l(t,e),c(t,e)):h(t,e),49===t||0===e||i[t+1][e-1]&&(n||i[t+1][e]||i[t][e-1])?(f(t,e),d(t,e)):p(t,e),e<49&&i[t][e+1]?(s+="v 50 ",g(t,e+1,0),s+="v -50 "):(v(t,e),_(t,e))),s+="Z "}return{md5:u,result:s}};const{TilingSprite:Ue}=i.extras,{BlurFilter:Ne}=i.filters;function Fe(t,{size:{width:e,height:r},VIEW_BOX:n},o){const a={viewBox:`0 0 ${n} ${n}`,"shape-rendering":"optimizeSpeed"},s=Object.entries(a).map(([t,e])=>`${t}="${encodeURIComponent(e)}"`).join(" "),u=Object.entries(o).map(([t,e])=>`${t}="${encodeURIComponent(e)}"`).join(" "),l=`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${r}" ${s} data-timestamp="${Date.now()}"><path ${u} d="${t}" /></svg>`,c=i.Sprite.fromImage("data:image/svg+xml;charset=utf8,"+l);return c._generatedSvgTexture=!0,c}function je(t,e,r){ct.addTickerHandler(t,n=>{t.tilePosition.x+=n*e,t.tilePosition.y+=n*r})}var ke=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function Be(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}const He={radius:37,color:2236962},We={texture:null};const Ge={slow:[[.3,5],[1,5]],fast:[[.3,1],[1,1]],blink:[[.8,2],[1,.1],[.6,4],[1,.1],[.7,1],[1,.1]],neon:[[1,1],[.95,.07],[1,.07],[1,.07],[.9,.07],[1,.07],[.7,.07],[1,.07],[1,.1],[.9,.07],[1,.07],[1,1],[.95,.07],[1,.07],[1,.07],[.9,.07],[1,.07]],flash:[[1,.1],[0,1.5],[0,2]]};var Xe={circle:Ht,container:Wt,creepActions:t=>{const{logger:e,stage:r,rootContainer:n,scope:o,tickDuration:a,state:s,prevState:u,world:l,payload:{parentId:c}={},world:{options:h}}=t,{actionLog:{attacked:f=null,attack:d=null,build:p=null,harvest:v=null,heal:_=null,healed:g=null,power:y=null,rangedAttack:m=null,rangedHeal:x=null,repair:E=null,reserveController:b=null,runReaction:T=null,reverseReaction:R=null,transferEnergy:O=null,upgradeController:S=null}={}}=s,C=c?o[c]:n;if(!C)return void e.warn("No parent available with id",c);if(!u)return;o.coverSprite||function(t,e,r,n){const o=new i.Container;o.position.copy(e.position),o.alpha=0,e.parent.addChild(o),r.coverSprite=o,e.on("removed",()=>o.destroy());const a=new i.Sprite(t.cover.texture);a.anchor.x=.5,a.anchor.y=.5,a.alpha=.3,a.parentLayer=n.layers.effects,o.addChild(a);const s=new i.Sprite(t.flare2.texture);s.blendMode=i.BLEND_MODES.ADD,s.width=300,s.height=300,s.anchor.x=.5,s.anchor.y=.5,s.alpha=.05,s.parentLayer=n.layers.effects,o.addChild(s);const u=new i.Sprite(t.glow.texture);u.anchor.x=.5,u.anchor.y=.5,u.x=0,u.y=0,u.width=500,u.height=500,u.alpha=.5,u.parentLayer=n.layers.lighting,o.addChild(u)}(r.resources,n,o,l),o.childCoverSprite||function(t,e,r,n){const o=new i.Sprite(t.cover.texture);o.anchor.x=.5,o.anchor.y=.5,o.alpha=0,o.parentLayer=n.layers.effects,o.blendMode=i.BLEND_MODES.ADD,e.addChild(o),r.childCoverSprite=o}(r.resources,C,o,l);const w=[],A=u&&(s.x!==u.x||s.y!==u.y);if(d&&("tower"===s.type?ae(w,r,l,n,d,a,h,$t,18,5):A||re(w,n,o,s,d,a,h)),v&&(A||re(w,n,o,s,v,a,h),w.push(ne(o,Yt,.9*a,Xt(v,h)))),b&&("invaderCore"===s.type?ae(w,r,l,n,b,a,h,Qt,18,5):A||re(w,n,o,s,b,a,h),w.push(ne(o,Qt,.9*a,Xt(b,h),"invaderCore"===s.type?.3*a:0))),_&&("tower"===s.type?ae(w,r,l,n,_,a,h,qt,18,5):A||re(w,n,o,s,_,a,h)),f&&g?w.push(ie(o,Kt,.9*a)):g?w.push(ie(o,qt,.9*a)):f&&w.push(ie(o,Vt,.9*a)),m&&ae(w,r,l,n,m,a,h,$t,12,5),O&&ae(w,r,l,n,O,a,h,te,18,5),x&&ae(w,r,l,n,x,a,h,qt,12,5),y&&ae(w,r,l,n,y,a,h,Zt,12,5,.3),p&&(ae(w,r,l,n,p,a,h,Yt,"invaderCore"===s.type?18:12,5),w.push(ne(o,Yt,.9*a,Xt(p,h),.3*a))),S&&(ae(w,r,l,n,S,a,h,Yt,"invaderCore"===s.type?18:12,5),w.push(ne(o,Yt,.9*a,Xt(S,h),.3*a))),E&&(ae(w,r,l,n,E,a,h,Yt,"tower"===s.type?18:12,5),w.push(ne(o,Yt,.9*a,Xt(E,h),.3*a))),T){const{x1:t,y1:e,x2:n,y2:i}=T;ae(w,r,l,Xt({x:t,y:e},h),s,a,h,Jt,12,2),ae(w,r,l,Xt({x:n,y:i},h),s,a,h,Jt,12,2)}if(R){const{x1:t,y1:e,x2:i,y2:o}=R;ae(w,r,l,n,{x:t,y:e},a,h,Jt,12,2),ae(w,r,l,n,{x:i,y:o},a,h,Jt,12,2)}!function(t,e){t.forEach(({target:t,action:r})=>e.runAction(t,r))}(w,r.actionManager)},creepBuildBody:({logger:t,rootContainer:e,scope:r,stage:n,state:o,payload:{parentId:a}={}})=>{const{resources:s}=n,u=a?r[a]:e;if(!u)return void t.warn("No parent available with id",a);r.bodySprites?r.bodySprites.forEach(t=>u.removeChild(t)):r.bodySprites=[];const{body:l}=o,c=he(l).filter(({type:t,hits:e})=>"tough"!==t&&"carry"!==t&&e>0),h=Object.values(c.reduce((t,{type:e,hits:r})=>{const n=t[e];return n?n.hits+=r:t[e]={type:e,hits:r},t},{}));h.sort((t,e)=>t.hits<e.hits?-1:t.hits>e.hits?1:0);let f=0,d=Math.PI;h.forEach(e=>{const n=le[e.type];if(n){const{backSide:t,color:i}=n,o=t?d:f,a=ue*(e.hits/100);ce(i,o,o+a,u,r.bodySprites,!1),ce(i,-o,-(o+a),u,r.bodySprites,!0),t?d+=a:f+=a}else t.warn("Unsupported type "+e.type)}),he(l).filter(({type:t,hits:e})=>"tough"===t&&e>0).length>0&&function(t,e,r){const n=new i.Sprite(t.tough.texture);n.width=120,n.height=120,n.anchor.x=.5,n.anchor.y=.5,e.addChild(n),r.push(n)}(s,u,r.bodySprites)},disappear:({stage:t,rootContainer:e,tickDuration:r,callback:n})=>{const{actionManager:i}=t,o=new F([new I(r/2),new f(()=>{n()})]);i.runAction(e,o)},draw:jt,moveTo:({firstRun:t,state:e,payload:{targetKey:r,shouldRotate:n=!1}={},rootContainer:i,stage:o,prevState:a,scope:s,tickDuration:u,world:{options:l}})=>{const{actionManager:c}=o,{x:h,y:f}=Xt(e,l),d=r?s[r]:i;if(!t){const t=[];a&&n&&t.push(new U(Gt(d.x,d.y,h,f),u/5));const e=new j(t);s.moveToAction&&c.cancelAction(s.moveToAction),s.moveToAction=c.runAction(d,e)}},object:Ut,powerInfluence:t=>{const{logger:e,stage:r,rootContainer:n,scope:o,tickDuration:a,state:s,prevState:u,world:l,payload:{parentId:c}={},world:{options:f}}=t,{actionLog:{power:p}={}}=s;if(!(c?o[c]:n))return void e.warn("No parent available with id",c);if(!u)return;const v=[];if(p){const t=pe[p.id];t||console.log("No texture key provided for power id",p.id);const e=r.resources[t];e||console.log("No texture provided for key ",t);const o=function(t,e,r,n){const o=new i.Container;o.position.copy(e.position),e.parent.addChild(o),e.on("removed",()=>o.destroy());const a=new i.Sprite(t.texture);return a.anchor.x=.5,a.anchor.y=.5,a.width=300,a.height=300,a.parentLayer=n.layers.effects,o.addChild(a),o}(e,n,0,l);v.push(function(t,e,r,n=0){const i=(e-n)/4,o=new F([new j([new N(.5,.5,0),new h(0,0)]),new d(n),new j([new N(1,1,i),new h(1,i)]),new h(0,i)]);return r&&t.position.copy(r),{action:o,target:t}}(o,.9*a,Xt({x:p.x,y:p.y},f),.3))}!function(t,e){t.forEach(({target:t,action:r})=>e.runAction(t,r))}(v,r.actionManager)},resourceCircle:t=>{const{state:{resourceType:e="creepEnergy",resourceType:r="energy",[r]:n,[r+"Capacity"]:i=1250}={},prevState:{[r]:o}={},payload:{radius:a}={}}=t,s=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(t,["state","prevState","payload"]);if(o!==n){const{[e]:{color:r,radius:o}=ge}=_e,u=(ct.parseExpression(a,t)||o)*Math.min(1,0!==i?n/i:0);return Ht(ve({payload:{color:r,radius:u}},s))}},road:t=>{const{rootContainer:e,id:r,scope:n,stateExtra:o,world:{app:a,layers:{terrain:s},options:{CELL_SIZE:u,lighting:l="normal"},decorations:c},state:{x:h,y:f}={},stateExtra:{objects:d}}=t,p=n[r],v=p?p.knownNodes:{mm:!1,zm:!1,pm:!1,mz:!1},_={mm:!1,zm:!1,pm:!1,mz:!1};let{roads:g}=o;g||(g=function(t){const e=[];t.forEach(t=>{const{type:r,x:n,y:i}=t;"road"===r&&(e[n]||(e[n]=[]),e[n][i]=t)}),e.push([]);for(let t=0;t<e.length;t+=1)e[t]||(e[t]=[]);return e}(d),o.roads=g),_.mm=Boolean(g[h-1][f-1]),_.zm=Boolean(g[h][f-1]),_.pm=Boolean(g[h+1][f-1]),_.mz=Boolean(g[h-1][f]);const y=c.find(t=>["landscape","floorLandscape"].includes(t.decoration.type));if(!p||Object.entries(_).some(([t,e])=>e!==v[t])||p.decorationFloorLandscape!==y){const t=0,o=.15*u,c=o*Re,h=u,f=h,d=new i.Graphics;d.parentLayer=s,d.zIndex=1,a.renderer instanceof i.WebGLRenderer?("disabled"===l&&(d.tint=10526880),"low"===l&&(d.tint=12632256)):d.tint=10526880;const v=y?be(parseInt(y.roadsColor.substring(1),16),y.roadsBrightness):11184810;return d.clear(),d.beginFill(v),d.drawCircle(t,t,o),d.endFill(),_.mm&&(d.beginFill(v),d.moveTo(t+c,t-c),d.lineTo(t-c,t+c),d.lineTo(t-c-f,t+c-f),d.lineTo(t+c-f,t-c-f),d.lineTo(t+c,t-c),d.endFill()),_.zm&&(d.beginFill(v),d.moveTo(t+o,t),d.lineTo(t-o,t),d.lineTo(t-o,t-h),d.lineTo(t+o,t-h),d.lineTo(t+o,t),d.endFill()),_.pm&&(d.beginFill(v),d.moveTo(t-c,t-c),d.lineTo(t+c,t+c),d.lineTo(t+c+f,t+c-f),d.lineTo(t-c+f,t-c-f),d.lineTo(t-c,t-c),d.endFill()),_.mz&&(d.beginFill(v),d.moveTo(t,t+o),d.lineTo(t,t-o),d.lineTo(t-h,t-o),d.lineTo(t-h,t+o),d.lineTo(t,t+o),d.endFill()),p&&p.destroy(!0),d.knownNodes=_,d.decorationFloorLandscape=y,n[r]=d,e.addChild(d),d}},runAction:{config:{isOwner:!1},run:t=>{const{rootContainer:e,scope:r,payload:{id:n}={}}=t;return n?r[n]:e}},say:t=>{const{payload:{say:e},world:{app:{stage:r}},scope:n}=t,o=ct.parseExpression(e,t),a=o.isPublic?14518408:13421772,s={align:"center",fill:"#111",fontFamily:"Roboto, sans-serif",fontSize:60},u=Ut(t,i.Container);n.sayContainer=u;const l=i.TextMetrics.measureText(o.message,new i.TextStyle(s)).width+60,c=new i.Graphics;c.lineStyle(8,0),c.beginFill(a),c.drawRoundedRect(-l/2,-170,l,100,30),c.drawPolygon([new i.Point(30,-74),new i.Point(0,-44),new i.Point(-30,-74)]),c.endFill(),u.addChild(c);const h=Object.assign({},t,{id:"sayText",payload:{parentId:"sayContainer",text:o.message,style:s,x:0,y:-120,anchor:{x:.5,y:.5}}});return Ce(h),ct.addTickerHandler(u,()=>ct.alignPositionToPixels(u,r)),u},setBadgeUrls:({state:t,world:{options:{BADGE_URL:e}}})=>{const{users:r}=t;r&&Object.entries(r).forEach(([,t])=>{const{username:r}=t;t.badgeUrl=e.replace("%1",encodeURIComponent(r))})},siteProgress:t=>{const{rootContainer:e,scope:r,payload:n}=t,i=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(t,["rootContainer","scope","payload"]),o=ct.parseExpression(n.progress,t);if(o!==r.oldProgress){r.oldProgress=o;const a=jt(we({rootContainer:e,scope:r},i)),s=ct.parseExpression(n.progressTotal,t),u=ct.parseExpression(n.color,t),l=ct.parseExpression(n.radius,t),c=ct.parseExpression(n.lineWidth,t);if(a.rotation=-Math.PI/2,a.beginFill(0,0),a.lineStyle(c,u,1),a.drawCircle(0,0,l+c/2),o>0&&s>0){const t=2*Math.PI*(Math.min(o,s)/s);a.beginFill(u),a.moveTo(0,0),a.lineStyle(1,u,1);const e=function(t,e){return{x:Math.cos(t)*e,y:Math.sin(t)*e}}(0,l);a.lineTo(e.x,e.y),a.arc(0,0,l,0,t),a.lineTo(0,0),a.endFill()}return a}},sprite:Me,terrain:t=>{const{world:{app:e,stage:r,decorations:n,layers:{terrain:o,lighting:a,effects:s},options:{size:u}},state:{gameData:{player:l,swampTexture:c="animated"},objects:h,users:f={},setTerrain:d},world:{options:{CELL_SIZE:p,RENDER_SIZE:v=u,VIEW_BOX:_,HALF_CELL_SIZE:g=p/2,lighting:y="normal"}}}=t,m=v.width/_;function x(t,e){return r.addChild(t),t.parentLayer=o,t.x=-p/2,t.y=-p/2,t.width=_,t.height=_,Object.assign(t,e),t}r.terrainObjects||(r.terrainObjects={},r.terrainObjects.wallMask=new i.Sprite(i.Texture.EMPTY),Object.assign(r.terrainObjects.wallMask,{x:-50,y:-50,width:5e3,height:5e3,renderable:!1}),r.addChild(r.terrainObjects.wallMask));const{terrainObjects:E}=r,b=n.find(t=>["landscape","wallLandscape"].includes(t.decoration.type)),T=n.find(t=>["landscape","floorLandscape"].includes(t.decoration.type));let{previousSwamps:R}=E;R||(R=[],E.previousSwamps=R),d&&(R=h.filter(({type:t})=>"swamp"===t),E.previousSwamps=R),T!==E.decorationFloorLandscape&&(E.previousSwampsMd5=null);const{result:O,md5:S}=Le(d?[R]:[h,R],({type:t})=>"swamp"===t,E.previousSwampsMd5);if(E.previousSwampsMd5=S,O){let{swampObjects:t}=E;if(t?t.forEach(t=>t.destroy(t._generatedSvgTexture)):(t=[],E.swampObjects=t),e.renderer instanceof i.WebGLRenderer){let e;e="disabled"===y?8421504:"low"===y?10526880:16777215;let n="disabled"!==c?"#4a501e":"#465c03";T&&(n=T.swampColor);let o="disabled"!==c?"#4a501e":"#3b4019";T&&(o=T.swampStrokeColor),t[0]=x(Fe(O,{size:v,VIEW_BOX:_},{fill:n,stroke:o,"stroke-width":T?T.swampStrokeWidth:50,"paint-order":"stroke"}),{alpha:.4,tint:e}),"disabled"!==c&&(t[1]=x(Fe(O,{size:v,VIEW_BOX:_},{fill:"#fff"}),{alpha:.25}),t[2]=x(Fe(O,{size:v,VIEW_BOX:_},{fill:"#fff"}),{alpha:.25}),t[3]=x(new Ue(r.resources.noise2.texture,_,_),{alpha:"normal"===y?.3:.15,blendMode:i.BLEND_MODES.ADD,mask:t[1],tileScale:new i.Point(10,10),tint:6749952}),t[4]=x(new Ue(r.resources.noise2.texture,_,_),{alpha:"normal"===y?.3:.15,blendMode:i.BLEND_MODES.ADD,tileScale:new i.Point(14,14),mask:t[2],tint:6749952}),"animated"===c&&(je(t[3],1.5,1.5),je(t[4],-1.35,-1.35)))}else t[0]=x(Fe(O,{size:v,VIEW_BOX:_},{fill:T?T.swampColor:"#292b18",stroke:T?T.swampStrokeColor:"#252715","stroke-width":T?T.swampStrokeWidth:50,"paint-order":"stroke"}))}let{rampartsObjects:C}=E;C?Object.entries(C).forEach(([,t])=>{t.came=!1}):(C={},E.rampartsObjects=C),Object.keys(f).forEach(t=>{const{[t]:e={md5:"",sprite:null}}=C,{md5:r,result:n}=Le([h],({type:e,isPublic:r,user:n})=>"rampart"===e&&!r&&n===t,e.md5,!0);e.md5=r,n?(e.sprite&&e.sprite.destroy(e.sprite._generatedSvgTexture),e.sprite=x(Fe(n,{size:v,VIEW_BOX:_},l===t?{fill:"#105010",stroke:"#44ff44","stroke-width":25,"paint-order":"stroke"}:{fill:"#501010",stroke:"#ff4444","stroke-width":25,"paint-order":"stroke"}),{alpha:.4,blendMode:i.BLEND_MODES.ADD,parentLayer:s})):!1===n&&e.sprite&&(e.sprite.destroy(e.sprite._generatedSvgTexture),e.sprite=null),e.came=!0,C[t]=e}),Object.entries(C).forEach(([t,e])=>{e.came||(e.sprite&&e.sprite.destroy(e.sprite._generatedSvgTexture),delete C[t])});let{previousWalls:w}=E;w||(w=[],E.previousWalls=w),d&&(w=h.filter(({type:t})=>"wall"===t),E.previousWalls=w);const A=d?[w]:[h,w];b!==E.decorationWallLandscape&&(E.previousWallsMd5=null);const{md5:P,result:M}=Le(A,({type:t})=>"wall"===t||"constructedWall"===t,E.previousWallsMd5);if(E.previousWallsMd5=P,M){let{wallObjects:t}=E;const n=t||[];if(t=[],E.wallObjects=t,e.renderer instanceof i.WebGLRenderer){t[0]=i.RenderTexture.create(v.width,v.height),t[1]=x(new i.Sprite(i.Texture.WHITE),{zIndex:2,visible:!1});let o="disabled"===y?"#181818":"#111",s="#000";b&&(o=be(b.backgroundColor,b.backgroundBrightness),s=be(b.strokeColor,b.strokeBrightness),"disabled"===y&&(o=Te(o,.5),s=Te(s,.3)));const u=Fe(M,{size:v,VIEW_BOX:_},{fill:o,stroke:s,"stroke-width":b?b.strokeWidth:10,"paint-order":"stroke"});ct.onTextureLoaded(u.texture,()=>{e.renderer.render(u,t[0]),u.destroy(!0)});const l=Fe(M,{size:v,VIEW_BOX:_},{fill:"#fff"});E.wallMask.texture!==i.Texture.EMPTY&&E.wallMask.texture.destroy(!0),E.wallMask.texture=l.texture,ct.onTextureLoaded(l.texture,()=>{if("disabled"!==y){const n=new Ue(r.resources.noise1.texture,_,_);Object.assign(n,{alpha:.2,blendMode:i.BLEND_MODES.ADD,tileScale:new i.Point(8*m,8*m),mask:l}),e.renderer.render(n,t[0],!1),n.destroy()}l.destroy(),ct.enableTextureMipmap(e.renderer,t[0].baseTexture),[t[1].texture]=t,t[1].visible=!0,n[1]&&n[1].destroy(!0)}),t[2]=i.RenderTexture.create(v.width,v.height),t[3]=x(new i.Sprite(i.Texture.WHITE),{parentLayer:a,_overrideBlendMode:!0,blendMode:i.BLEND_MODES.MULTIPLY,visible:!1});const c=Fe(M,{size:v,VIEW_BOX:_},{fill:"#000"});ct.onTextureLoaded(c.texture,()=>{c.filters=[new Ne(.006*v.width)],e.renderer.render(c,t[2]),c.destroy(!0),ct.enableTextureMipmap(e.renderer,t[2].baseTexture),[,,t[3].texture]=t,t[3].visible=!0,n[3]&&n[3].destroy(!0)}),t[4]=x(Fe(M,{size:v,VIEW_BOX:_},{fill:"#808080",stroke:b?Ee(0,0,b.strokeLighting):"#000000","stroke-width":b?b.strokeWidth:10,"paint-order":"stroke"}),{parentLayer:a,visible:!1}),ct.onTextureLoaded(t[4].texture,()=>{t[4].visible=!0,n[4]&&n[4].destroy(!0)})}else t[0]=x(Fe(M,{size:v,VIEW_BOX:_},{fill:"#111",stroke:"#000","stroke-width":10,"paint-order":"stroke"}),{zIndex:2,visible:!1}),ct.onTextureLoaded(t[0].texture,()=>{t[0].visible=!0,n[0]&&n[0].destroy()})}if(!E.previousFloor||T!==E.decorationFloorLandscape){const t=E.previousFloor;E.previousFloor={};const n=new i.Graphics;let a,s=5592405;if("disabled"!==y&&e.renderer instanceof PIXI.WebGLRenderer||(s=2105376),"low"===y&&(s=3487029),T&&(s=parseInt(T.floorBackgroundColor.substring(1),16),s=be(s,T.floorBackgroundBrightness),"low"===y&&(s=Te(s,.65)),"disabled"===y&&(s=Te(s,.5))),n.beginFill(s),n.drawRect(-g,-g,_,_),n.endFill(),o.addChild(n),E.previousFloor.background=n,T){T.decoration.tileScale?(a=Ue.fromImage(T.decoration.floorForegroundUrl,50*p,50*p),a.texture.baseTexture.mipmap=!1,a.tileScale.x=T.decoration.tileScale,a.tileScale.y=T.decoration.tileScale):a=i.Sprite.fromImage(T.decoration.floorForegroundUrl);let t=be(parseInt(T.floorForegroundColor.substr(1),16),T.floorForegroundBrightness);"low"===y&&(t=Te(t,.65)),"disabled"===y&&(t=Te(t,.5)),Object.assign(a,{x:-.5*p,y:-.5*p,width:50*p,height:50*p,alpha:T.floorForegroundAlpha,tint:t})}else{a=new Ue(r.resources.ground.texture,_,_),a.x=-g,a.y=-g,a.tileScale.x=3,a.tileScale.y=3,a.alpha="normal"===y?.3:"low"===y?.1:.2;const t=new Ue(r.resources["ground-mask"].texture,_,_);t.x=-g,t.y=-g,t.tileScale.x=7,t.tileScale.y=7,t.blendMode=i.BLEND_MODES.MULTIPLY,t.alpha="normal"===y?.15:"low"===y?.05:.1,E.previousFloor.ground2=t,o.addChild(t)}o.addChild(a),E.previousFloor.ground=a,t&&(t.background.destroy(),t.ground.destroy(),t.ground2&&t.ground2.destroy())}E.decorationFloorLandscape=T,E.decorationWallLandscape=b},text:Ce,userBadge:t=>{const{payload:{parentId:e,radius:r=He.radius,color:n=He.color}={},scope:i,scope:{[e]:o},state:{user:a},stateExtra:{users:s={}},state:u,stateExtra:l}=t,c=Be(t.payload,["parentId","radius","color"]),h=Be(t,["payload","scope","scope","state","stateExtra","state","stateExtra"]),f=a&&s[a]&&s[a].badgeUrl;if(f){const t=ke({},We,{width:2*r,texture:f,parentId:e},c);return Me(ke({payload:t,scope:{[e]:o}},h))}return Ht(ke({payload:{radius:r,color:n,parentId:e},scope:i},h))},creepDecoration:t=>{const{logger:e,stage:{actionManager:r},rootContainer:n,id:o="object",scope:a,state:s,payload:{parentId:u,id:l=o}={},world:{decorations:c=[],layers:f}}=t,d=u?a[u]:n;d?(a[l]&&(a[l].forEach(t=>t.destroy()),delete a[l]),a[l]=[],c.forEach(t=>{if("creep"!==t.decoration.type||s.user!==""+t.user||s.spawning)return;const e=t.nameFilter.split(/!SEP!/).some(t=>s.name.includes(t));if(!t.exclude&&!e||t.exclude&&e)return;const o=new i.Container;if(a[l].push(o),t.syncRotate?d.addChild(o):n.addChildAt(o,0),t.decoration.graphics.forEach(e=>{const r=i.Sprite.fromImage(e.url);Object.assign(r,{width:t.width,height:t.height,anchor:{x:.5,y:.5},parentLayer:"below"===t.position?f.objects:f.effects,zIndex:1}),void 0!==t[e.alpha]&&(r.alpha=t[e.alpha]),t[e.color]&&(r.tint=be(parseInt(t[e.color].substring(1),16),t.brightness)),t.flip&&(r.scale.y*=-1),o.addChild(r)}),t.lighting&&t.decoration.graphics.forEach(e=>{const r=i.Sprite.fromImage(e.url);Object.assign(r,{width:t.width,height:t.height,anchor:{x:.5,y:.5},parentLayer:f.lighting}),void 0!==t[e.alpha]&&(r.alpha=t[e.alpha]),t.flip&&(r.scale.y*=-1),o.addChild(r)}),t.animation){const e=new L(new F(Ge[t.animation].map(t=>new j([new h(t[0],t[1])]))));r.runAction(o,e)}})):e.warn("No parent available with id",u)},objectDecoration:t=>{const{logger:e,stage:{actionManager:r},rootContainer:n,id:o="object",scope:a,state:s,payload:{parentId:u,id:l=o}={},world:{decorations:c=[],layers:f}}=t;(u?a[u]:n)?(a[l]&&(a[l].forEach(t=>t.destroy()),delete a[l]),a[l]=[],c.forEach(t=>{if("object"!==t.decoration.type||s.user!==""+t.user||t.decoration.objectType!==s.type)return;const e=new i.Container;if(a[l].push(e),n.addChildAt(e,0),t.decoration.graphics.forEach(r=>{const n=i.Sprite.fromImage(r.url);Object.assign(n,{width:t.width,height:t.height,anchor:{x:.5,y:.5},parentLayer:f.objects,zIndex:1}),void 0!==t[r.alpha]&&(n.alpha=t[r.alpha]),t[r.color]&&(n.tint=be(parseInt(t[r.color].substring(1),16),t.brightness)),e.addChild(n)}),t.lighting&&t.decoration.graphics.forEach(r=>{const n=i.Sprite.fromImage(r.url);Object.assign(n,{width:t.width,height:t.height,anchor:{x:.5,y:.5},parentLayer:f.lighting}),void 0!==t[r.alpha]&&(n.alpha=t[r.alpha]),e.addChild(n)}),t.animation){const n=new L(new F(Ge[t.animation].map(t=>new j([new h(t[0],t[1])]))));r.runAction(e,n)}})):e.warn("No parent available with id",u)}},ze=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};class Ye{constructor(t,e,r){if(this.state=void 0,this.calcs={},this.rootContainer={},this.id=t,this.objectMetadata=e,this.world=r,this.rootContainer=r.createData(e),this.rootContainer.zIndex=e.zIndex||0,e.processors){let t=0;e.processors.forEach(e=>{e.id=e.id||"id#"+Math.floor(1e5*Math.random()),e.zIndex=e.zIndex||t,t+=1})}e.actions&&e.actions.forEach(t=>{t.id=t.id||"id#"+Math.floor(1e5*Math.random())}),this.scope={actions:{},processors:{}}}remove(t){const{world:e,rootContainer:r,scope:n,objectMetadata:i}=this,{disappearProcessor:o}=i;if(o){const a={objectMetadata:i,rootContainer:r,scope:n,tickDuration:t,callback:()=>this._destroy()};e.runProcessor(o,a)}else this._destroy()}_destroy(){const{world:t,rootContainer:e,scope:r,objectMetadata:n}=this;n.processors.forEach(t=>{const n={objectMetadata:t,rootContainer:e,scope:r};this.destructProcessor(r,t,n)}),this.world.cancelActionsForObj(e),t.destroyData(e)}applyState(t,e,r){const{state:n,calcs:i,world:o,rootContainer:a,scope:s,objectMetadata:u,world:{options:{logger:l}}}=this,c=!n,h=ze({},i),f={calcs:h,firstRun:c,objectMetadata:u,prevCalcs:i,prevState:n,world:o,rootContainer:a,scope:s,state:t,stateExtra:r,tickDuration:e};c&&u.data&&Object.entries(u.data).forEach(([t,e])=>{this.rootContainer[t]=ct.parseExpression(e,f)}),u.calculations&&u.calculations.forEach(e=>{const r=this.propsChanged(e,f);if(this.shouldRun(e,f,{firstRun:c,propsChanged:r})){const{path:r=null,id:i="customField",func:o}=e,a=null===r?t:G(t,r),s=null===r?n:G(n,r),u=ze({},f,{state:a,prevState:s,payload:e.payload});h[i]=ct.parseExpression(o,u),l.debug("Calculation",i,"set to",h[i])}}),u.actions&&u.actions.map(t=>{if(!t.targetId||s[t.targetId]){const e=t.targetId?s[t.targetId]:void 0,r=s.actions[t.id],{animations:n}=r||{},i=!r,o=this.propsChanged(t,f),a=this.shouldRun(t,f,{propsChanged:o,firstRun:i}),u=this.onceAllow(t,{propsChanged:o,firstRun:i}),l=!a&&this.shouldDestruct(t,f,{propsChanged:o,firstRun:i});a&&u?(n&&this.world.finishActions(n),s.actions[t.id]={animations:this.world.runActions(t.actions,f,e)}):l&&(n&&this.world.finishActions(n),delete s.actions[t.id])}return[]}),u.processors.forEach(e=>{const r=!s.processors[e.id],i=this.propsChanged(e,f),a=this.shouldRun(e,f,{propsChanged:i,firstRun:r}),u=!a&&this.shouldDestruct(e,f,{propsChanged:i,firstRun:r});if(a||u){const{layer:l,path:c=null,zIndex:h}=e,d=null===c?t:G(t,c),p=null===c?n:G(n,c),v=ze({},f,{state:d,prevState:p},e),_=this.onceAllow(e,{propsChanged:i,firstRun:r});if(a&&_){const t=o.runProcessor(e,v);let r;t?(t.zIndex=h,l&&(t.parentLayer=this.world.layers[l]),r={actions:this.world.runActions(e.actions,v,t),obj:t}):r={},s.processors[e.id]=r}else u&&this.destructProcessor(s,e,v)}}),(t.temp||t.tempRemove)&&(this.rootContainer.alpha=.3),this.calcs=h,this.state=t}propsChanged(t,e){const{props:r="*"}=t,{prevState:n,state:i,prevCalcs:o,calcs:s}=e;return!n||("*"===r||!!r.find(t=>!a.a.isEqual(n[t],i[t]))||!!r.find(t=>!a.a.isEqual(o[t],s[t])))}shouldRun(t,e,{propsChanged:r}){const{shouldRun:n,when:i=n}=t,{prevState:o,state:a}=e;return!(i&&!ct.parseExpression(i,e))&&(!o||!a||r)}onceAllow(t,{firstRun:e}){const{once:r=!1}=t;return!r||e}shouldDestruct(t,e,{propsChanged:r}){const{shouldRun:n,until:i,when:o=n}=t;return r&&(!i&&o||i&&ct.parseExpression(i,e))}destructProcessor(t,e,r){const n=t.processors[e.id];if(n){const{actions:i,obj:o}=n;i&&this.world.finishActions(i),this.world.destructProcessor(e,r,o),delete t.processors[e.id]}else this.world.destructProcessor(e,r,null)}get rendererCounter(){return this.world.countObjects(this.rootContainer)}}var Ve=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function Ke(t){return function(){var e=t.apply(this,arguments);return new Promise((function(t,r){return function n(i,o){try{var a=e[i](o),s=a.value}catch(t){return void r(t)}if(!a.done)return Promise.resolve(s).then((function(t){n("next",t)}),(function(t){n("throw",t)}));t(s)}("next")}))}}function qe(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}const{Layer:Ze,Stage:$e}=i.display;class Qe{constructor(t){this.gameObjects={},this.decorations=[],this.options=t;const{app:e,actionManager:r,logger:n,metadata:o={},resourceMap:a,CELL_SIZE:s,VIEW_BOX:u}=this.options;this.metadata=o;const{objects:l={}}=this.metadata,{_all:{actions:c=[],calculations:h=[],processors:f=[],data:d={}}={}}=l,p=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(l,["_all"]);if(Object.entries(p).forEach(([,t])=>{if(t){const{actions:e=[],calculations:r=[],data:n=[],processors:i=[]}=t;t.actions=[].concat(qe(c),qe(e)),t.data=Ve({},d,n),t.calculations=[].concat(qe(h),qe(r)),t.processors=[].concat(qe(f),qe(i))}}),e.stage=new $e,e.stage.pivot.x=-s/2,e.stage.pivot.y=-s/2,this.app=e,this.stage=e.stage,this.stage.actionManager=r,this.resourceMap=a,this.resourceManager=new It({logger:n,world:this}),this.stage.resourceManager=this.resourceManager,this.layers={},this.defaultLayerId=null,this.unmaskedRendererInfo=null,this.app.renderer instanceof i.WebGLRenderer){const{gl:t}=this.app.renderer.state,e=t.getExtension("WEBGL_debug_renderer_info");this.unmaskedRendererInfo=e&&t.getParameter(e.UNMASKED_RENDERER_WEBGL)}const v=new i.Graphics;v.drawRect(-s/2,-s/2,u,u),e.stage.addChild(v),e.stage.mask=v}init(){var t=this;return Ke((function*(){const{stage:e}=t;var r;e.resources=yield t.resourceManager.load(t.resourceMap,t.options.rescaleResources),t.metadata.layers.forEach((r=Ke((function*({id:r,isDefault:n=!1,afterCreate:i=function(){}}){const o=new Ze;if(o.group.enableSort=!0,e.addChild(o),t.layers[r]=o,n){if(t.defaultLayerId)throw new Error("defaultLayer is already specified");t.defaultLayerId=r}yield i(o,{app:t.app,resourceManager:t.resourceManager,world:t})})),function(t){return r.apply(this,arguments)}))}))()}applyState(t,e=0,r=!0){const{gameObjects:n,metadata:{objects:i,preprocessors:o},options:{gameData:a={},logger:s,objectFilter:u}}=this,{objects:l}=t;if(t.gameData=a,this.runStatePreprocessor(o.map(t=>Xe[t]),{state:t,world:this}),!r)return;const c={};(u?u(l):l).forEach(t=>{const{type:e,room:r,x:o,y:a,_id:u=`${r}:${e}:${o}:${a}`}=t;let l=n[u];if(!l){const t=i[e];t?(l=new Ye(u,t,this),n[u]=l,s.debug("Created new game object with ID "+u)):void 0===t&&s.warn("Unsupported object type: "+e)}c[u]=t}),Object.values(n).forEach(i=>{const{id:o}=i,a=c[o];if(a)return s.debug(`Applying state to game object ${a.type} with ID ${o}`),i.applyState(a,e,t);r&&(i.remove(e),delete n[o],s.debug("Remove game object with ID "+o))})}removeAllObjects(){Object.values(this.gameObjects).forEach(t=>{t.remove(0),delete this.gameObjects[t.id]})}runStatePreprocessor(t=[],e){t.forEach(t=>t(e))}release(){this.resourceManager.release()}get metrics(){let t=0,e=0;Object.values(this.gameObjects).forEach(r=>{t+=1,e+=r.rendererCounter});const r={size:this.app.renderer.width,maxSvgSize:this.resourceManager.maxSvgSize};return this.app.renderer instanceof i.WebGLRenderer?Object.assign(r,{WebGL:"enabled",GPU:this.unmaskedRendererInfo}):Object.assign(r,{WebGL:"disabled"}),{gameObjectCounter:t,rendererCounter:e,devicePixelRatio:window.devicePixelRatio,stageSize:this.app.stage.scale.x*this.options.VIEW_BOX,renderer:r}}getWorldPosition(){const{gameObjects:t}=this,e=Object.values(t);if(0===e.length)return{x:0,y:0};const{x:r,y:n}=e[0].state;return{x:r,y:n}}createData({layer:t=this.defaultLayerId}){const e=new i.Container;return e.parentLayer=this.layers[t],this.stage.addChild(e),e}destroyData(t){t.destroy()}runProcessor(t,e){const{name:r,type:n=r}=t,i=Xe[n].run||Xe[n];if(!i)throw new Error("No processor found for "+n);const{logger:o}=this.options;return o.debug("run processor",n),i(Ve({stage:this.stage,logger:o},e))}destructProcessor(t,e,r){const{name:n,type:i=n}=t,{destruct:o,config:{isOwner:a=!0}={}}=Xe[i];if(o){const{logger:t}=this.options;return t.debug("run destruct",i),o(Ve({stage:this.stage,logger:t},e))}r&&a&&(this.cancelActionsForObj(r),r.destroy())}runActions(t=[],e,r=e.rootContainer){const{stage:{actionManager:n}}=this;return t.map(t=>ct.createAction(t,Ve({},e,{target:r}))).map(t=>n.runAction(r,t))}cancelActions(t){const{stage:{actionManager:e}}=this;t.forEach(t=>{e.cancelAction(t)})}cancelActionsForObj(t){const{stage:{actionManager:e}}=this;e.cancelActionForContainer(t);const{children:r}=t;r&&Array.isArray(r)&&r.forEach(t=>this.cancelActionsForObj(t))}finishActions(t){const{stage:{actionManager:e}}=this;t.forEach(t=>{e.finishAction(t)})}countObjects(t){let e=1;return t.children.forEach(t=>{e+=this.countObjects(t)}),e}}var Je=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};const{Application:tr,utils:er}=i;class rr{static compileMetadata(t){t.isCompiled||(Object.values(t.objects).forEach(t=>{t.calculations&&t.calculations.forEach(t=>{if(a.a.isUndefined(t.func))throw new Error(`Calculation ${t.id} does not have a func specified`);a.a.isFunction(t.func)||(t.func=ct.compileExpression(t.func))}),t.processors&&t.processors.forEach(t=>{t.shouldRun&&!a.a.isFunction(t.shouldRun)&&(t.shouldRun=ct.compileExpression(t.shouldRun)),t.until&&!a.a.isFunction(t.until)&&(t.until=ct.compileExpression(t.until)),t.when&&!a.a.isFunction(t.when)&&(t.when=ct.compileExpression(t.when))}),t.data&&Object.entries(t.data).forEach(([e,r])=>{t.data[e]=ct.compileExpression(r)})}),t.isCompiled=!0)}constructor(t){this.released=!0,this.animate=this.animate.bind(this),this.animateChecker=this.animateChecker.bind(this),this.options=t,t.countMetrics&&(this.metrics={fps:0}),this.__ts=Date.now()}init(t){var e,r=this;return(e=function*(){const{autoStart:e=!0,backgroundColor:n,size:{width:i,height:o}={width:800,height:800},worldConfigs:a,resourceMap:s,rescaleResources:l,useDefaultLogger:c=!1,logger:h=(c?console:new Proxy({},{get:function(){return function(){}}})),objectFilter:f}=r.options;r.released||r.release();const d=new tr(i,o,{antialias:!0,transparent:!n,forceCanvas:a.forceCanvas});r.app=d,n&&(d.renderer.backgroundColor=n),r.actionManager=new u,r.world=new Qe(Je({actionManager:r.actionManager,app:d,logger:h,objectFilter:f,rescaleResources:l,resourceMap:s,size:{width:i,height:o}},a)),r.resize(),r.released=!1,yield r.world.init(),t.appendChild(d.view),e&&r.start()},function(){var t=e.apply(this,arguments);return new Promise((function(e,r){return function n(i,o){try{var a=t[i](o),s=a.value}catch(t){return void r(t)}if(!a.done)return Promise.resolve(s).then((function(t){n("next",t)}),(function(t){n("throw",t)}));e(s)}("next")}))})()}release(){this.released||(clearTimeout(this.animateCheckerTimer),this.world.release(),er.destroyTextureCache(),this.app.destroy(),this.released=!0)}start(){const{options:{countMetrics:t}}=this;t&&(this.lastLoopTime=new Date),this.lastAnimationRun=Date.now(),this.animateChecker(),this.app.ticker.add(this.animate)}animateChecker(){Date.now()-this.lastAnimationRun>500&&this.animate(),this.animateCheckerTimer=setTimeout(this.animateChecker,500)}applyState(t,e){return this.world.applyState(t,e)}get zoomLevel(){const{app:{stage:t}={}}=this;return t.scale.x}set zoomLevel(t){const{app:{stage:e,renderer:r}={}}=this;if(t=.02*Math.round(t/.02),e){const n=e.scale.x;e.scale.x=t,e.scale.y=t,t!==n&&r.emit("_resized")}}pan(t,e){this.app.stage.position.x+=t,this.app.stage.position.y+=e}zoomTo(t,e,r){const n=this.zoomLevel;this.zoomLevel=t;const i=(e-this.app.stage.position.x)*(1-this.zoomLevel/n),o=(r-this.app.stage.position.y)*(1-this.zoomLevel/n);this.pan(i,o)}setTerrain(t){return this.world.applyState({objects:t,setTerrain:!0},0,!1)}resize(t){const{app:{renderer:e}={}}=this;e&&t&&e.resize(t.width,t.height)}animate(){this.lastAnimationRun=Date.now(),this.actionManager.update();const{options:{countMetrics:t,onGameLoop:e}}=this;if(t){const t=new Date,e=1e3/(t-this.lastLoopTime);this.metrics.fps=Math.round(.95*this.metrics.fps+.05*e),this.lastLoopTime=t,Object.assign(this.metrics,this.world.metrics)}e&&e()}erase(){this.world.removeAllObjects()}setDecorations(t){!function(t,e){const{world:r,world:{options:{CELL_SIZE:n,lighting:o="normal"},stage:{actionManager:a}}}=e;r.app.renderer instanceof i.WebGLRenderer&&(r.decorations=t,r.decorationsContainer&&r.decorationsContainer.destroy({children:!0,texture:!0,baseTexture:!1}),r.decorationsContainer=new i.Container,r.stage.addChild(r.decorationsContainer),t.forEach(t=>{if("wallGraffiti"===t.decoration.type&&t.decoration.graphics.forEach(e=>{if(e.visible&&!t[e.visible])return;function o(){let o;if(t.decoration.tiling?(o=i.TilingSprite.fromImage(e.url,t.width*n,t.height*n),o.texture.baseTexture.mipmap=!1,o.tileScale.x=t.tileScale,o.tileScale.y=t.tileScale):o=i.Sprite.fromImage(e.url),Object.assign(o,{anchor:{x:.5,y:.5},x:Math.floor((t.x+-.5+t.width/2)*n),y:Math.floor((t.y+-.5+t.height/2)*n),width:t.width*n,height:t.height*n,mask:r.stage.terrainObjects.wallMask,zIndex:2}),t.flip&&(o.scale.x*=-1),t.rotation&&(o.rotation=t.rotation),t.animation){const e=new L(new F(Ge[t.animation].map(t=>new j([new h(t[0],t[1])]))));a.runAction(o,e)}return o}const s=new i.Container;r.decorationsContainer.addChild(s),s.alpha=t.alpha;const u=o();if(u.parentLayer=r.layers.wallGraffiti,e.color&&(u.tint=be(parseInt(t[e.color].substr(1),16),t.brightness)),s.addChild(u),t.lighting){const t=o();t.parentLayer=r.layers.lighting,s.addChild(t)}}),["landscape","wallLandscape"].includes(t.decoration.type)){let e=be(parseInt(t.foregroundColor.substr(1),16),t.foregroundBrightness);"disabled"===o&&(e=Te(e,.6));const a=i.Sprite.fromImage(t.decoration.foregroundUrl);Object.assign(a,{x:-.5*n,y:-.5*n,width:50*n,height:50*n,parentLayer:r.layers.wallGraffiti,alpha:t.foregroundAlpha,tint:e,mask:r.stage.terrainObjects.wallMask,zIndex:1}),r.decorationsContainer.addChild(a)}}))}(t,{world:this.world})}static isWebGLSupported(){return er.isWebGLSupported()}}window&&(window.GameRenderer=rr);const nr=rr,ir=i;e.default=nr}])}));
|
|
188
52
|
//# sourceMappingURL=renderer.js.map
|