index.html 296 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731
  1. 
  2. <!DOCTYPE html><html>
  3. <head lang="en"><meta charset="UTF-8">
  4. <div id='wx_pic' style='margin:0 auto;display:none;'><img src='photo.jpg' /></div>
  5. <title>蟹黄丰满,吃货来袭,越抓越上瘾!</title>
  6. <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <style>html,body{margin:0;height:100%;overflow:hidden;user-select:none;-webkit-user-select:none}canvas{position:fixed;top:0;left:0;display:block;height:100%;margin:auto}.board{position:fixed;top:0;left:0;width:100%;height:100%;display:none;text-align:center}.board-img{height:100%}.board-btn{position:absolute;width:67%;left:17%;height:10%;top:47%;cursor:pointer}.board-text{position:absolute;width:50%;max-height:30%;overflow:hidden;top:13%;left:45%;font-size:50px;color:#56261e}.share-tip{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:url(img/share_tip.png?1408476074) 50% 0 rgba(0,0,0,.6) no-repeat;background-size:80% auto}.loading{position:fixed;top:0;left:0;background:rgba(0,0,0,.6);width:100%;height:100%}.loading-text{color:#fff;position:absolute;top:40%;width:100%;text-align:center}.start{position:fixed;top:0;left:0;width:100%;height:100%;background:url(img/start.jpg?1408476074) 50% 50% no-repeat;background-size:auto 100%}.start-btn{position:absolute;width:100%;left:0;top:50%;height:50%;cursor:pointer;-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent}</style>
  9. </head>
  10. <body>
  11. <canvas id="canvas" width="640" height="960">alternate content</canvas>
  12. <div id="start" class="start">
  13. <div id="start-btn" class="start-btn"></div>
  14. </div>
  15. <div id="loading" class="loading">
  16. <div class="loading-text">疯狂载入中... [<span id="loading-progress">0</span>%]</div>
  17. </div>
  18. <div id="board" class="board">
  19. <img class="board-img" src="img/board2.jpg?1408476074">
  20. <div id="board-text" class="board-text"></div>
  21. <div class="board-btn" style="top:58%" data-action="retry"></div>
  22. <div class="board-btn" style="top:70%" data-action="share"></div>
  23. </div>
  24. <div id="share-tip" class="share-tip"></div>
  25. <script>this.createjs = this.createjs || {};
  26. (function() {
  27. var c = function(a, k, d) {
  28. this.initialize(a, k, d)
  29. }, b = c.prototype;
  30. b.type = null;
  31. b.target = null;
  32. b.currentTarget = null;
  33. b.eventPhase = 0;
  34. b.bubbles = !1;
  35. b.cancelable = !1;
  36. b.timeStamp = 0;
  37. b.defaultPrevented = !1;
  38. b.propagationStopped = !1;
  39. b.immediatePropagationStopped = !1;
  40. b.removed = !1;
  41. b.initialize = function(a, k, d) {
  42. this.type = a;
  43. this.bubbles = k;
  44. this.cancelable = d;
  45. this.timeStamp = (new Date).getTime()
  46. };
  47. b.preventDefault = function() {
  48. this.defaultPrevented = !0
  49. };
  50. b.stopPropagation = function() {
  51. this.propagationStopped = !0
  52. };
  53. b.stopImmediatePropagation =
  54. function() {
  55. this.immediatePropagationStopped = this.propagationStopped = !0
  56. };
  57. b.remove = function() {
  58. this.removed = !0
  59. };
  60. b.clone = function() {
  61. return new c(this.type, this.bubbles, this.cancelable)
  62. };
  63. b.toString = function() {
  64. return"[Event (type=" + this.type + ")]"
  65. };
  66. createjs.Event = c
  67. })();
  68. this.createjs = this.createjs || {};
  69. (function() {
  70. var c = function() {
  71. }, b = c.prototype;
  72. c.initialize = function(a) {
  73. a.addEventListener = b.addEventListener;
  74. a.on = b.on;
  75. a.removeEventListener = a.off = b.removeEventListener;
  76. a.removeAllEventListeners = b.removeAllEventListeners;
  77. a.hasEventListener = b.hasEventListener;
  78. a.dispatchEvent = b.dispatchEvent;
  79. a._dispatchEvent = b._dispatchEvent;
  80. a.willTrigger = b.willTrigger
  81. };
  82. b._listeners = null;
  83. b._captureListeners = null;
  84. b.initialize = function() {
  85. };
  86. b.addEventListener = function(a, k, d) {
  87. var b;
  88. b = d ? this._captureListeners = this._captureListeners ||
  89. {} : this._listeners = this._listeners || {};
  90. var c = b[a];
  91. return c && this.removeEventListener(a, k, d), c = b[a], c ? c.push(k) : b[a] = [k], k
  92. };
  93. b.on = function(a, k, d, b, c, f) {
  94. return k.handleEvent && (d = d || k, k = k.handleEvent), d = d || this, this.addEventListener(a, function(a) {
  95. k.call(d, a, c);
  96. b && a.remove()
  97. }, f)
  98. };
  99. b.removeEventListener = function(a, k, d) {
  100. if (d = d ? this._captureListeners : this._listeners) {
  101. var b = d[a];
  102. if (b)
  103. for (var c = 0, f = b.length; f > c; c++)
  104. if (b[c] == k) {
  105. 1 == f ? delete d[a] : b.splice(c, 1);
  106. break
  107. }
  108. }
  109. };
  110. b.off = b.removeEventListener;
  111. b.removeAllEventListeners =
  112. function(a) {
  113. a ? (this._listeners && delete this._listeners[a], this._captureListeners && delete this._captureListeners[a]) : this._listeners = this._captureListeners = null
  114. };
  115. b.dispatchEvent = function(a, k) {
  116. if ("string" == typeof a) {
  117. var d = this._listeners;
  118. if (!d || !d[a])
  119. return!1;
  120. a = new createjs.Event(a)
  121. }
  122. if (a.target = k || this, a.bubbles && this.parent) {
  123. for (var b = this, d = [b]; b.parent; )
  124. d.push(b = b.parent);
  125. for (var c = d.length, b = c - 1; 0 <= b && !a.propagationStopped; b--)
  126. d[b]._dispatchEvent(a, 1 + (0 == b));
  127. for (b = 1; c > b && !a.propagationStopped; b++)
  128. d[b]._dispatchEvent(a,
  129. 3)
  130. } else
  131. this._dispatchEvent(a, 2);
  132. return a.defaultPrevented
  133. };
  134. b.hasEventListener = function(a) {
  135. var k = this._listeners, d = this._captureListeners;
  136. return!!(k && k[a] || d && d[a])
  137. };
  138. b.willTrigger = function(a) {
  139. for (var k = this; k; ) {
  140. if (k.hasEventListener(a))
  141. return!0;
  142. k = k.parent
  143. }
  144. return!1
  145. };
  146. b.toString = function() {
  147. return"[EventDispatcher]"
  148. };
  149. b._dispatchEvent = function(a, k) {
  150. var d, b = 1 == k ? this._captureListeners : this._listeners;
  151. if (a && b && (b = b[a.type]) && (d = b.length)) {
  152. a.currentTarget = this;
  153. a.eventPhase = k;
  154. a.removed = !1;
  155. for (var b = b.slice(),
  156. c = 0; d > c && !a.immediatePropagationStopped; c++) {
  157. var f = b[c];
  158. f.handleEvent ? f.handleEvent(a) : f(a);
  159. a.removed && (this.off(a.type, f, 1 == k), a.removed = !1)
  160. }
  161. }
  162. };
  163. createjs.EventDispatcher = c
  164. })();
  165. this.createjs = this.createjs || {};
  166. (function() {
  167. createjs.indexOf = function(c, b) {
  168. for (var a = 0, k = c.length; k > a; a++)
  169. if (b === c[a])
  170. return a;
  171. return-1
  172. }
  173. })();
  174. this.createjs = this.createjs || {};
  175. (function() {
  176. var c = function() {
  177. throw"UID cannot be instantiated";
  178. };
  179. c._nextID = 0;
  180. c.get = function() {
  181. return c._nextID++
  182. };
  183. createjs.UID = c
  184. })();
  185. this.createjs = this.createjs || {};
  186. (function() {
  187. var c = function() {
  188. throw"Ticker cannot be instantiated.";
  189. };
  190. c.RAF_SYNCHED = "synched";
  191. c.RAF = "raf";
  192. c.TIMEOUT = "timeout";
  193. c.useRAF = !1;
  194. c.timingMode = null;
  195. c.maxDelta = 0;
  196. c.removeEventListener = null;
  197. c.removeAllEventListeners = null;
  198. c.dispatchEvent = null;
  199. c.hasEventListener = null;
  200. c._listeners = null;
  201. createjs.EventDispatcher.initialize(c);
  202. c._addEventListener = c.addEventListener;
  203. c.addEventListener = function() {
  204. return!c._inited && c.init(), c._addEventListener.apply(c, arguments)
  205. };
  206. c._paused = !1;
  207. c._inited = !1;
  208. c._startTime =
  209. 0;
  210. c._pausedTime = 0;
  211. c._ticks = 0;
  212. c._pausedTicks = 0;
  213. c._interval = 50;
  214. c._lastTime = 0;
  215. c._times = null;
  216. c._tickTimes = null;
  217. c._timerId = null;
  218. c._raf = !0;
  219. c.init = function() {
  220. c._inited || (c._inited = !0, c._times = [], c._tickTimes = [], c._startTime = c._getTime(), c._times.push(c._lastTime = 0), c.setInterval(c._interval))
  221. };
  222. c.reset = function() {
  223. if (c._raf) {
  224. var a = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame;
  225. a && a(c._timerId)
  226. } else
  227. clearTimeout(c._timerId);
  228. c.removeAllEventListeners("tick")
  229. };
  230. c.setInterval = function(a) {
  231. c._interval = a;
  232. c._inited && c._setupTick()
  233. };
  234. c.getInterval = function() {
  235. return c._interval
  236. };
  237. c.setFPS = function(a) {
  238. c.setInterval(1E3 / a)
  239. };
  240. c.getFPS = function() {
  241. return 1E3 / c._interval
  242. };
  243. c.getMeasuredTickTime = function(a) {
  244. var k = 0, d = c._tickTimes;
  245. if (1 > d.length)
  246. return-1;
  247. a = Math.min(d.length, a || 0 | c.getFPS());
  248. for (var b = 0; a > b; b++)
  249. k += d[b];
  250. return k / a
  251. };
  252. c.getMeasuredFPS = function(a) {
  253. var k = c._times;
  254. return 2 > k.length ? -1 : (a = Math.min(k.length - 1, a || 0 | c.getFPS()), 1E3 / ((k[0] -
  255. k[a]) / a))
  256. };
  257. c.setPaused = function(a) {
  258. c._paused = a
  259. };
  260. c.getPaused = function() {
  261. return c._paused
  262. };
  263. c.getTime = function(a) {
  264. return c._getTime() - c._startTime - (a ? c._pausedTime : 0)
  265. };
  266. c.getEventTime = function(a) {
  267. return(c._lastTime || c._startTime) - (a ? c._pausedTime : 0)
  268. };
  269. c.getTicks = function(a) {
  270. return c._ticks - (a ? c._pausedTicks : 0)
  271. };
  272. c._handleSynch = function() {
  273. var a = c._getTime() - c._startTime;
  274. c._timerId = null;
  275. c._setupTick();
  276. a - c._lastTime >= 0.97 * (c._interval - 1) && c._tick()
  277. };
  278. c._handleRAF = function() {
  279. c._timerId = null;
  280. c._setupTick();
  281. c._tick()
  282. };
  283. c._handleTimeout = function() {
  284. c._timerId = null;
  285. c._setupTick();
  286. c._tick()
  287. };
  288. c._setupTick = function() {
  289. if (null == c._timerId) {
  290. var a = c.timingMode || c.useRAF && c.RAF_SYNCHED;
  291. if (a == c.RAF_SYNCHED || a == c.RAF) {
  292. var k = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;
  293. if (k)
  294. return c._timerId = k(a == c.RAF ? c._handleRAF : c._handleSynch), c._raf = !0, void 0
  295. }
  296. c._raf = !1;
  297. c._timerId = setTimeout(c._handleTimeout, c._interval)
  298. }
  299. };
  300. c._tick = function() {
  301. var a = c._getTime() - c._startTime, k = a - c._lastTime, d = c._paused;
  302. if (c._ticks++, d && (c._pausedTicks++, c._pausedTime += k), c._lastTime = a, c.hasEventListener("tick")) {
  303. var b = new createjs.Event("tick"), e = c.maxDelta;
  304. b.delta = e && k > e ? e : k;
  305. b.paused = d;
  306. b.time = a;
  307. b.runTime = a - c._pausedTime;
  308. c.dispatchEvent(b)
  309. }
  310. for (c._tickTimes.unshift(c._getTime() - a); 100 < c._tickTimes.length; )
  311. c._tickTimes.pop();
  312. for (c._times.unshift(a); 100 < c._times.length; )
  313. c._times.pop()
  314. };
  315. var b = window.performance && (performance.now || performance.mozNow ||
  316. performance.msNow || performance.oNow || performance.webkitNow);
  317. c._getTime = function() {
  318. return b && b.call(performance) || (new Date).getTime()
  319. };
  320. createjs.Ticker = c
  321. })();
  322. this.createjs = this.createjs || {};
  323. (function() {
  324. var c = function(a, d, b, c, f, h, l, m, n, p) {
  325. this.initialize(a, d, b, c, f, h, l, m, n, p)
  326. }, b = c.prototype = new createjs.Event;
  327. b.stageX = 0;
  328. b.stageY = 0;
  329. b.rawX = 0;
  330. b.rawY = 0;
  331. b.nativeEvent = null;
  332. b.pointerID = 0;
  333. b.primary = !1;
  334. b.addEventListener = null;
  335. b.removeEventListener = null;
  336. b.removeAllEventListeners = null;
  337. b.dispatchEvent = null;
  338. b.hasEventListener = null;
  339. b._listeners = null;
  340. createjs.EventDispatcher.initialize(b);
  341. b._get_localX = function() {
  342. return this.currentTarget.globalToLocal(this.rawX, this.rawY).x
  343. };
  344. b._get_localY = function() {
  345. return this.currentTarget.globalToLocal(this.rawX,
  346. this.rawY).y
  347. };
  348. try {
  349. Object.defineProperties(b, {localX: {get: b._get_localX}, localY: {get: b._get_localY}})
  350. } catch (a) {
  351. }
  352. b.Event_initialize = b.initialize;
  353. b.initialize = function(a, d, b, c, f, h, l, m, n, p) {
  354. this.Event_initialize(a, d, b);
  355. this.stageX = c;
  356. this.stageY = f;
  357. this.nativeEvent = h;
  358. this.pointerID = l;
  359. this.primary = m;
  360. this.rawX = null == n ? c : n;
  361. this.rawY = null == p ? f : p
  362. };
  363. b.clone = function() {
  364. return new c(this.type, this.bubbles, this.cancelable, this.stageX, this.stageY, this.target, this.nativeEvent, this.pointerID, this.primary, this.rawX,
  365. this.rawY)
  366. };
  367. b.toString = function() {
  368. return"[MouseEvent (type=" + this.type + " stageX=" + this.stageX + " stageY=" + this.stageY + ")]"
  369. };
  370. createjs.MouseEvent = c
  371. })();
  372. this.createjs = this.createjs || {};
  373. (function() {
  374. var c = function(a, b, d, g, c, f) {
  375. this.initialize(a, b, d, g, c, f)
  376. }, b = c.prototype;
  377. c.identity = null;
  378. c.DEG_TO_RAD = Math.PI / 180;
  379. b.a = 1;
  380. b.b = 0;
  381. b.c = 0;
  382. b.d = 1;
  383. b.tx = 0;
  384. b.ty = 0;
  385. b.alpha = 1;
  386. b.shadow = null;
  387. b.compositeOperation = null;
  388. b.initialize = function(a, b, d, g, c, f) {
  389. return this.a = null == a ? 1 : a, this.b = b || 0, this.c = d || 0, this.d = null == g ? 1 : g, this.tx = c || 0, this.ty = f || 0, this
  390. };
  391. b.prepend = function(a, b, d, g, c, f) {
  392. var h = this.tx;
  393. if (1 != a || 0 != b || 0 != d || 1 != g) {
  394. var l = this.a, m = this.c;
  395. this.a = l * a + this.b * d;
  396. this.b = l * b + this.b * g;
  397. this.c = m * a + this.d *
  398. d;
  399. this.d = m * b + this.d * g
  400. }
  401. return this.tx = h * a + this.ty * d + c, this.ty = h * b + this.ty * g + f, this
  402. };
  403. b.append = function(a, b, d, g, c, f) {
  404. var h = this.a, l = this.b, m = this.c, n = this.d;
  405. return this.a = a * h + b * m, this.b = a * l + b * n, this.c = d * h + g * m, this.d = d * l + g * n, this.tx = c * h + f * m + this.tx, this.ty = c * l + f * n + this.ty, this
  406. };
  407. b.prependMatrix = function(a) {
  408. return this.prepend(a.a, a.b, a.c, a.d, a.tx, a.ty), this.prependProperties(a.alpha, a.shadow, a.compositeOperation), this
  409. };
  410. b.appendMatrix = function(a) {
  411. return this.append(a.a, a.b, a.c, a.d, a.tx, a.ty), this.appendProperties(a.alpha,
  412. a.shadow, a.compositeOperation), this
  413. };
  414. b.prependTransform = function(a, b, d, g, e, f, h, l, m) {
  415. if (e % 360) {
  416. var n = e * c.DEG_TO_RAD;
  417. e = Math.cos(n);
  418. n = Math.sin(n)
  419. } else
  420. e = 1, n = 0;
  421. return(l || m) && (this.tx -= l, this.ty -= m), f || h ? (f *= c.DEG_TO_RAD, h *= c.DEG_TO_RAD, this.prepend(e * d, n * d, -n * g, e * g, 0, 0), this.prepend(Math.cos(h), Math.sin(h), -Math.sin(f), Math.cos(f), a, b)) : this.prepend(e * d, n * d, -n * g, e * g, a, b), this
  422. };
  423. b.appendTransform = function(a, b, d, g, e, f, h, l, m) {
  424. if (e % 360) {
  425. var n = e * c.DEG_TO_RAD;
  426. e = Math.cos(n);
  427. n = Math.sin(n)
  428. } else
  429. e = 1, n = 0;
  430. return f ||
  431. h ? (f *= c.DEG_TO_RAD, h *= c.DEG_TO_RAD, this.append(Math.cos(h), Math.sin(h), -Math.sin(f), Math.cos(f), a, b), this.append(e * d, n * d, -n * g, e * g, 0, 0)) : this.append(e * d, n * d, -n * g, e * g, a, b), (l || m) && (this.tx -= l * this.a + m * this.c, this.ty -= l * this.b + m * this.d), this
  432. };
  433. b.rotate = function(a) {
  434. var b = Math.cos(a);
  435. a = Math.sin(a);
  436. var d = this.a, g = this.c, c = this.tx;
  437. return this.a = d * b - this.b * a, this.b = d * a + this.b * b, this.c = g * b - this.d * a, this.d = g * a + this.d * b, this.tx = c * b - this.ty * a, this.ty = c * a + this.ty * b, this
  438. };
  439. b.skew = function(a, b) {
  440. return a *= c.DEG_TO_RAD,
  441. b *= c.DEG_TO_RAD, this.append(Math.cos(b), Math.sin(b), -Math.sin(a), Math.cos(a), 0, 0), this
  442. };
  443. b.scale = function(a, b) {
  444. return this.a *= a, this.d *= b, this.c *= a, this.b *= b, this.tx *= a, this.ty *= b, this
  445. };
  446. b.translate = function(a, b) {
  447. return this.tx += a, this.ty += b, this
  448. };
  449. b.identity = function() {
  450. return this.alpha = this.a = this.d = 1, this.b = this.c = this.tx = this.ty = 0, this.shadow = this.compositeOperation = null, this
  451. };
  452. b.invert = function() {
  453. var a = this.a, b = this.b, d = this.c, g = this.d, c = this.tx, f = a * g - b * d;
  454. return this.a = g / f, this.b = -b / f, this.c = -d /
  455. f, this.d = a / f, this.tx = (d * this.ty - g * c) / f, this.ty = -(a * this.ty - b * c) / f, this
  456. };
  457. b.isIdentity = function() {
  458. return 0 == this.tx && 0 == this.ty && 1 == this.a && 0 == this.b && 0 == this.c && 1 == this.d
  459. };
  460. b.transformPoint = function(a, b, d) {
  461. return d = d || {}, d.x = a * this.a + b * this.c + this.tx, d.y = a * this.b + b * this.d + this.ty, d
  462. };
  463. b.decompose = function(a) {
  464. null == a && (a = {});
  465. a.x = this.tx;
  466. a.y = this.ty;
  467. a.scaleX = Math.sqrt(this.a * this.a + this.b * this.b);
  468. a.scaleY = Math.sqrt(this.c * this.c + this.d * this.d);
  469. var b = Math.atan2(-this.c, this.d), d = Math.atan2(this.b, this.a);
  470. return b == d ? (a.rotation = d / c.DEG_TO_RAD, 0 > this.a && 0 <= this.d && (a.rotation += 0 >= a.rotation ? 180 : -180), a.skewX = a.skewY = 0) : (a.skewX = b / c.DEG_TO_RAD, a.skewY = d / c.DEG_TO_RAD), a
  471. };
  472. b.reinitialize = function(a, b, d, g, c, f, h, l, m) {
  473. return this.initialize(a, b, d, g, c, f), this.alpha = null == h ? 1 : h, this.shadow = l, this.compositeOperation = m, this
  474. };
  475. b.copy = function(a) {
  476. return this.reinitialize(a.a, a.b, a.c, a.d, a.tx, a.ty, a.alpha, a.shadow, a.compositeOperation)
  477. };
  478. b.appendProperties = function(a, b, d) {
  479. return this.alpha *= a, this.shadow = b || this.shadow,
  480. this.compositeOperation = d || this.compositeOperation, this
  481. };
  482. b.prependProperties = function(a, b, d) {
  483. return this.alpha *= a, this.shadow = this.shadow || b, this.compositeOperation = this.compositeOperation || d, this
  484. };
  485. b.clone = function() {
  486. return(new c).copy(this)
  487. };
  488. b.toString = function() {
  489. return"[Matrix2D (a=" + this.a + " b=" + this.b + " c=" + this.c + " d=" + this.d + " tx=" + this.tx + " ty=" + this.ty + ")]"
  490. };
  491. c.identity = new c;
  492. createjs.Matrix2D = c
  493. })();
  494. this.createjs = this.createjs || {};
  495. (function() {
  496. var c = function(a, b) {
  497. this.initialize(a, b)
  498. }, b = c.prototype;
  499. b.x = 0;
  500. b.y = 0;
  501. b.initialize = function(a, b) {
  502. return this.x = null == a ? 0 : a, this.y = null == b ? 0 : b, this
  503. };
  504. b.copy = function(a) {
  505. return this.initialize(a.x, a.y)
  506. };
  507. b.clone = function() {
  508. return new c(this.x, this.y)
  509. };
  510. b.toString = function() {
  511. return"[Point (x=" + this.x + " y=" + this.y + ")]"
  512. };
  513. createjs.Point = c
  514. })();
  515. this.createjs = this.createjs || {};
  516. (function() {
  517. var c = function(a, b, d, g) {
  518. this.initialize(a, b, d, g)
  519. }, b = c.prototype;
  520. b.x = 0;
  521. b.y = 0;
  522. b.width = 0;
  523. b.height = 0;
  524. b.initialize = function(a, b, d, g) {
  525. return this.x = a || 0, this.y = b || 0, this.width = d || 0, this.height = g || 0, this
  526. };
  527. b.copy = function(a) {
  528. return this.initialize(a.x, a.y, a.width, a.height)
  529. };
  530. b.clone = function() {
  531. return new c(this.x, this.y, this.width, this.height)
  532. };
  533. b.toString = function() {
  534. return"[Rectangle (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + ")]"
  535. };
  536. createjs.Rectangle = c
  537. })();
  538. this.createjs = this.createjs || {};
  539. (function() {
  540. var c = function(a, b, d, g, c, f, h) {
  541. this.initialize(a, b, d, g, c, f, h)
  542. }, b = c.prototype;
  543. b.target = null;
  544. b.overLabel = null;
  545. b.outLabel = null;
  546. b.downLabel = null;
  547. b.play = !1;
  548. b._isPressed = !1;
  549. b._isOver = !1;
  550. b.initialize = function(a, b, d, g, c, f, h) {
  551. a.addEventListener && (this.target = a, a.cursor = "pointer", this.overLabel = null == d ? "over" : d, this.outLabel = null == b ? "out" : b, this.downLabel = null == g ? "down" : g, this.play = c, this.setEnabled(!0), this.handleEvent({}), f && (h && (f.actionsEnabled = !1, f.gotoAndStop && f.gotoAndStop(h)), a.hitArea = f))
  552. };
  553. b.setEnabled = function(a) {
  554. var b = this.target;
  555. a ? (b.addEventListener("rollover", this), b.addEventListener("rollout", this), b.addEventListener("mousedown", this), b.addEventListener("pressup", this)) : (b.removeEventListener("rollover", this), b.removeEventListener("rollout", this), b.removeEventListener("mousedown", this), b.removeEventListener("pressup", this))
  556. };
  557. b.toString = function() {
  558. return"[ButtonHelper]"
  559. };
  560. b.handleEvent = function(a) {
  561. var b, d = this.target;
  562. a = a.type;
  563. "mousedown" == a ? (this._isPressed = !0, b = this.downLabel) :
  564. "pressup" == a ? (this._isPressed = !1, b = this._isOver ? this.overLabel : this.outLabel) : "rollover" == a ? (this._isOver = !0, b = this._isPressed ? this.downLabel : this.overLabel) : (this._isOver = !1, b = this._isPressed ? this.overLabel : this.outLabel);
  565. this.play ? d.gotoAndPlay && d.gotoAndPlay(b) : d.gotoAndStop && d.gotoAndStop(b)
  566. };
  567. createjs.ButtonHelper = c
  568. })();
  569. this.createjs = this.createjs || {};
  570. (function() {
  571. var c = function(a, b, d, g) {
  572. this.initialize(a, b, d, g)
  573. }, b = c.prototype;
  574. c.identity = null;
  575. b.color = null;
  576. b.offsetX = 0;
  577. b.offsetY = 0;
  578. b.blur = 0;
  579. b.initialize = function(a, b, d, g) {
  580. this.color = a;
  581. this.offsetX = b;
  582. this.offsetY = d;
  583. this.blur = g
  584. };
  585. b.toString = function() {
  586. return"[Shadow]"
  587. };
  588. b.clone = function() {
  589. return new c(this.color, this.offsetX, this.offsetY, this.blur)
  590. };
  591. c.identity = new c("transparent", 0, 0, 0);
  592. createjs.Shadow = c
  593. })();
  594. this.createjs = this.createjs || {};
  595. (function() {
  596. var c = function(a) {
  597. this.initialize(a)
  598. }, b = c.prototype = new createjs.EventDispatcher;
  599. b.complete = !0;
  600. b.framerate = 0;
  601. b._animations = null;
  602. b._frames = null;
  603. b._images = null;
  604. b._data = null;
  605. b._loadCount = 0;
  606. b._frameHeight = 0;
  607. b._frameWidth = 0;
  608. b._numFrames = 0;
  609. b._regX = 0;
  610. b._regY = 0;
  611. b.initialize = function(a) {
  612. var b, d, g;
  613. if (null != a) {
  614. if (this.framerate = a.framerate || 0, a.images && 0 < (d = a.images.length))
  615. for (g = this._images = [], b = 0; d > b; b++) {
  616. var c = a.images[b];
  617. if ("string" == typeof c) {
  618. var f = c, c = document.createElement("img");
  619. c.src = f
  620. }
  621. g.push(c);
  622. c.getContext || c.complete || (this._loadCount++, this.complete = !1, function(a) {
  623. c.onload = function() {
  624. a._handleImageLoad()
  625. }
  626. }(this))
  627. }
  628. if (null != a.frames)
  629. if (a.frames instanceof Array)
  630. for (this._frames = [], g = a.frames, b = 0, d = g.length; d > b; b++)
  631. f = g[b], this._frames.push({image: this._images[f[4] ? f[4] : 0], rect: new createjs.Rectangle(f[0], f[1], f[2], f[3]), regX: f[5] || 0, regY: f[6] || 0});
  632. else
  633. d = a.frames, this._frameWidth = d.width, this._frameHeight = d.height, this._regX = d.regX || 0, this._regY = d.regY || 0, this._numFrames = d.count, 0 == this._loadCount &&
  634. this._calculateFrames();
  635. if (this._animations = [], null != (d = a.animations)) {
  636. this._data = {};
  637. for (var h in d) {
  638. a = {name: h};
  639. f = d[h];
  640. if ("number" == typeof f)
  641. g = a.frames = [f];
  642. else if (f instanceof Array)
  643. if (1 == f.length)
  644. a.frames = [f[0]];
  645. else
  646. for (a.speed = f[3], a.next = f[2], g = a.frames = [], b = f[0]; b <= f[1]; b++)
  647. g.push(b);
  648. else
  649. a.speed = f.speed, a.next = f.next, b = f.frames, g = a.frames = "number" == typeof b ? [b] : b.slice(0);
  650. !0 !== a.next && void 0 !== a.next || (a.next = h);
  651. (!1 === a.next || 2 > g.length && a.next == h) && (a.next = null);
  652. a.speed || (a.speed = 1);
  653. this._animations.push(h);
  654. this._data[h] = a
  655. }
  656. }
  657. }
  658. };
  659. b.getNumFrames = function(a) {
  660. if (null == a)
  661. return this._frames ? this._frames.length : this._numFrames;
  662. a = this._data[a];
  663. return null == a ? 0 : a.frames.length
  664. };
  665. b.getAnimations = function() {
  666. return this._animations.slice(0)
  667. };
  668. b.getAnimation = function(a) {
  669. return this._data[a]
  670. };
  671. b.getFrame = function(a) {
  672. var b;
  673. return this._frames && (b = this._frames[a]) ? b : null
  674. };
  675. b.getFrameBounds = function(a, b) {
  676. var d = this.getFrame(a);
  677. return d ? (b || new createjs.Rectangle).initialize(-d.regX, -d.regY, d.rect.width, d.rect.height) : null
  678. };
  679. b.toString = function() {
  680. return"[SpriteSheet]"
  681. };
  682. b.clone = function() {
  683. var a = new c;
  684. return a.complete = this.complete, a._animations = this._animations, a._frames = this._frames, a._images = this._images, a._data = this._data, a._frameHeight = this._frameHeight, a._frameWidth = this._frameWidth, a._numFrames = this._numFrames, a._loadCount = this._loadCount, a
  685. };
  686. b._handleImageLoad = function() {
  687. 0 == --this._loadCount && (this._calculateFrames(), this.complete = !0, this.dispatchEvent("complete"))
  688. };
  689. b._calculateFrames = function() {
  690. if (!this._frames &&
  691. 0 != this._frameWidth) {
  692. this._frames = [];
  693. for (var a = 0, b = this._frameWidth, d = this._frameHeight, c = 0, e = this._images; c < e.length; c++) {
  694. for (var f = e[c], h = 0 | f.width / b, l = 0 | f.height / d, l = 0 < this._numFrames ? Math.min(this._numFrames - a, h * l) : h * l, m = 0; l > m; m++)
  695. this._frames.push({image: f, rect: new createjs.Rectangle(m % h * b, (0 | m / h) * d, b, d), regX: this._regX, regY: this._regY});
  696. a += l
  697. }
  698. this._numFrames = a
  699. }
  700. };
  701. createjs.SpriteSheet = c
  702. })();
  703. this.createjs = this.createjs || {};
  704. (function() {
  705. function c(a, b, d) {
  706. this.f = a;
  707. this.params = b;
  708. this.path = null == d ? !0 : d
  709. }
  710. c.prototype.exec = function(a) {
  711. this.f.apply(a, this.params)
  712. };
  713. var b = function() {
  714. this.initialize()
  715. }, a = b.prototype;
  716. b.getRGB = function(a, b, d, k) {
  717. return null != a && null == d && (k = b, d = 255 & a, b = 255 & a >> 8, a = 255 & a >> 16), null == k ? "rgb(" + a + "," + b + "," + d + ")" : "rgba(" + a + "," + b + "," + d + "," + k + ")"
  718. };
  719. b.getHSL = function(a, b, d, k) {
  720. return null == k ? "hsl(" + a % 360 + "," + b + "%," + d + "%)" : "hsla(" + a % 360 + "," + b + "%," + d + "%," + k + ")"
  721. };
  722. b.Command = c;
  723. b.BASE_64 = {A: 0, B: 1, C: 2, D: 3, E: 4, F: 5, G: 6,
  724. H: 7, I: 8, J: 9, K: 10, L: 11, M: 12, N: 13, O: 14, P: 15, Q: 16, R: 17, S: 18, T: 19, U: 20, V: 21, W: 22, X: 23, Y: 24, Z: 25, a: 26, b: 27, c: 28, d: 29, e: 30, f: 31, g: 32, h: 33, i: 34, j: 35, k: 36, l: 37, m: 38, n: 39, o: 40, p: 41, q: 42, r: 43, s: 44, t: 45, u: 46, v: 47, w: 48, x: 49, y: 50, z: 51, 0: 52, 1: 53, 2: 54, 3: 55, 4: 56, 5: 57, 6: 58, 7: 59, 8: 60, 9: 61, "+": 62, "/": 63};
  725. b.STROKE_CAPS_MAP = ["butt", "round", "square"];
  726. b.STROKE_JOINTS_MAP = ["miter", "round", "bevel"];
  727. var k = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  728. if (k.getContext) {
  729. var d = b._ctx = k.getContext("2d");
  730. b.beginCmd = new c(d.beginPath, [], !1);
  731. b.fillCmd = new c(d.fill, [], !1);
  732. b.strokeCmd = new c(d.stroke, [], !1);
  733. k.width = k.height = 1
  734. }
  735. a._strokeInstructions = null;
  736. a._strokeStyleInstructions = null;
  737. a._strokeIgnoreScale = !1;
  738. a._fillInstructions = null;
  739. a._fillMatrix = null;
  740. a._instructions = null;
  741. a._oldInstructions = null;
  742. a._activeInstructions = null;
  743. a._active = !1;
  744. a._dirty = !1;
  745. a.initialize = function() {
  746. this.clear();
  747. this._ctx = b._ctx
  748. };
  749. a.isEmpty = function() {
  750. return!(this._instructions.length || this._oldInstructions.length || this._activeInstructions.length)
  751. };
  752. a.draw = function(a) {
  753. this._dirty && this._updateInstructions();
  754. for (var b = this._instructions, d = 0, k = b.length; k > d; d++)
  755. b[d].exec(a)
  756. };
  757. a.drawAsPath = function(a) {
  758. this._dirty && this._updateInstructions();
  759. for (var b, d = this._instructions, k = 0, c = d.length; c > k; k++)
  760. ((b = d[k]).path || 0 == k) && b.exec(a)
  761. };
  762. a.moveTo = function(a, b) {
  763. return this._activeInstructions.push(new c(this._ctx.moveTo, [a, b])), this
  764. };
  765. a.lineTo = function(a, b) {
  766. return this._dirty = this._active = !0, this._activeInstructions.push(new c(this._ctx.lineTo, [a, b])), this
  767. };
  768. a.arcTo =
  769. function(a, b, d, k, l) {
  770. return this._dirty = this._active = !0, this._activeInstructions.push(new c(this._ctx.arcTo, [a, b, d, k, l])), this
  771. };
  772. a.arc = function(a, b, d, k, l, m) {
  773. return this._dirty = this._active = !0, null == m && (m = !1), this._activeInstructions.push(new c(this._ctx.arc, [a, b, d, k, l, m])), this
  774. };
  775. a.quadraticCurveTo = function(a, b, d, k) {
  776. return this._dirty = this._active = !0, this._activeInstructions.push(new c(this._ctx.quadraticCurveTo, [a, b, d, k])), this
  777. };
  778. a.bezierCurveTo = function(a, b, d, k, l, m) {
  779. return this._dirty = this._active =
  780. !0, this._activeInstructions.push(new c(this._ctx.bezierCurveTo, [a, b, d, k, l, m])), this
  781. };
  782. a.rect = function(a, b, d, k) {
  783. return this._dirty = this._active = !0, this._activeInstructions.push(new c(this._ctx.rect, [a, b, d, k])), this
  784. };
  785. a.closePath = function() {
  786. return this._active && (this._dirty = !0, this._activeInstructions.push(new c(this._ctx.closePath, []))), this
  787. };
  788. a.clear = function() {
  789. return this._instructions = [], this._oldInstructions = [], this._activeInstructions = [], this._strokeStyleInstructions = this._strokeInstructions = this._fillInstructions =
  790. this._fillMatrix = null, this._active = this._dirty = this._strokeIgnoreScale = !1, this
  791. };
  792. a.beginFill = function(a) {
  793. return this._active && this._newPath(), this._fillInstructions = a ? [new c(this._setProp, ["fillStyle", a], !1)] : null, this._fillMatrix = null, this
  794. };
  795. a.beginLinearGradientFill = function(a, b, d, k, l, m) {
  796. this._active && this._newPath();
  797. d = this._ctx.createLinearGradient(d, k, l, m);
  798. k = 0;
  799. for (l = a.length; l > k; k++)
  800. d.addColorStop(b[k], a[k]);
  801. return this._fillInstructions = [new c(this._setProp, ["fillStyle", d], !1)], this._fillMatrix =
  802. null, this
  803. };
  804. a.beginRadialGradientFill = function(a, b, d, k, l, m, n, p) {
  805. this._active && this._newPath();
  806. d = this._ctx.createRadialGradient(d, k, l, m, n, p);
  807. k = 0;
  808. for (l = a.length; l > k; k++)
  809. d.addColorStop(b[k], a[k]);
  810. return this._fillInstructions = [new c(this._setProp, ["fillStyle", d], !1)], this._fillMatrix = null, this
  811. };
  812. a.beginBitmapFill = function(a, b, d) {
  813. this._active && this._newPath();
  814. a = this._ctx.createPattern(a, b || "");
  815. return this._fillInstructions = [new c(this._setProp, ["fillStyle", a], !1)], this._fillMatrix = d ? [d.a, d.b, d.c, d.d, d.tx,
  816. d.ty] : null, this
  817. };
  818. a.endFill = function() {
  819. return this.beginFill()
  820. };
  821. a.setStrokeStyle = function(a, d, k, h, l) {
  822. return this._active && this._newPath(), this._strokeStyleInstructions = [new c(this._setProp, ["lineWidth", null == a ? "1" : a], !1), new c(this._setProp, ["lineCap", null == d ? "butt" : isNaN(d) ? d : b.STROKE_CAPS_MAP[d]], !1), new c(this._setProp, ["lineJoin", null == k ? "miter" : isNaN(k) ? k : b.STROKE_JOINTS_MAP[k]], !1), new c(this._setProp, ["miterLimit", null == h ? "10" : h], !1)], this._strokeIgnoreScale = l, this
  823. };
  824. a.beginStroke = function(a) {
  825. return this._active &&
  826. this._newPath(), this._strokeInstructions = a ? [new c(this._setProp, ["strokeStyle", a], !1)] : null, this
  827. };
  828. a.beginLinearGradientStroke = function(a, b, d, k, l, m) {
  829. this._active && this._newPath();
  830. d = this._ctx.createLinearGradient(d, k, l, m);
  831. k = 0;
  832. for (l = a.length; l > k; k++)
  833. d.addColorStop(b[k], a[k]);
  834. return this._strokeInstructions = [new c(this._setProp, ["strokeStyle", d], !1)], this
  835. };
  836. a.beginRadialGradientStroke = function(a, b, d, k, l, m, n, p) {
  837. this._active && this._newPath();
  838. d = this._ctx.createRadialGradient(d, k, l, m, n, p);
  839. k = 0;
  840. for (l = a.length; l >
  841. k; k++)
  842. d.addColorStop(b[k], a[k]);
  843. return this._strokeInstructions = [new c(this._setProp, ["strokeStyle", d], !1)], this
  844. };
  845. a.beginBitmapStroke = function(a, b) {
  846. this._active && this._newPath();
  847. var d = this._ctx.createPattern(a, b || "");
  848. return this._strokeInstructions = [new c(this._setProp, ["strokeStyle", d], !1)], this
  849. };
  850. a.endStroke = function() {
  851. return this.beginStroke(), this
  852. };
  853. a.curveTo = a.quadraticCurveTo;
  854. a.drawRect = a.rect;
  855. a.drawRoundRect = function(a, b, d, k, c) {
  856. return this.drawRoundRectComplex(a, b, d, k, c, c, c, c), this
  857. };
  858. a.drawRoundRectComplex =
  859. function(a, b, d, k, l, m, n, p) {
  860. var r = (k > d ? d : k) / 2, q = 0, s = 0, u = 0, t = 0;
  861. 0 > l && (l *= q = -1);
  862. l > r && (l = r);
  863. 0 > m && (m *= s = -1);
  864. m > r && (m = r);
  865. 0 > n && (n *= u = -1);
  866. n > r && (n = r);
  867. 0 > p && (p *= t = -1);
  868. p > r && (p = r);
  869. this._dirty = this._active = !0;
  870. var r = this._ctx.arcTo, w = this._ctx.lineTo;
  871. return this._activeInstructions.push(new c(this._ctx.moveTo, [a + d - m, b]), new c(r, [a + d + m * s, b - m * s, a + d, b + m, m]), new c(w, [a + d, b + k - n]), new c(r, [a + d + n * u, b + k + n * u, a + d - n, b + k, n]), new c(w, [a + p, b + k]), new c(r, [a - p * t, b + k + p * t, a, b + k - p, p]), new c(w, [a, b + l]), new c(r, [a - l * q, b - l * q, a + l, b, l]),
  872. new c(this._ctx.closePath)), this
  873. };
  874. a.drawCircle = function(a, b, d) {
  875. return this.arc(a, b, d, 0, 2 * Math.PI), this
  876. };
  877. a.drawEllipse = function(a, b, d, k) {
  878. this._dirty = this._active = !0;
  879. var l = 0.5522848 * (d / 2), m = 0.5522848 * (k / 2), n = a + d, p = b + k;
  880. d = a + d / 2;
  881. k = b + k / 2;
  882. return this._activeInstructions.push(new c(this._ctx.moveTo, [a, k]), new c(this._ctx.bezierCurveTo, [a, k - m, d - l, b, d, b]), new c(this._ctx.bezierCurveTo, [d + l, b, n, k - m, n, k]), new c(this._ctx.bezierCurveTo, [n, k + m, d + l, p, d, p]), new c(this._ctx.bezierCurveTo, [d - l, p, a, k + m, a, k])), this
  883. };
  884. a.inject = function(a, b) {
  885. return this._dirty = this._active = !0, this._activeInstructions.push(new c(a, [b])), this
  886. };
  887. a.drawPolyStar = function(a, b, d, k, l, m) {
  888. this._dirty = this._active = !0;
  889. null == l && (l = 0);
  890. l = 1 - l;
  891. null == m ? m = 0 : m /= 180 / Math.PI;
  892. var n = Math.PI / k;
  893. this._activeInstructions.push(new c(this._ctx.moveTo, [a + Math.cos(m) * d, b + Math.sin(m) * d]));
  894. for (var p = 0; k > p; p++)
  895. m += n, 1 != l && this._activeInstructions.push(new c(this._ctx.lineTo, [a + Math.cos(m) * d * l, b + Math.sin(m) * d * l])), m += n, this._activeInstructions.push(new c(this._ctx.lineTo,
  896. [a + Math.cos(m) * d, b + Math.sin(m) * d]));
  897. return this
  898. };
  899. a.decodePath = function(a) {
  900. for (var d = [this.moveTo, this.lineTo, this.quadraticCurveTo, this.bezierCurveTo, this.closePath], k = [2, 2, 4, 6, 0], c = 0, l = a.length, m = [], n = 0, p = 0, r = b.BASE_64; l > c; ) {
  901. var q = a.charAt(c), s = r[q], u = s >> 3, t = d[u];
  902. if (!t || 3 & s)
  903. throw"bad path data (@" + c + "): " + q;
  904. q = k[u];
  905. u || (n = p = 0);
  906. m.length = 0;
  907. c++;
  908. s = (1 & s >> 2) + 2;
  909. for (u = 0; q > u; u++) {
  910. var w = r[a.charAt(c)], z = w >> 5 ? -1 : 1, w = (31 & w) << 6 | r[a.charAt(c + 1)];
  911. 3 == s && (w = w << 6 | r[a.charAt(c + 2)]);
  912. w = z * w / 10;
  913. u % 2 ? n = w += n : p = w += p;
  914. m[u] = w;
  915. c += s
  916. }
  917. t.apply(this, m)
  918. }
  919. return this
  920. };
  921. a.clone = function() {
  922. var a = new b;
  923. return a._instructions = this._instructions.slice(), a._activeInstructions = this._activeInstructions.slice(), a._oldInstructions = this._oldInstructions.slice(), this._fillInstructions && (a._fillInstructions = this._fillInstructions.slice()), this._strokeInstructions && (a._strokeInstructions = this._strokeInstructions.slice()), this._strokeStyleInstructions && (a._strokeStyleInstructions = this._strokeStyleInstructions.slice()), a._active = this._active, a._dirty =
  924. this._dirty, a._fillMatrix = this._fillMatrix, a._strokeIgnoreScale = this._strokeIgnoreScale, a
  925. };
  926. a.toString = function() {
  927. return"[Graphics]"
  928. };
  929. a.mt = a.moveTo;
  930. a.lt = a.lineTo;
  931. a.at = a.arcTo;
  932. a.bt = a.bezierCurveTo;
  933. a.qt = a.quadraticCurveTo;
  934. a.a = a.arc;
  935. a.r = a.rect;
  936. a.cp = a.closePath;
  937. a.c = a.clear;
  938. a.f = a.beginFill;
  939. a.lf = a.beginLinearGradientFill;
  940. a.rf = a.beginRadialGradientFill;
  941. a.bf = a.beginBitmapFill;
  942. a.ef = a.endFill;
  943. a.ss = a.setStrokeStyle;
  944. a.s = a.beginStroke;
  945. a.ls = a.beginLinearGradientStroke;
  946. a.rs = a.beginRadialGradientStroke;
  947. a.bs = a.beginBitmapStroke;
  948. a.es = a.endStroke;
  949. a.dr = a.drawRect;
  950. a.rr = a.drawRoundRect;
  951. a.rc = a.drawRoundRectComplex;
  952. a.dc = a.drawCircle;
  953. a.de = a.drawEllipse;
  954. a.dp = a.drawPolyStar;
  955. a.p = a.decodePath;
  956. a._updateInstructions = function() {
  957. this._instructions = this._oldInstructions.slice();
  958. this._instructions.push(b.beginCmd);
  959. this._appendInstructions(this._fillInstructions);
  960. this._appendInstructions(this._strokeInstructions);
  961. this._appendInstructions(this._strokeInstructions && this._strokeStyleInstructions);
  962. this._appendInstructions(this._activeInstructions);
  963. this._fillInstructions && this._appendDraw(b.fillCmd, this._fillMatrix);
  964. this._strokeInstructions && this._appendDraw(b.strokeCmd, this._strokeIgnoreScale && [1, 0, 0, 1, 0, 0])
  965. };
  966. a._appendInstructions = function(a) {
  967. a && this._instructions.push.apply(this._instructions, a)
  968. };
  969. a._appendDraw = function(a, b) {
  970. b ? this._instructions.push(new c(this._ctx.save, [], !1), new c(this._ctx.transform, b, !1), a, new c(this._ctx.restore, [], !1)) : this._instructions.push(a)
  971. };
  972. a._newPath = function() {
  973. this._dirty && this._updateInstructions();
  974. this._oldInstructions =
  975. this._instructions;
  976. this._activeInstructions = [];
  977. this._active = this._dirty = !1
  978. };
  979. a._setProp = function(a, b) {
  980. this[a] = b
  981. };
  982. createjs.Graphics = b
  983. })();
  984. this.createjs = this.createjs || {};
  985. (function() {
  986. var c = function() {
  987. this.initialize()
  988. }, b = c.prototype = new createjs.EventDispatcher;
  989. c._MOUSE_EVENTS = "click dblclick mousedown mouseout mouseover pressmove pressup rollout rollover".split(" ");
  990. c.suppressCrossDomainErrors = !1;
  991. var a = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  992. a.getContext && (c._hitTestCanvas = a, c._hitTestContext = a.getContext("2d"), a.width = a.height = 1);
  993. c._nextCacheID = 1;
  994. b.alpha = 1;
  995. b.cacheCanvas = null;
  996. b.id = -1;
  997. b.mouseEnabled = !0;
  998. b.tickEnabled = !0;
  999. b.name =
  1000. null;
  1001. b.parent = null;
  1002. b.regX = 0;
  1003. b.regY = 0;
  1004. b.rotation = 0;
  1005. b.scaleX = 1;
  1006. b.scaleY = 1;
  1007. b.skewX = 0;
  1008. b.skewY = 0;
  1009. b.shadow = null;
  1010. b.visible = !0;
  1011. b.x = 0;
  1012. b.y = 0;
  1013. b.compositeOperation = null;
  1014. b.snapToPixel = !1;
  1015. b.filters = null;
  1016. b.cacheID = 0;
  1017. b.mask = null;
  1018. b.hitArea = null;
  1019. b.cursor = null;
  1020. b._cacheOffsetX = 0;
  1021. b._cacheOffsetY = 0;
  1022. b._cacheScale = 1;
  1023. b._cacheDataURLID = 0;
  1024. b._cacheDataURL = null;
  1025. b._matrix = null;
  1026. b._rectangle = null;
  1027. b._bounds = null;
  1028. b.initialize = function() {
  1029. this.id = createjs.UID.get();
  1030. this._matrix = new createjs.Matrix2D;
  1031. this._rectangle = new createjs.Rectangle
  1032. };
  1033. b.isVisible = function() {
  1034. return!!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY)
  1035. };
  1036. b.draw = function(a, b) {
  1037. var c = this.cacheCanvas;
  1038. if (b || !c)
  1039. return!1;
  1040. var e, f = this._cacheScale, h = this._cacheOffsetX, l = this._cacheOffsetY;
  1041. return(e = this._applyFilterBounds(h, l, 0, 0)) && (h = e.x, l = e.y), a.drawImage(c, h, l, c.width / f, c.height / f), !0
  1042. };
  1043. b.updateContext = function(a) {
  1044. var b, c = this.mask;
  1045. c && c.graphics && !c.graphics.isEmpty() && (b = c.getMatrix(c._matrix), a.transform(b.a, b.b, b.c, b.d, b.tx, b.ty), c.graphics.drawAsPath(a), a.clip(),
  1046. b.invert(), a.transform(b.a, b.b, b.c, b.d, b.tx, b.ty));
  1047. b = this._matrix.identity().appendTransform(this.x, this.y, this.scaleX, this.scaleY, this.rotation, this.skewX, this.skewY, this.regX, this.regY);
  1048. createjs.Stage._snapToPixelEnabled && this.snapToPixel ? a.transform(b.a, b.b, b.c, b.d, 0 | b.tx + 0.5, 0 | b.ty + 0.5) : a.transform(b.a, b.b, b.c, b.d, b.tx, b.ty);
  1049. a.globalAlpha *= this.alpha;
  1050. this.compositeOperation && (a.globalCompositeOperation = this.compositeOperation);
  1051. this.shadow && this._applyShadow(a, this.shadow)
  1052. };
  1053. b.cache = function(a,
  1054. b, c, e, f) {
  1055. f = f || 1;
  1056. this.cacheCanvas || (this.cacheCanvas = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"));
  1057. this._cacheWidth = c;
  1058. this._cacheHeight = e;
  1059. this._cacheOffsetX = a;
  1060. this._cacheOffsetY = b;
  1061. this._cacheScale = f;
  1062. this.updateCache()
  1063. };
  1064. b.updateCache = function(a) {
  1065. var b, g = this.cacheCanvas, e = this._cacheScale, f = this._cacheOffsetX * e, h = this._cacheOffsetY * e, l = this._cacheWidth, m = this._cacheHeight;
  1066. if (!g)
  1067. throw"cache() must be called before updateCache()";
  1068. var n = g.getContext("2d");
  1069. (b = this._applyFilterBounds(f,
  1070. h, l, m)) && (f = b.x, h = b.y, l = b.width, m = b.height);
  1071. l = Math.ceil(l * e);
  1072. m = Math.ceil(m * e);
  1073. l != g.width || m != g.height ? (g.width = l, g.height = m) : a || n.clearRect(0, 0, l + 1, m + 1);
  1074. n.save();
  1075. n.globalCompositeOperation = a;
  1076. n.setTransform(e, 0, 0, e, -f, -h);
  1077. this.draw(n, !0);
  1078. this._applyFilters();
  1079. n.restore();
  1080. this.cacheID = c._nextCacheID++
  1081. };
  1082. b.uncache = function() {
  1083. this._cacheDataURL = this.cacheCanvas = null;
  1084. this.cacheID = this._cacheOffsetX = this._cacheOffsetY = 0;
  1085. this._cacheScale = 1
  1086. };
  1087. b.getCacheDataURL = function() {
  1088. return this.cacheCanvas ? (this.cacheID !=
  1089. this._cacheDataURLID && (this._cacheDataURL = this.cacheCanvas.toDataURL()), this._cacheDataURL) : null
  1090. };
  1091. b.getStage = function() {
  1092. for (var a = this; a.parent; )
  1093. a = a.parent;
  1094. return a instanceof createjs.Stage ? a : null
  1095. };
  1096. b.localToGlobal = function(a, b) {
  1097. var c = this.getConcatenatedMatrix(this._matrix);
  1098. return null == c ? null : (c.append(1, 0, 0, 1, a, b), new createjs.Point(c.tx, c.ty))
  1099. };
  1100. b.globalToLocal = function(a, b) {
  1101. var c = this.getConcatenatedMatrix(this._matrix);
  1102. return null == c ? null : (c.invert(), c.append(1, 0, 0, 1, a, b), new createjs.Point(c.tx,
  1103. c.ty))
  1104. };
  1105. b.localToLocal = function(a, b, c) {
  1106. a = this.localToGlobal(a, b);
  1107. return c.globalToLocal(a.x, a.y)
  1108. };
  1109. b.setTransform = function(a, b, c, e, f, h, l, m, n) {
  1110. return this.x = a || 0, this.y = b || 0, this.scaleX = null == c ? 1 : c, this.scaleY = null == e ? 1 : e, this.rotation = f || 0, this.skewX = h || 0, this.skewY = l || 0, this.regX = m || 0, this.regY = n || 0, this
  1111. };
  1112. b.getMatrix = function(a) {
  1113. return(a ? a.identity() : new createjs.Matrix2D).appendTransform(this.x, this.y, this.scaleX, this.scaleY, this.rotation, this.skewX, this.skewY, this.regX, this.regY).appendProperties(this.alpha,
  1114. this.shadow, this.compositeOperation)
  1115. };
  1116. b.getConcatenatedMatrix = function(a) {
  1117. a ? a.identity() : a = new createjs.Matrix2D;
  1118. for (var b = this; null != b; )
  1119. a.prependTransform(b.x, b.y, b.scaleX, b.scaleY, b.rotation, b.skewX, b.skewY, b.regX, b.regY).prependProperties(b.alpha, b.shadow, b.compositeOperation), b = b.parent;
  1120. return a
  1121. };
  1122. b.hitTest = function(a, b) {
  1123. var g = c._hitTestContext;
  1124. g.setTransform(1, 0, 0, 1, -a, -b);
  1125. this.draw(g);
  1126. var e = this._testHit(g);
  1127. return g.setTransform(1, 0, 0, 1, 0, 0), g.clearRect(0, 0, 2, 2), e
  1128. };
  1129. b.set = function(a) {
  1130. for (var b in a)
  1131. this[b] =
  1132. a[b];
  1133. return this
  1134. };
  1135. b.getBounds = function() {
  1136. if (this._bounds)
  1137. return this._rectangle.copy(this._bounds);
  1138. var a = this.cacheCanvas;
  1139. if (a) {
  1140. var b = this._cacheScale;
  1141. return this._rectangle.initialize(this._cacheOffsetX, this._cacheOffsetY, a.width / b, a.height / b)
  1142. }
  1143. return null
  1144. };
  1145. b.getTransformedBounds = function() {
  1146. return this._getBounds()
  1147. };
  1148. b.setBounds = function(a, b, c, e) {
  1149. null == a && (this._bounds = a);
  1150. this._bounds = (this._bounds || new createjs.Rectangle).initialize(a, b, c, e)
  1151. };
  1152. b.clone = function() {
  1153. var a = new c;
  1154. return this.cloneProps(a),
  1155. a
  1156. };
  1157. b.toString = function() {
  1158. return"[DisplayObject (name=" + this.name + ")]"
  1159. };
  1160. b.cloneProps = function(a) {
  1161. a.alpha = this.alpha;
  1162. a.name = this.name;
  1163. a.regX = this.regX;
  1164. a.regY = this.regY;
  1165. a.rotation = this.rotation;
  1166. a.scaleX = this.scaleX;
  1167. a.scaleY = this.scaleY;
  1168. a.shadow = this.shadow;
  1169. a.skewX = this.skewX;
  1170. a.skewY = this.skewY;
  1171. a.visible = this.visible;
  1172. a.x = this.x;
  1173. a.y = this.y;
  1174. a._bounds = this._bounds;
  1175. a.mouseEnabled = this.mouseEnabled;
  1176. a.compositeOperation = this.compositeOperation
  1177. };
  1178. b._applyShadow = function(a, b) {
  1179. b = b || Shadow.identity;
  1180. a.shadowColor =
  1181. b.color;
  1182. a.shadowOffsetX = b.offsetX;
  1183. a.shadowOffsetY = b.offsetY;
  1184. a.shadowBlur = b.blur
  1185. };
  1186. b._tick = function(a) {
  1187. var b = this._listeners;
  1188. b && b.tick && (b = new createjs.Event("tick"), b.params = a, this._dispatchEvent(b, this, 2))
  1189. };
  1190. b._testHit = function(a) {
  1191. try {
  1192. var b = 1 < a.getImageData(0, 0, 1, 1).data[3]
  1193. } catch (g) {
  1194. if (!c.suppressCrossDomainErrors)
  1195. throw"An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images.";
  1196. }
  1197. return b
  1198. };
  1199. b._applyFilters = function() {
  1200. if (this.filters &&
  1201. 0 != this.filters.length && this.cacheCanvas)
  1202. for (var a = this.filters.length, b = this.cacheCanvas.getContext("2d"), c = this.cacheCanvas.width, e = this.cacheCanvas.height, f = 0; a > f; f++)
  1203. this.filters[f].applyFilter(b, 0, 0, c, e)
  1204. };
  1205. b._applyFilterBounds = function(a, b, c, e) {
  1206. var f, h, l = this.filters;
  1207. if (!l || !(h = l.length))
  1208. return null;
  1209. for (l = 0; h > l; l++) {
  1210. var m = this.filters[l];
  1211. (m = m.getBounds && m.getBounds()) && (f || (f = this._rectangle.initialize(a, b, c, e)), f.x += m.x, f.y += m.y, f.width += m.width, f.height += m.height)
  1212. }
  1213. return f
  1214. };
  1215. b._getBounds = function(a,
  1216. b) {
  1217. return this._transformBounds(this.getBounds(), a, b)
  1218. };
  1219. b._transformBounds = function(a, b, c) {
  1220. if (!a)
  1221. return a;
  1222. var e = a.x, f = a.y, h = a.width, l = a.height, m = c ? this._matrix.identity() : this.getMatrix(this._matrix);
  1223. (e || f) && m.appendTransform(0, 0, 1, 1, 0, 0, 0, -e, -f);
  1224. b && m.prependMatrix(b);
  1225. b = h * m.a;
  1226. h *= m.b;
  1227. c = l * m.c;
  1228. var l = l * m.d, n = m.tx, m = m.ty, p = n, r = n, q = m, s = m;
  1229. return(e = b + n) < p ? p = e : e > r && (r = e), (e = b + c + n) < p ? p = e : e > r && (r = e), (e = c + n) < p ? p = e : e > r && (r = e), (f = h + m) < q ? q = f : f > s && (s = f), (f = h + l + m) < q ? q = f : f > s && (s = f), (f = l + m) < q ? q = f : f > s && (s = f), a.initialize(p,
  1230. q, r - p, s - q)
  1231. };
  1232. b._hasMouseEventListener = function() {
  1233. for (var a = c._MOUSE_EVENTS, b = 0, g = a.length; g > b; b++)
  1234. if (this.hasEventListener(a[b]))
  1235. return!0;
  1236. return!!this.cursor
  1237. };
  1238. createjs.DisplayObject = c
  1239. })();
  1240. this.createjs = this.createjs || {};
  1241. (function() {
  1242. var c = function() {
  1243. this.initialize()
  1244. }, b = c.prototype = new createjs.DisplayObject;
  1245. b.children = null;
  1246. b.mouseChildren = !0;
  1247. b.tickChildren = !0;
  1248. b.DisplayObject_initialize = b.initialize;
  1249. b.initialize = function() {
  1250. this.DisplayObject_initialize();
  1251. this.children = []
  1252. };
  1253. b.isVisible = function() {
  1254. var a = this.cacheCanvas || this.children.length;
  1255. return!!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && a)
  1256. };
  1257. b.DisplayObject_draw = b.draw;
  1258. b.draw = function(a, b) {
  1259. if (this.DisplayObject_draw(a, b))
  1260. return!0;
  1261. for (var d = this.children.slice(0),
  1262. c = 0, e = d.length; e > c; c++) {
  1263. var f = d[c];
  1264. f.isVisible() && (a.save(), f.updateContext(a), f.draw(a), a.restore())
  1265. }
  1266. return!0
  1267. };
  1268. b.addChild = function(a) {
  1269. if (null == a)
  1270. return a;
  1271. var b = arguments.length;
  1272. if (1 < b) {
  1273. for (var d = 0; b > d; d++)
  1274. this.addChild(arguments[d]);
  1275. return arguments[b - 1]
  1276. }
  1277. return a.parent && a.parent.removeChild(a), a.parent = this, this.children.push(a), a
  1278. };
  1279. b.addChildAt = function(a, b) {
  1280. var d = arguments.length, c = arguments[d - 1];
  1281. if (0 > c || c > this.children.length)
  1282. return arguments[d - 2];
  1283. if (2 < d) {
  1284. for (var e = 0; d - 1 > e; e++)
  1285. this.addChildAt(arguments[e],
  1286. c + e);
  1287. return arguments[d - 2]
  1288. }
  1289. return a.parent && a.parent.removeChild(a), a.parent = this, this.children.splice(b, 0, a), a
  1290. };
  1291. b.removeChild = function(a) {
  1292. var b = arguments.length;
  1293. if (1 < b) {
  1294. for (var d = !0, c = 0; b > c; c++)
  1295. d = d && this.removeChild(arguments[c]);
  1296. return d
  1297. }
  1298. return this.removeChildAt(createjs.indexOf(this.children, a))
  1299. };
  1300. b.removeChildAt = function(a) {
  1301. var b = arguments.length;
  1302. if (1 < b) {
  1303. for (var d = [], c = 0; b > c; c++)
  1304. d[c] = arguments[c];
  1305. d.sort(function(a, b) {
  1306. return b - a
  1307. });
  1308. for (var e = !0, c = 0; b > c; c++)
  1309. e = e && this.removeChildAt(d[c]);
  1310. return e
  1311. }
  1312. if (0 >
  1313. a || a > this.children.length - 1)
  1314. return!1;
  1315. b = this.children[a];
  1316. return b && (b.parent = null), this.children.splice(a, 1), !0
  1317. };
  1318. b.removeAllChildren = function() {
  1319. for (var a = this.children; a.length; )
  1320. a.pop().parent = null
  1321. };
  1322. b.getChildAt = function(a) {
  1323. return this.children[a]
  1324. };
  1325. b.getChildByName = function(a) {
  1326. for (var b = this.children, d = 0, c = b.length; c > d; d++)
  1327. if (b[d].name == a)
  1328. return b[d];
  1329. return null
  1330. };
  1331. b.sortChildren = function(a) {
  1332. this.children.sort(a)
  1333. };
  1334. b.getChildIndex = function(a) {
  1335. return createjs.indexOf(this.children, a)
  1336. };
  1337. b.getNumChildren =
  1338. function() {
  1339. return this.children.length
  1340. };
  1341. b.swapChildrenAt = function(a, b) {
  1342. var d = this.children, c = d[a], e = d[b];
  1343. c && e && (d[a] = e, d[b] = c)
  1344. };
  1345. b.swapChildren = function(a, b) {
  1346. for (var d, c, e = this.children, f = 0, h = e.length; h > f && (e[f] == a && (d = f), e[f] == b && (c = f), null == d || null == c); f++)
  1347. ;
  1348. f != h && (e[d] = b, e[c] = a)
  1349. };
  1350. b.setChildIndex = function(a, b) {
  1351. var d = this.children, c = d.length;
  1352. if (!(a.parent != this || 0 > b || b >= c)) {
  1353. for (var e = 0; c > e && d[e] != a; e++)
  1354. ;
  1355. e != c && e != b && (d.splice(e, 1), d.splice(b, 0, a))
  1356. }
  1357. };
  1358. b.contains = function(a) {
  1359. for (; a; ) {
  1360. if (a == this)
  1361. return!0;
  1362. a = a.parent
  1363. }
  1364. return!1
  1365. };
  1366. b.hitTest = function(a, b) {
  1367. return null != this.getObjectUnderPoint(a, b)
  1368. };
  1369. b.getObjectsUnderPoint = function(a, b) {
  1370. var d = [], c = this.localToGlobal(a, b);
  1371. return this._getObjectsUnderPoint(c.x, c.y, d), d
  1372. };
  1373. b.getObjectUnderPoint = function(a, b) {
  1374. var d = this.localToGlobal(a, b);
  1375. return this._getObjectsUnderPoint(d.x, d.y)
  1376. };
  1377. b.DisplayObject_getBounds = b.getBounds;
  1378. b.getBounds = function() {
  1379. return this._getBounds(null, !0)
  1380. };
  1381. b.getTransformedBounds = function() {
  1382. return this._getBounds()
  1383. };
  1384. b.clone = function(a) {
  1385. var b = new c;
  1386. if (this.cloneProps(b), a)
  1387. for (var d = b.children = [], g = 0, e = this.children.length; e > g; g++) {
  1388. var f = this.children[g].clone(a);
  1389. f.parent = b;
  1390. d.push(f)
  1391. }
  1392. return b
  1393. };
  1394. b.toString = function() {
  1395. return"[Container (name=" + this.name + ")]"
  1396. };
  1397. b.DisplayObject__tick = b._tick;
  1398. b._tick = function(a) {
  1399. if (this.tickChildren)
  1400. for (var b = this.children.length - 1; 0 <= b; b--) {
  1401. var d = this.children[b];
  1402. d.tickEnabled && d._tick && d._tick(a)
  1403. }
  1404. this.DisplayObject__tick(a)
  1405. };
  1406. b._getObjectsUnderPoint = function(a, b, d, g, e) {
  1407. var f = createjs.DisplayObject._hitTestContext,
  1408. h = this._matrix;
  1409. e = e || g && this._hasMouseEventListener();
  1410. for (var l = this.children, m = l.length - 1; 0 <= m; m--) {
  1411. var n = l[m], p = n.hitArea;
  1412. if (n.visible && (p || n.isVisible()) && (!g || n.mouseEnabled))
  1413. if (!p && n instanceof c) {
  1414. if (n = n._getObjectsUnderPoint(a, b, d, g, e), !d && n)
  1415. return g && !this.mouseChildren ? this : n
  1416. } else if (e || n._hasMouseEventListener())
  1417. if (n.getConcatenatedMatrix(h), p && (h.appendTransform(p.x, p.y, p.scaleX, p.scaleY, p.rotation, p.skewX, p.skewY, p.regX, p.regY), h.alpha = p.alpha), f.globalAlpha = h.alpha, f.setTransform(h.a, h.b,
  1418. h.c, h.d, h.tx - a, h.ty - b), (p || n).draw(f), this._testHit(f)) {
  1419. if (f.setTransform(1, 0, 0, 1, 0, 0), f.clearRect(0, 0, 2, 2), !d)
  1420. return g && !this.mouseChildren ? this : n;
  1421. d.push(n)
  1422. }
  1423. }
  1424. return null
  1425. };
  1426. b._getBounds = function(a, b) {
  1427. var d = this.DisplayObject_getBounds();
  1428. if (d)
  1429. return this._transformBounds(d, a, b);
  1430. var c, e, f, h, l = b ? this._matrix.identity() : this.getMatrix(this._matrix);
  1431. a && l.prependMatrix(a);
  1432. for (var m = this.children.length, n = 0; m > n; n++) {
  1433. var p = this.children[n];
  1434. if (p.visible && (d = p._getBounds(l))) {
  1435. var p = d.x, r = d.y, q = p + d.width, s = r +
  1436. d.height;
  1437. (c > p || null == c) && (c = p);
  1438. (q > e || null == e) && (e = q);
  1439. (f > r || null == f) && (f = r);
  1440. (s > h || null == h) && (h = s)
  1441. }
  1442. }
  1443. return null == e ? null : this._rectangle.initialize(c, f, e - c, h - f)
  1444. };
  1445. createjs.Container = c
  1446. })();
  1447. this.createjs = this.createjs || {};
  1448. (function() {
  1449. var c = function(a) {
  1450. this.initialize(a)
  1451. }, b = c.prototype = new createjs.Container;
  1452. c._snapToPixelEnabled = !1;
  1453. b.autoClear = !0;
  1454. b.canvas = null;
  1455. b.mouseX = 0;
  1456. b.mouseY = 0;
  1457. b.snapToPixelEnabled = !1;
  1458. b.mouseInBounds = !1;
  1459. b.tickOnUpdate = !0;
  1460. b.mouseMoveOutside = !1;
  1461. b.nextStage = null;
  1462. b._pointerData = null;
  1463. b._pointerCount = 0;
  1464. b._primaryPointerID = null;
  1465. b._mouseOverIntervalID = null;
  1466. b.Container_initialize = b.initialize;
  1467. b.initialize = function(a) {
  1468. this.Container_initialize();
  1469. this.canvas = "string" == typeof a ? document.getElementById(a) :
  1470. a;
  1471. this._pointerData = {};
  1472. this.enableDOMEvents(!0)
  1473. };
  1474. b.update = function() {
  1475. if (this.canvas) {
  1476. this.tickOnUpdate && (this.dispatchEvent("tickstart"), this.tickEnabled && this._tick(arguments.length ? arguments : null), this.dispatchEvent("tickend"));
  1477. this.dispatchEvent("drawstart");
  1478. c._snapToPixelEnabled = this.snapToPixelEnabled;
  1479. this.autoClear && this.clear();
  1480. var a = this.canvas.getContext("2d");
  1481. a.save();
  1482. this.updateContext(a);
  1483. this.draw(a, !1);
  1484. a.restore();
  1485. this.dispatchEvent("drawend")
  1486. }
  1487. };
  1488. b.handleEvent = function(a) {
  1489. "tick" == a.type &&
  1490. this.update(a)
  1491. };
  1492. b.clear = function() {
  1493. if (this.canvas) {
  1494. var a = this.canvas.getContext("2d");
  1495. a.setTransform(1, 0, 0, 1, 0, 0);
  1496. a.clearRect(0, 0, this.canvas.width + 1, this.canvas.height + 1)
  1497. }
  1498. };
  1499. b.toDataURL = function(a, b) {
  1500. b || (b = "image/png");
  1501. var d, c = this.canvas.getContext("2d"), e = this.canvas.width, f = this.canvas.height;
  1502. if (a) {
  1503. d = c.getImageData(0, 0, e, f);
  1504. var h = c.globalCompositeOperation;
  1505. c.globalCompositeOperation = "destination-over";
  1506. c.fillStyle = a;
  1507. c.fillRect(0, 0, e, f)
  1508. }
  1509. var l = this.canvas.toDataURL(b);
  1510. return a && (c.clearRect(0, 0, e +
  1511. 1, f + 1), c.putImageData(d, 0, 0), c.globalCompositeOperation = h), l
  1512. };
  1513. b.enableMouseOver = function(a) {
  1514. if (this._mouseOverIntervalID && (clearInterval(this._mouseOverIntervalID), this._mouseOverIntervalID = null, 0 == a && this._testMouseOver(!0)), null == a)
  1515. a = 20;
  1516. else if (0 >= a)
  1517. return;
  1518. var b = this;
  1519. this._mouseOverIntervalID = setInterval(function() {
  1520. b._testMouseOver()
  1521. }, 1E3 / Math.min(50, a))
  1522. };
  1523. b.enableDOMEvents = function(a) {
  1524. null == a && (a = !0);
  1525. var b, d = this._eventListeners;
  1526. if (!a && d) {
  1527. for (b in d)
  1528. a = d[b], a.t.removeEventListener(b, a.f, !1);
  1529. this._eventListeners =
  1530. null
  1531. } else if (a && !d && this.canvas) {
  1532. a = window.addEventListener ? window : document;
  1533. var c = this, d = this._eventListeners = {};
  1534. d.mouseup = {t: a, f: function(a) {
  1535. c._handleMouseUp(a)
  1536. }};
  1537. d.mousemove = {t: a, f: function(a) {
  1538. c._handleMouseMove(a)
  1539. }};
  1540. d.dblclick = {t: this.canvas, f: function(a) {
  1541. c._handleDoubleClick(a)
  1542. }};
  1543. d.mousedown = {t: this.canvas, f: function(a) {
  1544. c._handleMouseDown(a)
  1545. }};
  1546. for (b in d)
  1547. a = d[b], a.t.addEventListener(b, a.f, !1)
  1548. }
  1549. };
  1550. b.clone = function() {
  1551. var a = new c(null);
  1552. return this.cloneProps(a), a
  1553. };
  1554. b.toString = function() {
  1555. return"[Stage (name=" +
  1556. this.name + ")]"
  1557. };
  1558. b._getElementRect = function(a) {
  1559. var b;
  1560. try {
  1561. b = a.getBoundingClientRect()
  1562. } catch (d) {
  1563. b = {top: a.offsetTop, left: a.offsetLeft, width: a.offsetWidth, height: a.offsetHeight}
  1564. }
  1565. var c = (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || document.body.clientLeft || 0), e = (window.pageYOffset || document.scrollTop || 0) - (document.clientTop || document.body.clientTop || 0), f = window.getComputedStyle ? getComputedStyle(a) : a.currentStyle;
  1566. a = parseInt(f.paddingLeft) + parseInt(f.borderLeftWidth);
  1567. var h = parseInt(f.paddingTop) +
  1568. parseInt(f.borderTopWidth), l = parseInt(f.paddingRight) + parseInt(f.borderRightWidth), f = parseInt(f.paddingBottom) + parseInt(f.borderBottomWidth);
  1569. return{left: b.left + c + a, right: b.right + c - l, top: b.top + e + h, bottom: b.bottom + e - f}
  1570. };
  1571. b._getPointerData = function(a) {
  1572. var b = this._pointerData[a];
  1573. return b || (b = this._pointerData[a] = {x: 0, y: 0}, null == this._primaryPointerID && (this._primaryPointerID = a), (null == this._primaryPointerID || -1 == this._primaryPointerID) && (this._primaryPointerID = a)), b
  1574. };
  1575. b._handleMouseMove = function(a) {
  1576. a ||
  1577. (a = window.event);
  1578. this._handlePointerMove(-1, a, a.pageX, a.pageY)
  1579. };
  1580. b._handlePointerMove = function(a, b, d, c) {
  1581. if (this.canvas) {
  1582. var e = this._getPointerData(a), f = e.inBounds;
  1583. if (this._updatePointerPosition(a, b, d, c), f || e.inBounds || this.mouseMoveOutside)
  1584. -1 == a && e.inBounds == !f && this._dispatchMouseEvent(this, f ? "mouseleave" : "mouseenter", !1, a, e, b), this._dispatchMouseEvent(this, "stagemousemove", !1, a, e, b), this._dispatchMouseEvent(e.target, "pressmove", !0, a, e, b), (f = e.event) && f.hasEventListener("mousemove") && f.dispatchEvent(new createjs.MouseEvent("mousemove",
  1585. !1, !1, e.x, e.y, b, a, a == this._primaryPointerID, e.rawX, e.rawY), e.target), this.nextStage && this.nextStage._handlePointerMove(a, b, d, c)
  1586. }
  1587. };
  1588. b._updatePointerPosition = function(a, b, d, c) {
  1589. var e = this._getElementRect(this.canvas);
  1590. d -= e.left;
  1591. c -= e.top;
  1592. var f = this.canvas.width, h = this.canvas.height;
  1593. d /= (e.right - e.left) / f;
  1594. c /= (e.bottom - e.top) / h;
  1595. e = this._getPointerData(a);
  1596. (e.inBounds = 0 <= d && 0 <= c && f - 1 >= d && h - 1 >= c) ? (e.x = d, e.y = c) : this.mouseMoveOutside && (e.x = 0 > d ? 0 : d > f - 1 ? f - 1 : d, e.y = 0 > c ? 0 : c > h - 1 ? h - 1 : c);
  1597. e.posEvtObj = b;
  1598. e.rawX = d;
  1599. e.rawY = c;
  1600. a == this._primaryPointerID && (this.mouseX = e.x, this.mouseY = e.y, this.mouseInBounds = e.inBounds)
  1601. };
  1602. b._handleMouseUp = function(a) {
  1603. this._handlePointerUp(-1, a, !1)
  1604. };
  1605. b._handlePointerUp = function(a, b, d) {
  1606. var c = this._getPointerData(a);
  1607. this._dispatchMouseEvent(this, "stagemouseup", !1, a, c, b);
  1608. var e = c.target;
  1609. e && (this._getObjectsUnderPoint(c.x, c.y, null, !0) == e && this._dispatchMouseEvent(e, "click", !0, a, c, b), this._dispatchMouseEvent(e, "pressup", !0, a, c, b));
  1610. var f = c.event;
  1611. f && f.hasEventListener("mouseup") && f.dispatchEvent(new createjs.MouseEvent("mouseup",
  1612. !1, !1, c.x, c.y, b, a, a == this._primaryPointerID, c.rawX, c.rawY), e);
  1613. d ? (a == this._primaryPointerID && (this._primaryPointerID = null), delete this._pointerData[a]) : c.event = c.target = null;
  1614. this.nextStage && this.nextStage._handlePointerUp(a, b, d)
  1615. };
  1616. b._handleMouseDown = function(a) {
  1617. this._handlePointerDown(-1, a, a.pageX, a.pageY)
  1618. };
  1619. b._handlePointerDown = function(a, b, d, c) {
  1620. null != c && this._updatePointerPosition(a, b, d, c);
  1621. var e = this._getPointerData(a);
  1622. this._dispatchMouseEvent(this, "stagemousedown", !1, a, e, b);
  1623. e.target = this._getObjectsUnderPoint(e.x,
  1624. e.y, null, !0);
  1625. e.event = this._dispatchMouseEvent(e.target, "mousedown", !0, a, e, b);
  1626. this.nextStage && this.nextStage._handlePointerDown(a, b, d, c)
  1627. };
  1628. b._testMouseOver = function(a) {
  1629. if (-1 == this._primaryPointerID && (a || this.mouseX != this._mouseOverX || this.mouseY != this._mouseOverY || !this.mouseInBounds)) {
  1630. var b, d, c, e = this._getPointerData(-1), f = e.posEvtObj, h = -1;
  1631. c = "";
  1632. (a || this.mouseInBounds && f && f.target == this.canvas) && (b = this._getObjectsUnderPoint(this.mouseX, this.mouseY, null, !0), this._mouseOverX = this.mouseX, this._mouseOverY =
  1633. this.mouseY);
  1634. a = this._mouseOverTarget || [];
  1635. var l = a[a.length - 1], m = this._mouseOverTarget = [];
  1636. for (d = b; d; )
  1637. m.unshift(d), null != d.cursor && (c = d.cursor), d = d.parent;
  1638. this.canvas.style.cursor = c;
  1639. c = 0;
  1640. for (d = m.length; d > c && m[c] == a[c]; c++)
  1641. h = c;
  1642. l != b && this._dispatchMouseEvent(l, "mouseout", !0, -1, e, f);
  1643. for (c = a.length - 1; c > h; c--)
  1644. this._dispatchMouseEvent(a[c], "rollout", !1, -1, e, f);
  1645. for (c = m.length - 1; c > h; c--)
  1646. this._dispatchMouseEvent(m[c], "rollover", !1, -1, e, f);
  1647. l != b && this._dispatchMouseEvent(b, "mouseover", !0, -1, e, f)
  1648. }
  1649. };
  1650. b._handleDoubleClick =
  1651. function(a) {
  1652. var b = this._getPointerData(-1), d = this._getObjectsUnderPoint(b.x, b.y, null, !0);
  1653. this._dispatchMouseEvent(d, "dblclick", !0, -1, b, a);
  1654. this.nextStage && this.nextStage._handleDoubleClick(a)
  1655. };
  1656. b._dispatchMouseEvent = function(a, b, d, c, e, f) {
  1657. if (a && (d || a.hasEventListener(b)))
  1658. return b = new createjs.MouseEvent(b, d, !1, e.x, e.y, f, c, c == this._primaryPointerID, e.rawX, e.rawY), a.dispatchEvent(b), b
  1659. };
  1660. createjs.Stage = c
  1661. })();
  1662. this.createjs = this.createjs || {};
  1663. (function() {
  1664. var c = function(a) {
  1665. this.initialize(a)
  1666. }, b = c.prototype = new createjs.DisplayObject;
  1667. b.image = null;
  1668. b.snapToPixel = !0;
  1669. b.sourceRect = null;
  1670. b.DisplayObject_initialize = b.initialize;
  1671. b.initialize = function(a) {
  1672. this.DisplayObject_initialize();
  1673. "string" == typeof a ? (this.image = document.createElement("img"), this.image.src = a) : this.image = a
  1674. };
  1675. b.isVisible = function() {
  1676. var a = this.cacheCanvas || this.image && (this.image.complete || this.image.getContext || 2 <= this.image.readyState);
  1677. return!!(this.visible && 0 < this.alpha && 0 != this.scaleX &&
  1678. 0 != this.scaleY && a)
  1679. };
  1680. b.DisplayObject_draw = b.draw;
  1681. b.draw = function(a, b) {
  1682. if (this.DisplayObject_draw(a, b))
  1683. return!0;
  1684. var d = this.sourceRect;
  1685. return d ? a.drawImage(this.image, d.x, d.y, d.width, d.height, 0, 0, d.width, d.height) : a.drawImage(this.image, 0, 0), !0
  1686. };
  1687. b.DisplayObject_getBounds = b.getBounds;
  1688. b.getBounds = function() {
  1689. var a = this.DisplayObject_getBounds();
  1690. if (a)
  1691. return a;
  1692. a = this.sourceRect || this.image;
  1693. return this.image && (this.image.complete || this.image.getContext || 2 <= this.image.readyState) ? this._rectangle.initialize(0,
  1694. 0, a.width, a.height) : null
  1695. };
  1696. b.clone = function() {
  1697. var a = new c(this.image);
  1698. return this.sourceRect && (a.sourceRect = this.sourceRect.clone()), this.cloneProps(a), a
  1699. };
  1700. b.toString = function() {
  1701. return"[Bitmap (name=" + this.name + ")]"
  1702. };
  1703. createjs.Bitmap = c
  1704. })();
  1705. this.createjs = this.createjs || {};
  1706. (function() {
  1707. var c = function(a, b) {
  1708. this.initialize(a, b)
  1709. }, b = c.prototype = new createjs.DisplayObject;
  1710. b.currentFrame = 0;
  1711. b.currentAnimation = null;
  1712. b.paused = !0;
  1713. b.spriteSheet = null;
  1714. b.snapToPixel = !0;
  1715. b.offset = 0;
  1716. b.currentAnimationFrame = 0;
  1717. b.framerate = 0;
  1718. b._advanceCount = 0;
  1719. b._animation = null;
  1720. b._currentFrame = null;
  1721. b.DisplayObject_initialize = b.initialize;
  1722. b.initialize = function(a, b) {
  1723. this.DisplayObject_initialize();
  1724. this.spriteSheet = a;
  1725. b && this.gotoAndPlay(b)
  1726. };
  1727. b.isVisible = function() {
  1728. var a = this.cacheCanvas || this.spriteSheet.complete;
  1729. return!!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && a)
  1730. };
  1731. b.DisplayObject_draw = b.draw;
  1732. b.draw = function(a, b) {
  1733. if (this.DisplayObject_draw(a, b))
  1734. return!0;
  1735. this._normalizeFrame();
  1736. var d = this.spriteSheet.getFrame(0 | this._currentFrame);
  1737. if (!d)
  1738. return!1;
  1739. var c = d.rect;
  1740. return a.drawImage(d.image, c.x, c.y, c.width, c.height, -d.regX, -d.regY, c.width, c.height), !0
  1741. };
  1742. b.play = function() {
  1743. this.paused = !1
  1744. };
  1745. b.stop = function() {
  1746. this.paused = !0
  1747. };
  1748. b.gotoAndPlay = function(a) {
  1749. this.paused = !1;
  1750. this._goto(a)
  1751. };
  1752. b.gotoAndStop = function(a) {
  1753. this.paused =
  1754. !0;
  1755. this._goto(a)
  1756. };
  1757. b.advance = function(a) {
  1758. var b = this._animation && this._animation.speed || 1, d = this.framerate || this.spriteSheet.framerate;
  1759. a = d && null != a ? a / (1E3 / d) : 1;
  1760. this._animation ? this.currentAnimationFrame += a * b : this._currentFrame += a * b;
  1761. this._normalizeFrame()
  1762. };
  1763. b.DisplayObject_getBounds = b.getBounds;
  1764. b.getBounds = function() {
  1765. return this.DisplayObject_getBounds() || this.spriteSheet.getFrameBounds(this.currentFrame, this._rectangle)
  1766. };
  1767. b.clone = function() {
  1768. var a = new c(this.spriteSheet);
  1769. return this.cloneProps(a), a
  1770. };
  1771. b.toString =
  1772. function() {
  1773. return"[Sprite (name=" + this.name + ")]"
  1774. };
  1775. b.DisplayObject__tick = b._tick;
  1776. b._tick = function(a) {
  1777. this.paused || this.advance(a && a[0] && a[0].delta);
  1778. this.DisplayObject__tick(a)
  1779. };
  1780. b._normalizeFrame = function() {
  1781. var a, b = this._animation, d = this.paused, c = this._currentFrame, e = this.currentAnimationFrame;
  1782. if (b)
  1783. if (a = b.frames.length, (0 | e) >= a) {
  1784. var f = b.next;
  1785. if (!this._dispatchAnimationEnd(b, c, d, f, a - 1)) {
  1786. if (f)
  1787. return this._goto(f, e - a);
  1788. this.paused = !0;
  1789. e = this.currentAnimationFrame = b.frames.length - 1;
  1790. this._currentFrame = b.frames[e]
  1791. }
  1792. } else
  1793. this._currentFrame =
  1794. b.frames[0 | e];
  1795. else if (a = this.spriteSheet.getNumFrames(), c >= a && !this._dispatchAnimationEnd(b, c, d, a - 1) && (this._currentFrame -= a) >= a)
  1796. return this._normalizeFrame();
  1797. this.currentFrame = 0 | this._currentFrame
  1798. };
  1799. b._dispatchAnimationEnd = function(a, b, d, c, e) {
  1800. var f = a ? a.name : null;
  1801. if (this.hasEventListener("animationend")) {
  1802. var h = new createjs.Event("animationend");
  1803. h.name = f;
  1804. h.next = c;
  1805. this.dispatchEvent(h)
  1806. }
  1807. a = this._animation != a || this._currentFrame != b;
  1808. return a || d || !this.paused || (this.currentAnimationFrame = e, a = !0), a
  1809. };
  1810. b.DisplayObject_cloneProps =
  1811. b.cloneProps;
  1812. b.cloneProps = function(a) {
  1813. this.DisplayObject_cloneProps(a);
  1814. a.currentFrame = this.currentFrame;
  1815. a._currentFrame = this._currentFrame;
  1816. a.currentAnimation = this.currentAnimation;
  1817. a.paused = this.paused;
  1818. a._animation = this._animation;
  1819. a.currentAnimationFrame = this.currentAnimationFrame;
  1820. a.framerate = this.framerate
  1821. };
  1822. b._goto = function(a, b) {
  1823. if (isNaN(a)) {
  1824. var d = this.spriteSheet.getAnimation(a);
  1825. d && (this.currentAnimationFrame = b || 0, this._animation = d, this.currentAnimation = a, this._normalizeFrame())
  1826. } else
  1827. this.currentAnimationFrame =
  1828. 0, this.currentAnimation = this._animation = null, this._currentFrame = a, this._normalizeFrame()
  1829. };
  1830. createjs.Sprite = c
  1831. })();
  1832. this.createjs = this.createjs || {};
  1833. (function() {
  1834. if (!createjs.Sprite)
  1835. throw"BitmapAnimation is deprecated in favour of Sprite. See VERSIONS file for info on changes.";
  1836. (createjs.BitmapAnimation = function(c) {
  1837. console.log("BitmapAnimation is deprecated in favour of Sprite. See VERSIONS file for info on changes.");
  1838. this.initialize(c)
  1839. }).prototype = new createjs.Sprite
  1840. })();
  1841. this.createjs = this.createjs || {};
  1842. (function() {
  1843. var c = function(a) {
  1844. this.initialize(a)
  1845. }, b = c.prototype = new createjs.DisplayObject;
  1846. b.graphics = null;
  1847. b.DisplayObject_initialize = b.initialize;
  1848. b.initialize = function(a) {
  1849. this.DisplayObject_initialize();
  1850. this.graphics = a ? a : new createjs.Graphics
  1851. };
  1852. b.isVisible = function() {
  1853. var a = this.cacheCanvas || this.graphics && !this.graphics.isEmpty();
  1854. return!!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && a)
  1855. };
  1856. b.DisplayObject_draw = b.draw;
  1857. b.draw = function(a, b) {
  1858. return this.DisplayObject_draw(a, b) ? !0 : (this.graphics.draw(a),
  1859. !0)
  1860. };
  1861. b.clone = function(a) {
  1862. a = new c(a && this.graphics ? this.graphics.clone() : this.graphics);
  1863. return this.cloneProps(a), a
  1864. };
  1865. b.toString = function() {
  1866. return"[Shape (name=" + this.name + ")]"
  1867. };
  1868. createjs.Shape = c
  1869. })();
  1870. this.createjs = this.createjs || {};
  1871. (function() {
  1872. var c = function(a, b, c) {
  1873. this.initialize(a, b, c)
  1874. }, b = c.prototype = new createjs.DisplayObject, a = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  1875. a.getContext && (c._workingContext = a.getContext("2d"), a.width = a.height = 1);
  1876. c.H_OFFSETS = {start: 0, left: 0, center: -0.5, end: -1, right: -1};
  1877. c.V_OFFSETS = {top: 0, hanging: -0.01, middle: -0.4, alphabetic: -0.8, ideographic: -0.85, bottom: -1};
  1878. b.text = "";
  1879. b.font = null;
  1880. b.color = null;
  1881. b.textAlign = "left";
  1882. b.textBaseline = "top";
  1883. b.maxWidth = null;
  1884. b.outline = 0;
  1885. b.lineHeight = 0;
  1886. b.lineWidth = null;
  1887. b.DisplayObject_initialize = b.initialize;
  1888. b.initialize = function(a, b, c) {
  1889. this.DisplayObject_initialize();
  1890. this.text = a;
  1891. this.font = b;
  1892. this.color = c
  1893. };
  1894. b.isVisible = function() {
  1895. var a = this.cacheCanvas || null != this.text && "" !== this.text;
  1896. return!!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && a)
  1897. };
  1898. b.DisplayObject_draw = b.draw;
  1899. b.draw = function(a, b) {
  1900. if (this.DisplayObject_draw(a, b))
  1901. return!0;
  1902. var c = this.color || "#000";
  1903. return this.outline ? (a.strokeStyle = c, a.lineWidth = 1 * this.outline) :
  1904. a.fillStyle = c, this._drawText(this._prepContext(a)), !0
  1905. };
  1906. b.getMeasuredWidth = function() {
  1907. return this._prepContext(c._workingContext).measureText(this.text).width
  1908. };
  1909. b.getMeasuredLineHeight = function() {
  1910. return 1.2 * this._prepContext(c._workingContext).measureText("M").width
  1911. };
  1912. b.getMeasuredHeight = function() {
  1913. return this._drawText(null, {}).height
  1914. };
  1915. b.DisplayObject_getBounds = b.getBounds;
  1916. b.getBounds = function() {
  1917. var a = this.DisplayObject_getBounds();
  1918. if (a)
  1919. return a;
  1920. if (null == this.text || "" == this.text)
  1921. return null;
  1922. var a = this._drawText(null,
  1923. {}), b = this.maxWidth && this.maxWidth < a.width ? this.maxWidth : a.width, g = b * c.H_OFFSETS[this.textAlign || "left"], e = (this.lineHeight || this.getMeasuredLineHeight()) * c.V_OFFSETS[this.textBaseline || "top"];
  1924. return this._rectangle.initialize(g, e, b, a.height)
  1925. };
  1926. b.clone = function() {
  1927. var a = new c(this.text, this.font, this.color);
  1928. return this.cloneProps(a), a
  1929. };
  1930. b.toString = function() {
  1931. return"[Text (text=" + (20 < this.text.length ? this.text.substr(0, 17) + "..." : this.text) + ")]"
  1932. };
  1933. b.DisplayObject_cloneProps = b.cloneProps;
  1934. b.cloneProps = function(a) {
  1935. this.DisplayObject_cloneProps(a);
  1936. a.textAlign = this.textAlign;
  1937. a.textBaseline = this.textBaseline;
  1938. a.maxWidth = this.maxWidth;
  1939. a.outline = this.outline;
  1940. a.lineHeight = this.lineHeight;
  1941. a.lineWidth = this.lineWidth
  1942. };
  1943. b._prepContext = function(a) {
  1944. return a.font = this.font, a.textAlign = this.textAlign || "left", a.textBaseline = this.textBaseline || "top", a
  1945. };
  1946. b._drawText = function(a, b) {
  1947. var g = !!a;
  1948. g || (a = this._prepContext(c._workingContext));
  1949. for (var e = this.lineHeight || this.getMeasuredLineHeight(), f = 0, h = 0, l = String(this.text).split(/(?:\r\n|\r|\n)/), m = 0, n = l.length; n > m; m++) {
  1950. var p =
  1951. l[m], r = null;
  1952. if (null != this.lineWidth && (r = a.measureText(p).width) > this.lineWidth)
  1953. for (var q = p.split(/(\s)/), p = q[0], r = a.measureText(p).width, s = 1, u = q.length; u > s; s += 2) {
  1954. var t = a.measureText(q[s] + q[s + 1]).width;
  1955. r + t > this.lineWidth ? (g && this._drawTextLine(a, p, h * e), r > f && (f = r), p = q[s + 1], r = a.measureText(p).width, h++) : (p += q[s] + q[s + 1], r += t)
  1956. }
  1957. g && this._drawTextLine(a, p, h * e);
  1958. b && null == r && (r = a.measureText(p).width);
  1959. r > f && (f = r);
  1960. h++
  1961. }
  1962. return b && (b.count = h, b.width = f, b.height = h * e), b
  1963. };
  1964. b._drawTextLine = function(a, b, c) {
  1965. this.outline ?
  1966. a.strokeText(b, 0, c, this.maxWidth || 65535) : a.fillText(b, 0, c, this.maxWidth || 65535)
  1967. };
  1968. createjs.Text = c
  1969. })();
  1970. this.createjs = this.createjs || {};
  1971. (function() {
  1972. function c(a, b) {
  1973. this.initialize(a, b)
  1974. }
  1975. var b = c.prototype = new createjs.DisplayObject;
  1976. b.text = "";
  1977. b.spriteSheet = null;
  1978. b.lineHeight = 0;
  1979. b.letterSpacing = 0;
  1980. b.spaceWidth = 0;
  1981. b.DisplayObject_initialize = b.initialize;
  1982. b.initialize = function(a, b) {
  1983. this.DisplayObject_initialize();
  1984. this.text = a;
  1985. this.spriteSheet = b
  1986. };
  1987. b.DisplayObject_draw = b.draw;
  1988. b.draw = function(a, b) {
  1989. return this.DisplayObject_draw(a, b) ? !0 : (this._drawText(a), void 0)
  1990. };
  1991. b.isVisible = function() {
  1992. var a = this.cacheCanvas || this.spriteSheet && this.spriteSheet.complete &&
  1993. this.text;
  1994. return!!(this.visible && 0 < this.alpha && 0 != this.scaleX && 0 != this.scaleY && a)
  1995. };
  1996. b.getBounds = function() {
  1997. var a = this._rectangle;
  1998. return this._drawText(null, a), a.width ? a : null
  1999. };
  2000. b._getFrame = function(a, b) {
  2001. var d, c = b.getAnimation(a);
  2002. return c || (a != (d = a.toUpperCase()) || a != (d = a.toLowerCase()) || (d = null), d && (c = b.getAnimation(d))), c && b.getFrame(c.frames[0])
  2003. };
  2004. b._getLineHeight = function(a) {
  2005. return(a = this._getFrame("1", a) || this._getFrame("T", a) || this._getFrame("L", a) || a.getFrame(0)) ? a.rect.height : 1
  2006. };
  2007. b._getSpaceWidth =
  2008. function(a) {
  2009. return(a = this._getFrame("1", a) || this._getFrame("l", a) || this._getFrame("e", a) || this._getFrame("a", a) || a.getFrame(0)) ? a.rect.width : 1
  2010. };
  2011. b._drawText = function(a, b) {
  2012. var d, c, e, f = 0, h = 0, l = this.spaceWidth, m = this.lineHeight, n = this.spriteSheet, p = !!this._getFrame(" ", n);
  2013. p || 0 != l || (l = this._getSpaceWidth(n));
  2014. 0 == m && (m = this._getLineHeight(n));
  2015. for (var r = 0, q = 0, s = this.text.length; s > q; q++)
  2016. if (d = this.text.charAt(q), p || " " != d)
  2017. if ("\n" != d && "\r" != d) {
  2018. var u = this._getFrame(d, n);
  2019. if (u) {
  2020. var t = u.rect;
  2021. e = u.regX;
  2022. d = t.width;
  2023. a && a.drawImage(u.image, t.x, t.y, d, c = t.height, f - e, h - u.regY, d, c);
  2024. f += d + this.letterSpacing
  2025. }
  2026. } else
  2027. "\r" == d && "\n" == this.text.charAt(q + 1) && q++, f - e > r && (r = f - e), f = 0, h += m;
  2028. else
  2029. f += l;
  2030. f - e > r && (r = f - e);
  2031. b && (b.width = r - this.letterSpacing, b.height = h + m)
  2032. };
  2033. createjs.BitmapText = c
  2034. })();
  2035. this.createjs = this.createjs || {};
  2036. (function() {
  2037. var c = function() {
  2038. throw"SpriteSheetUtils cannot be instantiated";
  2039. }, b = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  2040. b.getContext && (c._workingCanvas = b, c._workingContext = b.getContext("2d"), b.width = b.height = 1);
  2041. c.addFlippedFrames = function(a, b, d, g) {
  2042. if (b || d || g) {
  2043. var e = 0;
  2044. b && c._flip(a, ++e, !0, !1);
  2045. d && c._flip(a, ++e, !1, !0);
  2046. g && c._flip(a, ++e, !0, !0)
  2047. }
  2048. };
  2049. c.extractFrame = function(a, b) {
  2050. isNaN(b) && (b = a.getAnimation(b).frames[0]);
  2051. var d = a.getFrame(b);
  2052. if (!d)
  2053. return null;
  2054. var g = d.rect,
  2055. e = c._workingCanvas;
  2056. e.width = g.width;
  2057. e.height = g.height;
  2058. c._workingContext.drawImage(d.image, g.x, g.y, g.width, g.height, 0, 0, g.width, g.height);
  2059. d = document.createElement("img");
  2060. return d.src = e.toDataURL("image/png"), d
  2061. };
  2062. c.mergeAlpha = function(a, b, d) {
  2063. d || (d = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"));
  2064. d.width = Math.max(b.width, a.width);
  2065. d.height = Math.max(b.height, a.height);
  2066. var c = d.getContext("2d");
  2067. return c.save(), c.drawImage(a, 0, 0), c.globalCompositeOperation = "destination-in", c.drawImage(b,
  2068. 0, 0), c.restore(), d
  2069. };
  2070. c._flip = function(a, b, d, g) {
  2071. for (var e = a._images, f = c._workingCanvas, h = c._workingContext, l = e.length / b, m = 0; l > m; m++) {
  2072. var n = e[m];
  2073. n.__tmp = m;
  2074. h.setTransform(1, 0, 0, 1, 0, 0);
  2075. h.clearRect(0, 0, f.width + 1, f.height + 1);
  2076. f.width = n.width;
  2077. f.height = n.height;
  2078. h.setTransform(d ? -1 : 1, 0, 0, g ? -1 : 1, d ? n.width : 0, g ? n.height : 0);
  2079. h.drawImage(n, 0, 0);
  2080. var p = document.createElement("img");
  2081. p.src = f.toDataURL("image/png");
  2082. p.width = n.width;
  2083. p.height = n.height;
  2084. e.push(p)
  2085. }
  2086. h = a._frames;
  2087. f = h.length / b;
  2088. for (m = 0; f > m; m++) {
  2089. var n = h[m], r = n.rect.clone(),
  2090. p = e[n.image.__tmp + l * b], q = {image: p, rect: r, regX: n.regX, regY: n.regY};
  2091. d && (r.x = p.width - r.x - r.width, q.regX = r.width - n.regX);
  2092. g && (r.y = p.height - r.y - r.height, q.regY = r.height - n.regY);
  2093. h.push(q)
  2094. }
  2095. d = "_" + (d ? "h" : "") + (g ? "v" : "");
  2096. g = a._animations;
  2097. a = a._data;
  2098. e = g.length / b;
  2099. for (m = 0; e > m; m++) {
  2100. h = g[m];
  2101. n = a[h];
  2102. l = {name: h + d, speed: n.speed, next: n.next, frames: []};
  2103. n.next && (l.next += d);
  2104. h = n.frames;
  2105. n = 0;
  2106. for (p = h.length; p > n; n++)
  2107. l.frames.push(h[n] + f * b);
  2108. a[l.name] = l;
  2109. g.push(l.name)
  2110. }
  2111. };
  2112. createjs.SpriteSheetUtils = c
  2113. })();
  2114. this.createjs = this.createjs || {};
  2115. (function() {
  2116. var c = function() {
  2117. this.initialize()
  2118. }, b = c.prototype = new createjs.EventDispatcher;
  2119. c.ERR_DIMENSIONS = "frame dimensions exceed max spritesheet dimensions";
  2120. c.ERR_RUNNING = "a build is already running";
  2121. b.maxWidth = 2048;
  2122. b.maxHeight = 2048;
  2123. b.spriteSheet = null;
  2124. b.scale = 1;
  2125. b.padding = 1;
  2126. b.timeSlice = 0.3;
  2127. b.progress = -1;
  2128. b._frames = null;
  2129. b._animations = null;
  2130. b._data = null;
  2131. b._nextFrameIndex = 0;
  2132. b._index = 0;
  2133. b._timerID = null;
  2134. b._scale = 1;
  2135. b.initialize = function() {
  2136. this._frames = [];
  2137. this._animations = {}
  2138. };
  2139. b.addFrame = function(a, b, d, g,
  2140. e, f) {
  2141. if (this._data)
  2142. throw c.ERR_RUNNING;
  2143. b = b || a.bounds || a.nominalBounds;
  2144. return!b && a.getBounds && (b = a.getBounds()), b ? (d = d || 1, this._frames.push({source: a, sourceRect: b, scale: d, funct: g, params: e, scope: f, index: this._frames.length, height: b.height * d}) - 1) : null
  2145. };
  2146. b.addAnimation = function(a, b, d, g) {
  2147. if (this._data)
  2148. throw c.ERR_RUNNING;
  2149. this._animations[a] = {frames: b, next: d, frequency: g}
  2150. };
  2151. b.addMovieClip = function(a, b, d) {
  2152. if (this._data)
  2153. throw c.ERR_RUNNING;
  2154. var g = a.frameBounds, e = b || a.bounds || a.nominalBounds;
  2155. if (!e && a.getBounds &&
  2156. (e = a.getBounds()), !e && !g)
  2157. return null;
  2158. b = this._frames.length;
  2159. for (var f = a.timeline.duration, h = 0; f > h; h++)
  2160. this.addFrame(a, g && g[h] ? g[h] : e, d, function(a) {
  2161. var b = this.actionsEnabled;
  2162. this.actionsEnabled = !1;
  2163. this.gotoAndStop(a);
  2164. this.actionsEnabled = b
  2165. }, [h], a);
  2166. h = a.timeline._labels;
  2167. a = [];
  2168. for (var l in h)
  2169. a.push({index: h[l], label: l});
  2170. if (a.length)
  2171. for (a.sort(function(a, b) {
  2172. return a.index - b.index
  2173. }), h = 0, l = a.length; l > h; h++) {
  2174. d = a[h].label;
  2175. for (var g = b + (h == l - 1 ? f : a[h + 1].index), e = [], m = b + a[h].index; g > m; m++)
  2176. e.push(m);
  2177. this.addAnimation(d,
  2178. e, !0)
  2179. }
  2180. };
  2181. b.build = function() {
  2182. if (this._data)
  2183. throw c.ERR_RUNNING;
  2184. for (this._startBuild(); this._drawNext(); )
  2185. ;
  2186. return this._endBuild(), this.spriteSheet
  2187. };
  2188. b.buildAsync = function(a) {
  2189. if (this._data)
  2190. throw c.ERR_RUNNING;
  2191. this.timeSlice = a;
  2192. this._startBuild();
  2193. var b = this;
  2194. this._timerID = setTimeout(function() {
  2195. b._run()
  2196. }, 50 - 50 * Math.max(0.01, Math.min(0.99, this.timeSlice || 0.3)))
  2197. };
  2198. b.stopAsync = function() {
  2199. clearTimeout(this._timerID);
  2200. this._data = null
  2201. };
  2202. b.clone = function() {
  2203. throw"SpriteSheetBuilder cannot be cloned.";
  2204. };
  2205. b.toString = function() {
  2206. return"[SpriteSheetBuilder]"
  2207. };
  2208. b._startBuild = function() {
  2209. var a = this.padding || 0;
  2210. this.progress = 0;
  2211. this.spriteSheet = null;
  2212. this._index = 0;
  2213. this._scale = this.scale;
  2214. var b = [];
  2215. this._data = {images: [], frames: b, animations: this._animations};
  2216. var d = this._frames.slice();
  2217. if (d.sort(function(a, b) {
  2218. return a.height <= b.height ? -1 : 1
  2219. }), d[d.length - 1].height + 2 * a > this.maxHeight)
  2220. throw c.ERR_DIMENSIONS;
  2221. for (var g = 0, e = 0, f = 0; d.length; ) {
  2222. var h = this._fillRow(d, g, f, b, a);
  2223. if (h.w > e && (e = h.w), g += h.h, !h.h || !d.length) {
  2224. var l = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  2225. l.width = this._getSize(e, this.maxWidth);
  2226. l.height = this._getSize(g, this.maxHeight);
  2227. this._data.images[f] = l;
  2228. h.h || (e = g = 0, f++)
  2229. }
  2230. }
  2231. };
  2232. b._getSize = function(a, b) {
  2233. for (var d = 4; Math.pow(2, ++d) < a; )
  2234. ;
  2235. return Math.min(b, Math.pow(2, d))
  2236. };
  2237. b._fillRow = function(a, b, d, g, e) {
  2238. var f = this.maxWidth, h = this.maxHeight;
  2239. b += e;
  2240. for (var h = h - b, l = e, m = 0, n = a.length - 1; 0 <= n; n--) {
  2241. var p = a[n], r = this._scale * p.scale, q = p.sourceRect, s = p.source, u = Math.floor(r * q.x - e), t = Math.floor(r * q.y - e), w = Math.ceil(r * q.height + 2 * e), q = Math.ceil(r * q.width + 2 * e);
  2242. if (q > f)
  2243. throw c.ERR_DIMENSIONS;
  2244. w > h || l + q > f || (p.img = d, p.rect = new createjs.Rectangle(l, b, q, w), m = m || w, a.splice(n, 1), g[p.index] = [l, b, q, w, d, Math.round(-u + r * s.regX - e), Math.round(-t + r * s.regY - e)], l += q)
  2245. }
  2246. return{w: l, h: m}
  2247. };
  2248. b._endBuild = function() {
  2249. this.spriteSheet = new createjs.SpriteSheet(this._data);
  2250. this._data = null;
  2251. this.progress = 1;
  2252. this.dispatchEvent("complete")
  2253. };
  2254. b._run = function() {
  2255. for (var a = 50 * Math.max(0.01, Math.min(0.99, this.timeSlice || 0.3)), b = (new Date).getTime() + a, d = !1; b > (new Date).getTime(); )
  2256. if (!this._drawNext()) {
  2257. d = !0;
  2258. break
  2259. }
  2260. if (d)
  2261. this._endBuild();
  2262. else {
  2263. var c = this;
  2264. this._timerID = setTimeout(function() {
  2265. c._run()
  2266. }, 50 - a)
  2267. }
  2268. a = this.progress = this._index / this._frames.length;
  2269. this.hasEventListener("progress") && (b = new createjs.Event("progress"), b.progress = a, this.dispatchEvent(b))
  2270. };
  2271. b._drawNext = function() {
  2272. var a = this._frames[this._index], b = a.scale * this._scale, d = a.rect, c = a.sourceRect, e = this._data.images[a.img].getContext("2d");
  2273. return a.funct && a.funct.apply(a.scope, a.params), e.save(), e.beginPath(), e.rect(d.x, d.y, d.width, d.height), e.clip(), e.translate(Math.ceil(d.x -
  2274. c.x * b), Math.ceil(d.y - c.y * b)), e.scale(b, b), a.source.draw(e), e.restore(), ++this._index < this._frames.length
  2275. };
  2276. createjs.SpriteSheetBuilder = c
  2277. })();
  2278. this.createjs = this.createjs || {};
  2279. (function() {
  2280. var c = function(a) {
  2281. this.initialize(a)
  2282. }, b = c.prototype = new createjs.DisplayObject;
  2283. b.htmlElement = null;
  2284. b._oldMtx = null;
  2285. b._visible = !1;
  2286. b.DisplayObject_initialize = b.initialize;
  2287. b.initialize = function(a) {
  2288. "string" == typeof a && (a = document.getElementById(a));
  2289. this.DisplayObject_initialize();
  2290. this.mouseEnabled = !1;
  2291. this.htmlElement = a;
  2292. a = a.style;
  2293. a.position = "absolute";
  2294. a.transformOrigin = a.WebkitTransformOrigin = a.msTransformOrigin = a.MozTransformOrigin = a.OTransformOrigin = "0% 0%"
  2295. };
  2296. b.isVisible = function() {
  2297. return null !=
  2298. this.htmlElement
  2299. };
  2300. b.draw = function() {
  2301. return this.visible && (this._visible = !0), !0
  2302. };
  2303. b.cache = function() {
  2304. };
  2305. b.uncache = function() {
  2306. };
  2307. b.updateCache = function() {
  2308. };
  2309. b.hitTest = function() {
  2310. };
  2311. b.localToGlobal = function() {
  2312. };
  2313. b.globalToLocal = function() {
  2314. };
  2315. b.localToLocal = function() {
  2316. };
  2317. b.clone = function() {
  2318. throw"DOMElement cannot be cloned.";
  2319. };
  2320. b.toString = function() {
  2321. return"[DOMElement (name=" + this.name + ")]"
  2322. };
  2323. b.DisplayObject__tick = b._tick;
  2324. b._tick = function(a) {
  2325. var b = this.getStage();
  2326. this._visible = !1;
  2327. b && b.on("drawend", this._handleDrawEnd,
  2328. this, !0);
  2329. this.DisplayObject__tick(a)
  2330. };
  2331. b._handleDrawEnd = function() {
  2332. var a = this.htmlElement;
  2333. if (a) {
  2334. var a = a.style, b = this._visible ? "visible" : "hidden";
  2335. if (b != a.visibility && (a.visibility = b), this._visible) {
  2336. var b = this.getConcatenatedMatrix(this._matrix), d = this._oldMtx;
  2337. if (d && d.alpha == b.alpha || (a.opacity = "" + (0 | 1E4 * b.alpha) / 1E4, d && (d.alpha = b.alpha)), !d || d.tx != b.tx || d.ty != b.ty || d.a != b.a || d.b != b.b || d.c != b.c || d.d != b.d) {
  2338. var c = "matrix(" + (0 | 1E4 * b.a) / 1E4 + "," + (0 | 1E4 * b.b) / 1E4 + "," + (0 | 1E4 * b.c) / 1E4 + "," + (0 | 1E4 * b.d) / 1E4 + "," +
  2339. (0 | b.tx + 0.5);
  2340. a.transform = a.WebkitTransform = a.OTransform = a.msTransform = c + "," + (0 | b.ty + 0.5) + ")";
  2341. a.MozTransform = c + "px," + (0 | b.ty + 0.5) + "px)";
  2342. this._oldMtx = d ? d.copy(b) : b.clone()
  2343. }
  2344. }
  2345. }
  2346. };
  2347. createjs.DOMElement = c
  2348. })();
  2349. this.createjs = this.createjs || {};
  2350. (function() {
  2351. var c = function() {
  2352. this.initialize()
  2353. }, b = c.prototype;
  2354. b.initialize = function() {
  2355. };
  2356. b.getBounds = function() {
  2357. return null
  2358. };
  2359. b.applyFilter = function() {
  2360. };
  2361. b.toString = function() {
  2362. return"[Filter]"
  2363. };
  2364. b.clone = function() {
  2365. return new c
  2366. };
  2367. createjs.Filter = c
  2368. })();
  2369. this.createjs = this.createjs || {};
  2370. (function() {
  2371. var c = function(a, b, d) {
  2372. this.initialize(a, b, d)
  2373. }, b = c.prototype = new createjs.Filter;
  2374. b.initialize = function(a, b, d) {
  2375. (isNaN(a) || 0 > a) && (a = 0);
  2376. this.blurX = 0 | a;
  2377. (isNaN(b) || 0 > b) && (b = 0);
  2378. this.blurY = 0 | b;
  2379. (isNaN(d) || 1 > d) && (d = 1);
  2380. this.quality = 0 | d
  2381. };
  2382. b.blurX = 0;
  2383. b.blurY = 0;
  2384. b.quality = 1;
  2385. b.mul_table = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285,
  2386. 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345,
  2387. 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1];
  2388. b.shg_table = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16,
  2389. 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17,
  2390. 16, 17, 16, 17, 16, 17, 9];
  2391. b.getBounds = function() {
  2392. var a = 0.5 * Math.pow(this.quality, 0.6);
  2393. return new createjs.Rectangle(-this.blurX * a, -this.blurY * a, 2 * this.blurX * a, 2 * this.blurY * a)
  2394. };
  2395. b.applyFilter = function(a, b, d, c, e, f, h, l) {
  2396. f = f || a;
  2397. null == h && (h = b);
  2398. null == l && (l = d);
  2399. try {
  2400. var m = a.getImageData(b, d, c, e)
  2401. } catch (n) {
  2402. return!1
  2403. }
  2404. a = this.blurX / 2;
  2405. if (isNaN(a) || 0 > a)
  2406. return!1;
  2407. a |= 0;
  2408. var p = this.blurY / 2;
  2409. if (isNaN(p) || 0 > p || (p |= 0, 0 == a && 0 == p))
  2410. return!1;
  2411. var r = this.quality;
  2412. (isNaN(r) || 1 > r) && (r = 1);
  2413. r |= 0;
  2414. 3 < r && (r = 3);
  2415. 1 > r && (r = 1);
  2416. var q, s, u, t, w, z, A, y, B,
  2417. H, I, J, v = m.data, F = a + a + 1;
  2418. t = p + p + 1;
  2419. var K = c - 1, G = e - 1, E = a + 1, D = p + 1, L = {r: 0, b: 0, g: 0, a: 0, next: null};
  2420. b = L;
  2421. for (q = 1; F > q; q++)
  2422. b = b.next = {r: 0, b: 0, g: 0, a: 0, next: null};
  2423. b.next = L;
  2424. d = F = {r: 0, b: 0, g: 0, a: 0, next: null};
  2425. for (q = 1; t > q; q++)
  2426. d = d.next = {r: 0, b: 0, g: 0, a: 0, next: null};
  2427. d.next = F;
  2428. for (q = null; 0 < r--; ) {
  2429. w = t = 0;
  2430. var x = this.mul_table[a], C = this.shg_table[a];
  2431. for (d = e; -1 < --d; ) {
  2432. z = E * (H = v[t]);
  2433. A = E * (I = v[t + 1]);
  2434. y = E * (J = v[t + 2]);
  2435. B = E * (u = v[t + 3]);
  2436. b = L;
  2437. for (q = E; - 1 < --q; )
  2438. b.r = H, b.g = I, b.b = J, b.a = u, b = b.next;
  2439. for (q = 1; E > q; q++)
  2440. s = t + ((q > K ? K : q) << 2), z += b.r = v[s], A += b.g = v[s +
  2441. 1], y += b.b = v[s + 2], B += b.a = v[s + 3], b = b.next;
  2442. q = L;
  2443. for (b = 0; c > b; b++)
  2444. v[t++] = z * x >>> C, v[t++] = A * x >>> C, v[t++] = y * x >>> C, v[t++] = B * x >>> C, s = w + ((s = b + a + 1) < K ? s : K) << 2, z -= q.r - (q.r = v[s]), A -= q.g - (q.g = v[s + 1]), y -= q.b - (q.b = v[s + 2]), B -= q.a - (q.a = v[s + 3]), q = q.next;
  2445. w += c
  2446. }
  2447. x = this.mul_table[p];
  2448. C = this.shg_table[p];
  2449. for (b = 0; c > b; b++) {
  2450. t = b << 2;
  2451. z = D * (H = v[t]);
  2452. A = D * (I = v[t + 1]);
  2453. y = D * (J = v[t + 2]);
  2454. B = D * (u = v[t + 3]);
  2455. d = F;
  2456. for (q = 0; D > q; q++)
  2457. d.r = H, d.g = I, d.b = J, d.a = u, d = d.next;
  2458. u = c;
  2459. for (q = 1; p >= q; q++)
  2460. t = u + b << 2, z += d.r = v[t], A += d.g = v[t + 1], y += d.b = v[t + 2], B += d.a = v[t + 3], d = d.next,
  2461. G > q && (u += c);
  2462. if (t = b, q = F, 0 < r)
  2463. for (d = 0; e > d; d++)
  2464. s = t << 2, v[s + 3] = u = B * x >>> C, 0 < u ? (v[s] = z * x >>> C, v[s + 1] = A * x >>> C, v[s + 2] = y * x >>> C) : v[s] = v[s + 1] = v[s + 2] = 0, s = b + ((s = d + D) < G ? s : G) * c << 2, z -= q.r - (q.r = v[s]), A -= q.g - (q.g = v[s + 1]), y -= q.b - (q.b = v[s + 2]), B -= q.a - (q.a = v[s + 3]), q = q.next, t += c;
  2465. else
  2466. for (d = 0; e > d; d++)
  2467. s = t << 2, v[s + 3] = u = B * x >>> C, 0 < u ? (u = 255 / u, v[s] = (z * x >>> C) * u, v[s + 1] = (A * x >>> C) * u, v[s + 2] = (y * x >>> C) * u) : v[s] = v[s + 1] = v[s + 2] = 0, s = b + ((s = d + D) < G ? s : G) * c << 2, z -= q.r - (q.r = v[s]), A -= q.g - (q.g = v[s + 1]), y -= q.b - (q.b = v[s + 2]), B -= q.a - (q.a = v[s + 3]), q = q.next,
  2468. t += c
  2469. }
  2470. }
  2471. return f.putImageData(m, h, l), !0
  2472. };
  2473. b.clone = function() {
  2474. return new c(this.blurX, this.blurY, this.quality)
  2475. };
  2476. b.toString = function() {
  2477. return"[BlurFilter]"
  2478. };
  2479. createjs.BlurFilter = c
  2480. })();
  2481. this.createjs = this.createjs || {};
  2482. (function() {
  2483. var c = function(a) {
  2484. this.initialize(a)
  2485. }, b = c.prototype = new createjs.Filter;
  2486. b.initialize = function(a) {
  2487. this.alphaMap = a
  2488. };
  2489. b.alphaMap = null;
  2490. b._alphaMap = null;
  2491. b._mapData = null;
  2492. b.applyFilter = function(a, b, d, c, e, f, h, l) {
  2493. if (!this.alphaMap)
  2494. return!0;
  2495. if (!this._prepAlphaMap())
  2496. return!1;
  2497. f = f || a;
  2498. null == h && (h = b);
  2499. null == l && (l = d);
  2500. try {
  2501. var m = a.getImageData(b, d, c, e)
  2502. } catch (n) {
  2503. return!1
  2504. }
  2505. a = m.data;
  2506. b = this._mapData;
  2507. d = a.length;
  2508. for (c = 0; d > c; c += 4)
  2509. a[c + 3] = b[c] || 0;
  2510. return f.putImageData(m, h, l), !0
  2511. };
  2512. b.clone = function() {
  2513. return new c(this.alphaMap)
  2514. };
  2515. b.toString = function() {
  2516. return"[AlphaMapFilter]"
  2517. };
  2518. b._prepAlphaMap = function() {
  2519. if (!this.alphaMap)
  2520. return!1;
  2521. if (this.alphaMap == this._alphaMap && this._mapData)
  2522. return!0;
  2523. this._mapData = null;
  2524. var a, b = this._alphaMap = this.alphaMap, d = b;
  2525. b instanceof HTMLCanvasElement ? a = d.getContext("2d") : (d = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"), d.width = b.width, d.height = b.height, a = d.getContext("2d"), a.drawImage(b, 0, 0));
  2526. try {
  2527. var c = a.getImageData(0, 0, b.width, b.height)
  2528. } catch (e) {
  2529. return!1
  2530. }
  2531. return this._mapData =
  2532. c.data, !0
  2533. };
  2534. createjs.AlphaMapFilter = c
  2535. })();
  2536. this.createjs = this.createjs || {};
  2537. (function() {
  2538. var c = function(a) {
  2539. this.initialize(a)
  2540. }, b = c.prototype = new createjs.Filter;
  2541. b.initialize = function(a) {
  2542. this.mask = a
  2543. };
  2544. b.mask = null;
  2545. b.applyFilter = function(a, b, d, c, e, f, h, l) {
  2546. return this.mask ? (f = f || a, null == h && (h = b), null == l && (l = d), f.save(), f.globalCompositeOperation = "destination-in", f.drawImage(this.mask, h, l), f.restore(), !0) : !0
  2547. };
  2548. b.clone = function() {
  2549. return new c(this.mask)
  2550. };
  2551. b.toString = function() {
  2552. return"[AlphaMaskFilter]"
  2553. };
  2554. createjs.AlphaMaskFilter = c
  2555. })();
  2556. this.createjs = this.createjs || {};
  2557. (function() {
  2558. var c = function(a, b, d, c, e, f, h, l) {
  2559. this.initialize(a, b, d, c, e, f, h, l)
  2560. }, b = c.prototype = new createjs.Filter;
  2561. b.redMultiplier = 1;
  2562. b.greenMultiplier = 1;
  2563. b.blueMultiplier = 1;
  2564. b.alphaMultiplier = 1;
  2565. b.redOffset = 0;
  2566. b.greenOffset = 0;
  2567. b.blueOffset = 0;
  2568. b.alphaOffset = 0;
  2569. b.initialize = function(a, b, d, c, e, f, h, l) {
  2570. this.redMultiplier = null != a ? a : 1;
  2571. this.greenMultiplier = null != b ? b : 1;
  2572. this.blueMultiplier = null != d ? d : 1;
  2573. this.alphaMultiplier = null != c ? c : 1;
  2574. this.redOffset = e || 0;
  2575. this.greenOffset = f || 0;
  2576. this.blueOffset = h || 0;
  2577. this.alphaOffset = l ||
  2578. 0
  2579. };
  2580. b.applyFilter = function(a, b, d, c, e, f, h, l) {
  2581. f = f || a;
  2582. null == h && (h = b);
  2583. null == l && (l = d);
  2584. try {
  2585. var m = a.getImageData(b, d, c, e)
  2586. } catch (n) {
  2587. return!1
  2588. }
  2589. a = m.data;
  2590. b = a.length;
  2591. for (d = 0; b > d; d += 4)
  2592. a[d] = a[d] * this.redMultiplier + this.redOffset, a[d + 1] = a[d + 1] * this.greenMultiplier + this.greenOffset, a[d + 2] = a[d + 2] * this.blueMultiplier + this.blueOffset, a[d + 3] = a[d + 3] * this.alphaMultiplier + this.alphaOffset;
  2593. return f.putImageData(m, h, l), !0
  2594. };
  2595. b.toString = function() {
  2596. return"[ColorFilter]"
  2597. };
  2598. b.clone = function() {
  2599. return new c(this.redMultiplier, this.greenMultiplier,
  2600. this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset)
  2601. };
  2602. createjs.ColorFilter = c
  2603. })();
  2604. this.createjs = this.createjs || {};
  2605. (function() {
  2606. var c = function(a, b, d, c) {
  2607. this.initialize(a, b, d, c)
  2608. }, b = c.prototype;
  2609. c.DELTA_INDEX = [0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11, 0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.2, 0.21, 0.22, 0.24, 0.25, 0.27, 0.28, 0.3, 0.32, 0.34, 0.36, 0.38, 0.4, 0.42, 0.44, 0.46, 0.48, 0.5, 0.53, 0.56, 0.59, 0.62, 0.65, 0.68, 0.71, 0.74, 0.77, 0.8, 0.83, 0.86, 0.89, 0.92, 0.95, 0.98, 1, 1.06, 1.12, 1.18, 1.24, 1.3, 1.36, 1.42, 1.48, 1.54, 1.6, 1.66, 1.72, 1.78, 1.84, 1.9, 1.96, 2, 2.12, 2.25, 2.37, 2.5, 2.62, 2.75, 2.87, 3, 3.2, 3.4, 3.6, 3.8, 4, 4.3, 4.7, 4.9, 5, 5.5, 6, 6.5, 6.8, 7, 7.3,
  2610. 7.5, 7.8, 8, 8.4, 8.7, 9, 9.4, 9.6, 9.8, 10];
  2611. c.IDENTITY_MATRIX = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
  2612. c.LENGTH = c.IDENTITY_MATRIX.length;
  2613. b.initialize = function(a, b, d, c) {
  2614. return this.reset(), this.adjustColor(a, b, d, c), this
  2615. };
  2616. b.reset = function() {
  2617. return this.copyMatrix(c.IDENTITY_MATRIX)
  2618. };
  2619. b.adjustColor = function(a, b, d, c) {
  2620. return this.adjustHue(c), this.adjustContrast(b), this.adjustBrightness(a), this.adjustSaturation(d)
  2621. };
  2622. b.adjustBrightness = function(a) {
  2623. return 0 == a || isNaN(a) ? this : (a = this._cleanValue(a, 255),
  2624. this._multiplyMatrix([1, 0, 0, 0, a, 0, 1, 0, 0, a, 0, 0, 1, 0, a, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this)
  2625. };
  2626. b.adjustContrast = function(a) {
  2627. if (0 == a || isNaN(a))
  2628. return this;
  2629. a = this._cleanValue(a, 100);
  2630. var b;
  2631. return 0 > a ? b = 127 + 127 * (a / 100) : (b = a % 1, b = 0 == b ? c.DELTA_INDEX[a] : c.DELTA_INDEX[a << 0] * (1 - b) + c.DELTA_INDEX[(a << 0) + 1] * b, b = 127 * b + 127), this._multiplyMatrix([b / 127, 0, 0, 0, 0.5 * (127 - b), 0, b / 127, 0, 0, 0.5 * (127 - b), 0, 0, b / 127, 0, 0.5 * (127 - b), 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this
  2632. };
  2633. b.adjustSaturation = function(a) {
  2634. if (0 == a || isNaN(a))
  2635. return this;
  2636. a = this._cleanValue(a,
  2637. 100);
  2638. a = 1 + (0 < a ? 3 * a / 100 : a / 100);
  2639. return this._multiplyMatrix([0.3086 * (1 - a) + a, 0.6094 * (1 - a), 0.082 * (1 - a), 0, 0, 0.3086 * (1 - a), 0.6094 * (1 - a) + a, 0.082 * (1 - a), 0, 0, 0.3086 * (1 - a), 0.6094 * (1 - a), 0.082 * (1 - a) + a, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this
  2640. };
  2641. b.adjustHue = function(a) {
  2642. if (0 == a || isNaN(a))
  2643. return this;
  2644. a = this._cleanValue(a, 180) / 180 * Math.PI;
  2645. var b = Math.cos(a);
  2646. a = Math.sin(a);
  2647. return this._multiplyMatrix([0.213 + 0.787 * b + -0.213 * a, 0.715 + -0.715 * b + -0.715 * a, 0.072 + -0.072 * b + 0.928 * a, 0, 0, 0.213 + -0.213 * b + 0.143 * a, 0.715 + b * (1 - 0.715) + 0.14 * a, 0.072 + -0.072 *
  2648. b + -0.283 * a, 0, 0, 0.213 + -0.213 * b + -0.787 * a, 0.715 + -0.715 * b + 0.715 * a, 0.072 + 0.928 * b + 0.072 * a, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this
  2649. };
  2650. b.concat = function(a) {
  2651. return a = this._fixMatrix(a), a.length != c.LENGTH ? this : (this._multiplyMatrix(a), this)
  2652. };
  2653. b.clone = function() {
  2654. return(new c).copyMatrix(this)
  2655. };
  2656. b.toArray = function() {
  2657. for (var a = [], b = 0, d = c.LENGTH; d > b; b++)
  2658. a[b] = this[b];
  2659. return a
  2660. };
  2661. b.copyMatrix = function(a) {
  2662. for (var b = c.LENGTH, d = 0; b > d; d++)
  2663. this[d] = a[d];
  2664. return this
  2665. };
  2666. b.toString = function() {
  2667. return"[ColorMatrix]"
  2668. };
  2669. b._multiplyMatrix = function(a) {
  2670. for (var b =
  2671. [], d = 0; 5 > d; d++) {
  2672. for (var c = 0; 5 > c; c++)
  2673. b[c] = this[c + 5 * d];
  2674. for (c = 0; 5 > c; c++) {
  2675. for (var e = 0, f = 0; 5 > f; f++)
  2676. e += a[c + 5 * f] * b[f];
  2677. this[c + 5 * d] = e
  2678. }
  2679. }
  2680. };
  2681. b._cleanValue = function(a, b) {
  2682. return Math.min(b, Math.max(-b, a))
  2683. };
  2684. b._fixMatrix = function(a) {
  2685. return a instanceof c && (a = a.toArray()), a.length < c.LENGTH ? a = a.slice(0, a.length).concat(c.IDENTITY_MATRIX.slice(a.length, c.LENGTH)) : a.length > c.LENGTH && (a = a.slice(0, c.LENGTH)), a
  2686. };
  2687. createjs.ColorMatrix = c
  2688. })();
  2689. this.createjs = this.createjs || {};
  2690. (function() {
  2691. var c = function(a) {
  2692. this.initialize(a)
  2693. }, b = c.prototype = new createjs.Filter;
  2694. b.matrix = null;
  2695. b.initialize = function(a) {
  2696. this.matrix = a
  2697. };
  2698. b.applyFilter = function(a, b, d, c, e, f, h, l) {
  2699. f = f || a;
  2700. null == h && (h = b);
  2701. null == l && (l = d);
  2702. try {
  2703. var m = a.getImageData(b, d, c, e)
  2704. } catch (n) {
  2705. return!1
  2706. }
  2707. var p, r, q, s;
  2708. a = m.data;
  2709. b = a.length;
  2710. p = this.matrix;
  2711. d = p[0];
  2712. c = p[1];
  2713. e = p[2];
  2714. for (var u = p[3], t = p[4], w = p[5], z = p[6], A = p[7], y = p[8], B = p[9], H = p[10], I = p[11], J = p[12], v = p[13], F = p[14], K = p[15], G = p[16], E = p[17], D = p[18], L = p[19], x = 0; b > x; x += 4)
  2715. p = a[x], r = a[x + 1], q =
  2716. a[x + 2], s = a[x + 3], a[x] = p * d + r * c + q * e + s * u + t, a[x + 1] = p * w + r * z + q * A + s * y + B, a[x + 2] = p * H + r * I + q * J + s * v + F, a[x + 3] = p * K + r * G + q * E + s * D + L;
  2717. return f.putImageData(m, h, l), !0
  2718. };
  2719. b.toString = function() {
  2720. return"[ColorMatrixFilter]"
  2721. };
  2722. b.clone = function() {
  2723. return new c(this.matrix)
  2724. };
  2725. createjs.ColorMatrixFilter = c
  2726. })();
  2727. this.createjs = this.createjs || {};
  2728. (function() {
  2729. var c = function() {
  2730. throw"Touch cannot be instantiated";
  2731. };
  2732. c.isSupported = function() {
  2733. return"ontouchstart"in window || window.navigator.msPointerEnabled && 0 < window.navigator.msMaxTouchPoints || window.navigator.pointerEnabled && 0 < window.navigator.maxTouchPoints
  2734. };
  2735. c.enable = function(b, a, k) {
  2736. return b && b.canvas && c.isSupported() ? (b.__touch = {pointers: {}, multitouch: !a, preventDefault: !k, count: 0}, "ontouchstart"in window ? c._IOS_enable(b) : (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && c._IE_enable(b),
  2737. !0) : !1
  2738. };
  2739. c.disable = function(b) {
  2740. b && ("ontouchstart"in window ? c._IOS_disable(b) : (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && c._IE_disable(b))
  2741. };
  2742. c._IOS_enable = function(b) {
  2743. var a = b.canvas, k = b.__touch.f = function(a) {
  2744. c._IOS_handleEvent(b, a)
  2745. };
  2746. a.addEventListener("touchstart", k, !1);
  2747. a.addEventListener("touchmove", k, !1);
  2748. a.addEventListener("touchend", k, !1);
  2749. a.addEventListener("touchcancel", k, !1)
  2750. };
  2751. c._IOS_disable = function(b) {
  2752. var a = b.canvas;
  2753. a && (b = b.__touch.f, a.removeEventListener("touchstart",
  2754. b, !1), a.removeEventListener("touchmove", b, !1), a.removeEventListener("touchend", b, !1), a.removeEventListener("touchcancel", b, !1))
  2755. };
  2756. c._IOS_handleEvent = function(b, a) {
  2757. if (b) {
  2758. b.__touch.preventDefault && a.preventDefault && a.preventDefault();
  2759. for (var c = a.changedTouches, d = a.type, g = 0, e = c.length; e > g; g++) {
  2760. var f = c[g], h = f.identifier;
  2761. f.target == b.canvas && ("touchstart" == d ? this._handleStart(b, h, a, f.pageX, f.pageY) : "touchmove" == d ? this._handleMove(b, h, a, f.pageX, f.pageY) : ("touchend" == d || "touchcancel" == d) && this._handleEnd(b,
  2762. h, a))
  2763. }
  2764. }
  2765. };
  2766. c._IE_enable = function(b) {
  2767. var a = b.canvas, k = b.__touch.f = function(a) {
  2768. c._IE_handleEvent(b, a)
  2769. };
  2770. void 0 === window.navigator.pointerEnabled ? (a.addEventListener("MSPointerDown", k, !1), window.addEventListener("MSPointerMove", k, !1), window.addEventListener("MSPointerUp", k, !1), window.addEventListener("MSPointerCancel", k, !1), b.__touch.preventDefault && (a.style.msTouchAction = "none")) : (a.addEventListener("pointerdown", k, !1), window.addEventListener("pointermove", k, !1), window.addEventListener("pointerup", k, !1),
  2771. window.addEventListener("pointercancel", k, !1), b.__touch.preventDefault && (a.style.touchAction = "none"));
  2772. b.__touch.activeIDs = {}
  2773. };
  2774. c._IE_disable = function(b) {
  2775. var a = b.__touch.f;
  2776. void 0 === window.navigator.pointerEnabled ? (window.removeEventListener("MSPointerMove", a, !1), window.removeEventListener("MSPointerUp", a, !1), window.removeEventListener("MSPointerCancel", a, !1), b.canvas && b.canvas.removeEventListener("MSPointerDown", a, !1)) : (window.removeEventListener("pointermove", a, !1), window.removeEventListener("pointerup",
  2777. a, !1), window.removeEventListener("pointercancel", a, !1), b.canvas && b.canvas.removeEventListener("pointerdown", a, !1))
  2778. };
  2779. c._IE_handleEvent = function(b, a) {
  2780. if (b) {
  2781. b.__touch.preventDefault && a.preventDefault && a.preventDefault();
  2782. var c = a.type, d = a.pointerId, g = b.__touch.activeIDs;
  2783. "MSPointerDown" == c || "pointerdown" == c ? a.srcElement == b.canvas && (g[d] = !0, this._handleStart(b, d, a, a.pageX, a.pageY)) : g[d] && ("MSPointerMove" == c || "pointermove" == c ? this._handleMove(b, d, a, a.pageX, a.pageY) : ("MSPointerUp" == c || "MSPointerCancel" == c ||
  2784. "pointerup" == c || "pointercancel" == c) && (delete g[d], this._handleEnd(b, d, a)))
  2785. }
  2786. };
  2787. c._handleStart = function(b, a, c, d, g) {
  2788. var e = b.__touch;
  2789. if (e.multitouch || !e.count) {
  2790. var f = e.pointers;
  2791. f[a] || (f[a] = !0, e.count++, b._handlePointerDown(a, c, d, g))
  2792. }
  2793. };
  2794. c._handleMove = function(b, a, c, d, g) {
  2795. b.__touch.pointers[a] && b._handlePointerMove(a, c, d, g)
  2796. };
  2797. c._handleEnd = function(b, a, c) {
  2798. var d = b.__touch, g = d.pointers;
  2799. g[a] && (d.count--, b._handlePointerUp(a, c, !0), delete g[a])
  2800. };
  2801. createjs.Touch = c
  2802. })();
  2803. this.createjs = this.createjs || {};
  2804. (function() {
  2805. var c = createjs.EaselJS = createjs.EaselJS || {};
  2806. c.version = "NEXT";
  2807. c.buildDate = "Thu, 12 Dec 2013 23:37:07 GMT"
  2808. })();
  2809. this.createjs = this.createjs || {};
  2810. (function() {
  2811. var c = createjs.PreloadJS = createjs.PreloadJS || {};
  2812. c.version = "NEXT";
  2813. c.buildDate = "Thu, 12 Dec 2013 23:37:07 GMT"
  2814. })();
  2815. this.createjs = this.createjs || {};
  2816. (function() {
  2817. createjs.proxy = function(c, b) {
  2818. var a = Array.prototype.slice.call(arguments, 2);
  2819. return function() {
  2820. return c.apply(b, Array.prototype.slice.call(arguments, 0).concat(a))
  2821. }
  2822. }
  2823. })();
  2824. this.createjs = this.createjs || {};
  2825. (function() {
  2826. var c = function() {
  2827. this.init()
  2828. };
  2829. c.prototype = new createjs.EventDispatcher;
  2830. var b = c.prototype;
  2831. c.FILE_PATTERN = /^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?)|(.{0,2}\/{1}))?([/.]*?(?:[^?]+)?\/)?((?:[^/?]+)\.(\w+))(?:\?(\S+)?)?$/;
  2832. c.PATH_PATTERN = /^(?:(\w+:)\/{2})|(.{0,2}\/{1})?([/.]*?(?:[^?]+)?\/?)?$/;
  2833. b.loaded = !1;
  2834. b.canceled = !1;
  2835. b.progress = 0;
  2836. b._item = null;
  2837. b.getItem = function() {
  2838. return this._item
  2839. };
  2840. b.init = function() {
  2841. };
  2842. b.load = function() {
  2843. };
  2844. b.close = function() {
  2845. };
  2846. b._sendLoadStart = function() {
  2847. this._isCanceled() || this.dispatchEvent("loadstart")
  2848. };
  2849. b._sendProgress = function(a) {
  2850. if (!this._isCanceled()) {
  2851. var b = null;
  2852. "number" == typeof a ? (this.progress = a, b = new createjs.Event("progress"), b.loaded = this.progress, b.total = 1) : (b = a, this.progress = a.loaded / a.total, (isNaN(this.progress) || 1 / 0 == this.progress) && (this.progress = 0));
  2853. b.progress = this.progress;
  2854. this.hasEventListener("progress") && this.dispatchEvent(b)
  2855. }
  2856. };
  2857. b._sendComplete = function() {
  2858. this._isCanceled() || this.dispatchEvent("complete")
  2859. };
  2860. b._sendError = function(a) {
  2861. !this._isCanceled() && this.hasEventListener("error") &&
  2862. (null == a && (a = new createjs.Event("error")), this.dispatchEvent(a))
  2863. };
  2864. b._isCanceled = function() {
  2865. return null == window.createjs || this.canceled ? !0 : !1
  2866. };
  2867. b._parseURI = function(a) {
  2868. return a ? a.match(c.FILE_PATTERN) : null
  2869. };
  2870. b._parsePath = function(a) {
  2871. return a ? a.match(c.PATH_PATTERN) : null
  2872. };
  2873. b._formatQueryString = function(a, b) {
  2874. if (null == a)
  2875. throw Error("You must specify data.");
  2876. var d = [], c;
  2877. for (c in a)
  2878. d.push(c + "=" + escape(a[c]));
  2879. return b && (d = d.concat(b)), d.join("&")
  2880. };
  2881. b.buildPath = function(a, b) {
  2882. if (null == b)
  2883. return a;
  2884. var d = [], c = a.indexOf("?");
  2885. if (-1 != c)
  2886. var e = a.slice(c + 1), d = d.concat(e.split("&"));
  2887. return-1 != c ? a.slice(0, c) + "?" + this._formatQueryString(b, d) : a + "?" + this._formatQueryString(b, d)
  2888. };
  2889. b._isCrossDomain = function(a) {
  2890. var b = document.createElement("a");
  2891. b.href = a.src;
  2892. a = document.createElement("a");
  2893. a.href = location.href;
  2894. return"" != b.hostname && (b.port != a.port || b.protocol != a.protocol || b.hostname != a.hostname)
  2895. };
  2896. b._isLocal = function(a) {
  2897. var b = document.createElement("a");
  2898. return b.href = a.src, "" == b.hostname && "file:" == b.protocol
  2899. };
  2900. b.toString = function() {
  2901. return"[PreloadJS AbstractLoader]"
  2902. };
  2903. createjs.AbstractLoader = c
  2904. })();
  2905. this.createjs = this.createjs || {};
  2906. (function() {
  2907. var c = function(a, b, c) {
  2908. this.init(a, b, c)
  2909. }, b = c.prototype = new createjs.AbstractLoader;
  2910. c.loadTimeout = 8E3;
  2911. c.LOAD_TIMEOUT = 0;
  2912. c.BINARY = "binary";
  2913. c.CSS = "css";
  2914. c.IMAGE = "image";
  2915. c.JAVASCRIPT = "javascript";
  2916. c.JSON = "json";
  2917. c.JSONP = "jsonp";
  2918. c.MANIFEST = "manifest";
  2919. c.SOUND = "sound";
  2920. c.SVG = "svg";
  2921. c.TEXT = "text";
  2922. c.XML = "xml";
  2923. c.POST = "POST";
  2924. c.GET = "GET";
  2925. b._basePath = null;
  2926. b._crossOrigin = "";
  2927. b.useXHR = !0;
  2928. b.stopOnError = !1;
  2929. b.maintainScriptOrder = !0;
  2930. b.next = null;
  2931. b._typeCallbacks = null;
  2932. b._extensionCallbacks = null;
  2933. b._loadStartWasDispatched =
  2934. !1;
  2935. b._maxConnections = 1;
  2936. b._currentlyLoadingScript = null;
  2937. b._currentLoads = null;
  2938. b._loadQueue = null;
  2939. b._loadQueueBackup = null;
  2940. b._loadItemsById = null;
  2941. b._loadItemsBySrc = null;
  2942. b._loadedResults = null;
  2943. b._loadedRawResults = null;
  2944. b._numItems = 0;
  2945. b._numItemsLoaded = 0;
  2946. b._scriptOrder = null;
  2947. b._loadedScripts = null;
  2948. b.init = function(a, b, c) {
  2949. this._numItems = this._numItemsLoaded = 0;
  2950. this._loadStartWasDispatched = this._paused = !1;
  2951. this._currentLoads = [];
  2952. this._loadQueue = [];
  2953. this._loadQueueBackup = [];
  2954. this._scriptOrder = [];
  2955. this._loadedScripts = [];
  2956. this._loadItemsById = {};
  2957. this._loadItemsBySrc = {};
  2958. this._loadedResults = {};
  2959. this._loadedRawResults = {};
  2960. this._typeCallbacks = {};
  2961. this._extensionCallbacks = {};
  2962. this._basePath = b;
  2963. this.setUseXHR(a);
  2964. this._crossOrigin = !0 === c ? "Anonymous" : !1 === c || null == c ? "" : c
  2965. };
  2966. b.setUseXHR = function(a) {
  2967. return this.useXHR = 0 != a && null != window.XMLHttpRequest, this.useXHR
  2968. };
  2969. b.removeAll = function() {
  2970. this.remove()
  2971. };
  2972. b.remove = function(a) {
  2973. var b = null;
  2974. if (!a || a instanceof Array)
  2975. if (a)
  2976. b = a;
  2977. else {
  2978. if (0 < arguments.length)
  2979. return
  2980. }
  2981. else
  2982. b = [a];
  2983. var c = !1;
  2984. if (b) {
  2985. for (; b.length; ) {
  2986. for (var e =
  2987. b.pop(), f = this.getResult(e), h = this._loadQueue.length - 1; 0 <= h; h--)
  2988. if (l = this._loadQueue[h].getItem(), l.id == e || l.src == e) {
  2989. this._loadQueue.splice(h, 1)[0].cancel();
  2990. break
  2991. }
  2992. for (h = this._loadQueueBackup.length - 1; 0 <= h; h--)
  2993. if (l = this._loadQueueBackup[h].getItem(), l.id == e || l.src == e) {
  2994. this._loadQueueBackup.splice(h, 1)[0].cancel();
  2995. break
  2996. }
  2997. if (f)
  2998. delete this._loadItemsById[f.id], delete this._loadItemsBySrc[f.src], this._disposeItem(f);
  2999. else
  3000. for (var h = this._currentLoads.length - 1; 0 <= h; h--) {
  3001. var l = this._currentLoads[h].getItem();
  3002. if (l.id == e || l.src == e) {
  3003. this._currentLoads.splice(h, 1)[0].cancel();
  3004. c = !0;
  3005. break
  3006. }
  3007. }
  3008. }
  3009. c && this._loadNext()
  3010. } else {
  3011. this.close();
  3012. for (e in this._loadItemsById)
  3013. this._disposeItem(this._loadItemsById[e]);
  3014. this.init(this.useXHR)
  3015. }
  3016. };
  3017. b.reset = function() {
  3018. this.close();
  3019. for (var a in this._loadItemsById)
  3020. this._disposeItem(this._loadItemsById[a]);
  3021. a = [];
  3022. for (var b = 0, c = this._loadQueueBackup.length; c > b; b++)
  3023. a.push(this._loadQueueBackup[b].getItem());
  3024. this.loadManifest(a, !1)
  3025. };
  3026. c.isBinary = function(a) {
  3027. switch (a) {
  3028. case createjs.LoadQueue.IMAGE:
  3029. case createjs.LoadQueue.BINARY:
  3030. return!0;
  3031. default:
  3032. return!1
  3033. }
  3034. };
  3035. c.isText = function(a) {
  3036. switch (a) {
  3037. case createjs.LoadQueue.TEXT:
  3038. case createjs.LoadQueue.JSON:
  3039. case createjs.LoadQueue.MANIFEST:
  3040. case createjs.LoadQueue.XML:
  3041. case createjs.LoadQueue.HTML:
  3042. case createjs.LoadQueue.CSS:
  3043. case createjs.LoadQueue.SVG:
  3044. case createjs.LoadQueue.JAVASCRIPT:
  3045. return!0;
  3046. default:
  3047. return!1
  3048. }
  3049. };
  3050. b.installPlugin = function(a) {
  3051. if (null != a && null != a.getPreloadHandlers) {
  3052. var b = a.getPreloadHandlers();
  3053. if (b.scope = a, null != b.types) {
  3054. a = 0;
  3055. for (var c = b.types.length; c > a; a++)
  3056. this._typeCallbacks[b.types[a]] =
  3057. b
  3058. }
  3059. if (null != b.extensions)
  3060. for (a = 0, c = b.extensions.length; c > a; a++)
  3061. this._extensionCallbacks[b.extensions[a]] = b
  3062. }
  3063. };
  3064. b.setMaxConnections = function(a) {
  3065. this._maxConnections = a;
  3066. !this._paused && 0 < this._loadQueue.length && this._loadNext()
  3067. };
  3068. b.loadFile = function(a, b, c) {
  3069. if (null == a)
  3070. return a = new createjs.Event("error"), a.text = "PRELOAD_NO_FILE", this._sendError(a), void 0;
  3071. this._addItem(a, null, c);
  3072. !1 !== b ? this.setPaused(!1) : this.setPaused(!0)
  3073. };
  3074. b.loadManifest = function(a, b, g) {
  3075. var e = null, f = null;
  3076. if (a instanceof Array) {
  3077. if (0 == a.length)
  3078. return e =
  3079. new createjs.Event("error"), e.text = "PRELOAD_MANIFEST_EMPTY", this._sendError(e), void 0;
  3080. e = a
  3081. } else if ("string" == typeof a)
  3082. e = [{src: a, type: c.MANIFEST}];
  3083. else {
  3084. if ("object" != typeof a)
  3085. return e = new createjs.Event("error"), e.text = "PRELOAD_MANIFEST_NULL", this._sendError(e), void 0;
  3086. void 0 !== a.src ? (null == a.type ? a.type = c.MANIFEST : a.type != c.MANIFEST && (e = new createjs.Event("error"), e.text = "PRELOAD_MANIFEST_ERROR", this._sendError(e)), e = [a]) : void 0 !== a.manifest && (e = a.manifest, f = a.path)
  3087. }
  3088. a = 0;
  3089. for (var h = e.length; h > a; a++)
  3090. this._addItem(e[a],
  3091. f, g);
  3092. !1 !== b ? this.setPaused(!1) : this.setPaused(!0)
  3093. };
  3094. b.load = function() {
  3095. this.setPaused(!1)
  3096. };
  3097. b.getItem = function(a) {
  3098. return this._loadItemsById[a] || this._loadItemsBySrc[a]
  3099. };
  3100. b.getResult = function(a, b) {
  3101. var c = this._loadItemsById[a] || this._loadItemsBySrc[a];
  3102. if (null == c)
  3103. return null;
  3104. c = c.id;
  3105. return b && this._loadedRawResults[c] ? this._loadedRawResults[c] : this._loadedResults[c]
  3106. };
  3107. b.setPaused = function(a) {
  3108. (this._paused = a) || this._loadNext()
  3109. };
  3110. b.close = function() {
  3111. for (; this._currentLoads.length; )
  3112. this._currentLoads.pop().cancel();
  3113. this._scriptOrder.length = 0;
  3114. this._loadedScripts.length = 0;
  3115. this.loadStartWasDispatched = !1
  3116. };
  3117. b._addItem = function(a, b, c) {
  3118. a = this._createLoadItem(a, b, c);
  3119. null != a && (b = this._createLoader(a), null != b && (this._loadQueue.push(b), this._loadQueueBackup.push(b), this._numItems++, this._updateProgress(), this.maintainScriptOrder && a.type == createjs.LoadQueue.JAVASCRIPT && b instanceof createjs.XHRLoader && (this._scriptOrder.push(a), this._loadedScripts.push(null))))
  3120. };
  3121. b._createLoadItem = function(a, b, c) {
  3122. var e = null;
  3123. switch (typeof a) {
  3124. case "string":
  3125. e =
  3126. {src: a};
  3127. break;
  3128. case "object":
  3129. e = window.HTMLAudioElement && a instanceof window.HTMLAudioElement ? {tag: a, src: e.tag.src, type: createjs.LoadQueue.SOUND} : a;
  3130. break;
  3131. default:
  3132. return null
  3133. }
  3134. a = this._parseURI(e.src);
  3135. null != a && (e.ext = a[6]);
  3136. null == e.type && (e.type = this._getTypeByExtension(e.ext));
  3137. var f = "";
  3138. c = c || this._basePath;
  3139. var h = e.src;
  3140. if (a && null == a[1] && null == a[3])
  3141. if (b) {
  3142. var f = b, l = this._parsePath(b), h = b + h;
  3143. null != c && l && null == l[1] && null == l[2] && (f = c + f)
  3144. } else
  3145. null != c && (f = c);
  3146. if (e.src = f + e.src, e.path = f, (e.type == createjs.LoadQueue.JSON ||
  3147. e.type == createjs.LoadQueue.MANIFEST) && (e._loadAsJSONP = null != e.callback), e.type == createjs.LoadQueue.JSONP && null == e.callback)
  3148. throw Error("callback is required for loading JSONP requests.");
  3149. void 0 !== e.tag && null !== e.tag || (e.tag = this._createTag(e));
  3150. void 0 !== e.id && null !== e.id && "" !== e.id || (e.id = h);
  3151. if (b = this._typeCallbacks[e.type] || this._extensionCallbacks[e.ext]) {
  3152. b = b.callback.call(b.scope, e.src, e.type, e.id, e.data, f, this);
  3153. if (!1 === b)
  3154. return null;
  3155. !0 === b || (null != b.src && (e.src = b.src), null != b.id && (e.id = b.id), null !=
  3156. b.tag && (e.tag = b.tag), null != b.completeHandler && (e.completeHandler = b.completeHandler), b.type && (e.type = b.type), a = this._parseURI(e.src), null != a && null != a[6] && (e.ext = a[6].toLowerCase()))
  3157. }
  3158. return this._loadItemsById[e.id] = e, this._loadItemsBySrc[e.src] = e, e
  3159. };
  3160. b._createLoader = function(a) {
  3161. var b = this.useXHR;
  3162. switch (a.type) {
  3163. case createjs.LoadQueue.JSON:
  3164. case createjs.LoadQueue.MANIFEST:
  3165. b = !a._loadAsJSONP;
  3166. break;
  3167. case createjs.LoadQueue.XML:
  3168. case createjs.LoadQueue.TEXT:
  3169. b = !0;
  3170. break;
  3171. case createjs.LoadQueue.SOUND:
  3172. case createjs.LoadQueue.JSONP:
  3173. b =
  3174. !1;
  3175. break;
  3176. case null:
  3177. return null
  3178. }
  3179. return b ? new createjs.XHRLoader(a, this._crossOrigin) : new createjs.TagLoader(a)
  3180. };
  3181. b._loadNext = function() {
  3182. if (!this._paused) {
  3183. this._loadStartWasDispatched || (this._sendLoadStart(), this._loadStartWasDispatched = !0);
  3184. this._numItems == this._numItemsLoaded ? (this.loaded = !0, this._sendComplete(), this.next && this.next.load && this.next.load()) : this.loaded = !1;
  3185. for (var a = 0; a < this._loadQueue.length && !(this._currentLoads.length >= this._maxConnections); a++) {
  3186. var b = this._loadQueue[a];
  3187. if (this.maintainScriptOrder &&
  3188. b instanceof createjs.TagLoader && b.getItem().type == createjs.LoadQueue.JAVASCRIPT) {
  3189. if (this._currentlyLoadingScript)
  3190. continue;
  3191. this._currentlyLoadingScript = !0
  3192. }
  3193. this._loadQueue.splice(a, 1);
  3194. a--;
  3195. this._loadItem(b)
  3196. }
  3197. }
  3198. };
  3199. b._loadItem = function(a) {
  3200. a.on("progress", this._handleProgress, this);
  3201. a.on("complete", this._handleFileComplete, this);
  3202. a.on("error", this._handleFileError, this);
  3203. this._currentLoads.push(a);
  3204. this._sendFileStart(a.getItem());
  3205. a.load()
  3206. };
  3207. b._handleFileError = function(a) {
  3208. a = a.target;
  3209. this._numItemsLoaded++;
  3210. this._updateProgress();
  3211. var b = new createjs.Event("error");
  3212. b.text = "FILE_LOAD_ERROR";
  3213. b.item = a.getItem();
  3214. this._sendError(b);
  3215. this.stopOnError || (this._removeLoadItem(a), this._loadNext())
  3216. };
  3217. b._handleFileComplete = function(a) {
  3218. a = a.target;
  3219. var b = a.getItem();
  3220. if (this._loadedResults[b.id] = a.getResult(), a instanceof createjs.XHRLoader && (this._loadedRawResults[b.id] = a.getResult(!0)), this._removeLoadItem(a), this.maintainScriptOrder && b.type == createjs.LoadQueue.JAVASCRIPT) {
  3221. if (!(a instanceof createjs.TagLoader))
  3222. return this._loadedScripts[createjs.indexOf(this._scriptOrder,
  3223. b)] = b, this._checkScriptLoadOrder(a), void 0;
  3224. this._currentlyLoadingScript = !1
  3225. }
  3226. if (delete b._loadAsJSONP, b.type == createjs.LoadQueue.MANIFEST) {
  3227. var c = a.getResult();
  3228. null != c && void 0 !== c.manifest && this.loadManifest(c, !0)
  3229. }
  3230. this._processFinishedLoad(b, a)
  3231. };
  3232. b._processFinishedLoad = function(a, b) {
  3233. this._numItemsLoaded++;
  3234. this._updateProgress();
  3235. this._sendFileComplete(a, b);
  3236. this._loadNext()
  3237. };
  3238. b._checkScriptLoadOrder = function() {
  3239. for (var a = this._loadedScripts.length, b = 0; a > b; b++) {
  3240. var c = this._loadedScripts[b];
  3241. if (null === c)
  3242. break;
  3243. if (!0 !== c) {
  3244. var e = this._loadedResults[c.id];
  3245. (document.body || document.getElementsByTagName("body")[0]).appendChild(e);
  3246. this._processFinishedLoad(c);
  3247. this._loadedScripts[b] = !0
  3248. }
  3249. }
  3250. };
  3251. b._removeLoadItem = function(a) {
  3252. for (var b = this._currentLoads.length, c = 0; b > c; c++)
  3253. if (this._currentLoads[c] == a) {
  3254. this._currentLoads.splice(c, 1);
  3255. break
  3256. }
  3257. };
  3258. b._handleProgress = function(a) {
  3259. a = a.target;
  3260. this._sendFileProgress(a.getItem(), a.progress);
  3261. this._updateProgress()
  3262. };
  3263. b._updateProgress = function() {
  3264. var a = this._numItemsLoaded / this._numItems,
  3265. b = this._numItems - this._numItemsLoaded;
  3266. if (0 < b) {
  3267. for (var c = 0, e = 0, f = this._currentLoads.length; f > e; e++)
  3268. c += this._currentLoads[e].progress;
  3269. a += c / b * (b / this._numItems)
  3270. }
  3271. this._sendProgress(a)
  3272. };
  3273. b._disposeItem = function(a) {
  3274. delete this._loadedResults[a.id];
  3275. delete this._loadedRawResults[a.id];
  3276. delete this._loadItemsById[a.id];
  3277. delete this._loadItemsBySrc[a.src]
  3278. };
  3279. b._createTag = function(a) {
  3280. var b = null;
  3281. switch (a.type) {
  3282. case createjs.LoadQueue.IMAGE:
  3283. return b = document.createElement("img"), "" == this._crossOrigin || this._isLocal(a) ||
  3284. (b.crossOrigin = this._crossOrigin), b;
  3285. case createjs.LoadQueue.SOUND:
  3286. return b = document.createElement("audio"), b.autoplay = !1, b;
  3287. case createjs.LoadQueue.JSON:
  3288. case createjs.LoadQueue.JSONP:
  3289. case createjs.LoadQueue.JAVASCRIPT:
  3290. case createjs.LoadQueue.MANIFEST:
  3291. return b = document.createElement("script"), b.type = "text/javascript", b;
  3292. case createjs.LoadQueue.CSS:
  3293. return b = this.useXHR ? document.createElement("style") : document.createElement("link"), b.rel = "stylesheet", b.type = "text/css", b;
  3294. case createjs.LoadQueue.SVG:
  3295. return this.useXHR ?
  3296. b = document.createElement("svg") : (b = document.createElement("object"), b.type = "image/svg+xml"), b
  3297. }
  3298. return null
  3299. };
  3300. b._getTypeByExtension = function(a) {
  3301. if (null == a)
  3302. return createjs.LoadQueue.TEXT;
  3303. switch (a.toLowerCase()) {
  3304. case "jpeg":
  3305. case "jpg":
  3306. case "gif":
  3307. case "png":
  3308. case "webp":
  3309. case "bmp":
  3310. return createjs.LoadQueue.IMAGE;
  3311. case "ogg":
  3312. case "mp3":
  3313. case "wav":
  3314. return createjs.LoadQueue.SOUND;
  3315. case "json":
  3316. return createjs.LoadQueue.JSON;
  3317. case "xml":
  3318. return createjs.LoadQueue.XML;
  3319. case "css":
  3320. return createjs.LoadQueue.CSS;
  3321. case "js":
  3322. return createjs.LoadQueue.JAVASCRIPT;
  3323. case "svg":
  3324. return createjs.LoadQueue.SVG;
  3325. default:
  3326. return createjs.LoadQueue.TEXT
  3327. }
  3328. };
  3329. b._sendFileProgress = function(a, b) {
  3330. if (this._isCanceled())
  3331. return this._cleanUp(), void 0;
  3332. if (this.hasEventListener("fileprogress")) {
  3333. var c = new createjs.Event("fileprogress");
  3334. c.progress = b;
  3335. c.loaded = b;
  3336. c.total = 1;
  3337. c.item = a;
  3338. this.dispatchEvent(c)
  3339. }
  3340. };
  3341. b._sendFileComplete = function(a, b) {
  3342. if (!this._isCanceled()) {
  3343. var c = new createjs.Event("fileload");
  3344. c.loader = b;
  3345. c.item = a;
  3346. c.result = this._loadedResults[a.id];
  3347. c.rawResult = this._loadedRawResults[a.id];
  3348. a.completeHandler && a.completeHandler(c);
  3349. this.hasEventListener("fileload") && this.dispatchEvent(c)
  3350. }
  3351. };
  3352. b._sendFileStart = function(a) {
  3353. var b = new createjs.Event("filestart");
  3354. b.item = a;
  3355. this.hasEventListener("filestart") && this.dispatchEvent(b)
  3356. };
  3357. b.toString = function() {
  3358. return"[PreloadJS LoadQueue]"
  3359. };
  3360. createjs.LoadQueue = c;
  3361. var a = function() {
  3362. };
  3363. a.init = function() {
  3364. var b = navigator.userAgent;
  3365. a.isFirefox = -1 < b.indexOf("Firefox");
  3366. a.isOpera = null != window.opera;
  3367. a.isChrome = -1 < b.indexOf("Chrome");
  3368. a.isIOS = -1 < b.indexOf("iPod") || -1 <
  3369. b.indexOf("iPhone") || -1 < b.indexOf("iPad")
  3370. };
  3371. a.init();
  3372. createjs.LoadQueue.BrowserDetect = a
  3373. })();
  3374. this.createjs = this.createjs || {};
  3375. (function() {
  3376. var c = function(a) {
  3377. this.init(a)
  3378. }, b = c.prototype = new createjs.AbstractLoader;
  3379. b._loadTimeout = null;
  3380. b._tagCompleteProxy = null;
  3381. b._isAudio = !1;
  3382. b._tag = null;
  3383. b._jsonResult = null;
  3384. b.init = function(a) {
  3385. this._item = a;
  3386. this._tag = a.tag;
  3387. this._isAudio = window.HTMLAudioElement && a.tag instanceof window.HTMLAudioElement;
  3388. this._tagCompleteProxy = createjs.proxy(this._handleLoad, this)
  3389. };
  3390. b.getResult = function() {
  3391. return this._item.type == createjs.LoadQueue.JSONP || this._item.type == createjs.LoadQueue.MANIFEST ? this._jsonResult :
  3392. this._tag
  3393. };
  3394. b.cancel = function() {
  3395. this.canceled = !0;
  3396. this._clean()
  3397. };
  3398. b.load = function() {
  3399. var a = this._item, b = this._tag;
  3400. clearTimeout(this._loadTimeout);
  3401. var c = createjs.LoadQueue.LOAD_TIMEOUT;
  3402. 0 == c && (c = createjs.LoadQueue.loadTimeout);
  3403. this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), c);
  3404. this._isAudio && (b.src = null, b.preload = "auto");
  3405. b.onerror = createjs.proxy(this._handleError, this);
  3406. this._isAudio ? (b.onstalled = createjs.proxy(this._handleStalled, this), b.addEventListener("canplaythrough", this._tagCompleteProxy,
  3407. !1)) : (b.onload = createjs.proxy(this._handleLoad, this), b.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this));
  3408. c = this.buildPath(a.src, a.values);
  3409. switch (a.type) {
  3410. case createjs.LoadQueue.CSS:
  3411. b.href = c;
  3412. break;
  3413. case createjs.LoadQueue.SVG:
  3414. b.data = c;
  3415. break;
  3416. default:
  3417. b.src = c
  3418. }
  3419. if (a.type == createjs.LoadQueue.JSONP || a.type == createjs.LoadQueue.JSON || a.type == createjs.LoadQueue.MANIFEST) {
  3420. if (null == a.callback)
  3421. throw Error("callback is required for loading JSONP requests.");
  3422. if (null != window[a.callback])
  3423. throw Error('JSONP callback "' +
  3424. a.callback + '" already exists on window. You need to specify a different callback. Or re-name the current one.');
  3425. window[a.callback] = createjs.proxy(this._handleJSONPLoad, this)
  3426. }
  3427. a.type != createjs.LoadQueue.SVG && a.type != createjs.LoadQueue.JSONP && a.type != createjs.LoadQueue.JSON && a.type != createjs.LoadQueue.MANIFEST && a.type != createjs.LoadQueue.JAVASCRIPT && a.type != createjs.LoadQueue.CSS || (this._startTagVisibility = b.style.visibility, b.style.visibility = "hidden", (document.body || document.getElementsByTagName("body")[0]).appendChild(b));
  3428. null != b.load && b.load()
  3429. };
  3430. b._handleJSONPLoad = function(a) {
  3431. this._jsonResult = a
  3432. };
  3433. b._handleTimeout = function() {
  3434. this._clean();
  3435. var a = new createjs.Event("error");
  3436. a.text = "PRELOAD_TIMEOUT";
  3437. this._sendError(a)
  3438. };
  3439. b._handleStalled = function() {
  3440. };
  3441. b._handleError = function() {
  3442. this._clean();
  3443. var a = new createjs.Event("error");
  3444. this._sendError(a)
  3445. };
  3446. b._handleReadyStateChange = function() {
  3447. clearTimeout(this._loadTimeout);
  3448. var a = this.getItem().tag;
  3449. "loaded" != a.readyState && "complete" != a.readyState || this._handleLoad()
  3450. };
  3451. b._handleLoad = function() {
  3452. if (!this._isCanceled()) {
  3453. var a =
  3454. this.getItem(), b = a.tag;
  3455. if (!(this.loaded || this._isAudio && 4 !== b.readyState)) {
  3456. switch (this.loaded = !0, a.type) {
  3457. case createjs.LoadQueue.SVG:
  3458. case createjs.LoadQueue.JSON:
  3459. case createjs.LoadQueue.JSONP:
  3460. case createjs.LoadQueue.MANIFEST:
  3461. case createjs.LoadQueue.CSS:
  3462. b.style.visibility = this._startTagVisibility, (document.body || document.getElementsByTagName("body")[0]).removeChild(b)
  3463. }
  3464. this._clean();
  3465. this._sendComplete()
  3466. }
  3467. }
  3468. };
  3469. b._clean = function() {
  3470. clearTimeout(this._loadTimeout);
  3471. var a = this.getItem(), b = a.tag;
  3472. null != b && (b.onload =
  3473. null, b.removeEventListener && b.removeEventListener("canplaythrough", this._tagCompleteProxy, !1), b.onstalled = null, b.onprogress = null, b.onerror = null, null != b.parentNode && a.type == createjs.LoadQueue.SVG && a.type == createjs.LoadQueue.JSON && a.type == createjs.LoadQueue.MANIFEST && a.type == createjs.LoadQueue.CSS && a.type == createjs.LoadQueue.JSONP && b.parentNode.removeChild(b));
  3474. a = this.getItem();
  3475. a.type != createjs.LoadQueue.JSONP && a.type != createjs.LoadQueue.MANIFEST || (window[a.callback] = null)
  3476. };
  3477. b.toString = function() {
  3478. return"[PreloadJS TagLoader]"
  3479. };
  3480. createjs.TagLoader = c
  3481. })();
  3482. this.createjs = this.createjs || {};
  3483. (function() {
  3484. var c = function(a, b) {
  3485. this.init(a, b)
  3486. }, b = c.prototype = new createjs.AbstractLoader;
  3487. b._request = null;
  3488. b._loadTimeout = null;
  3489. b._xhrLevel = 1;
  3490. b._response = null;
  3491. b._rawResponse = null;
  3492. b._crossOrigin = "";
  3493. b.init = function(a, b) {
  3494. this._item = a;
  3495. this._crossOrigin = b;
  3496. !this._createXHR(a)
  3497. };
  3498. b.getResult = function(a) {
  3499. return a && this._rawResponse ? this._rawResponse : this._response
  3500. };
  3501. b.cancel = function() {
  3502. this.canceled = !0;
  3503. this._clean();
  3504. this._request.abort()
  3505. };
  3506. b.load = function() {
  3507. if (null == this._request)
  3508. return this._handleError(), void 0;
  3509. if (this._request.onloadstart = createjs.proxy(this._handleLoadStart, this), this._request.onprogress = createjs.proxy(this._handleProgress, this), this._request.onabort = createjs.proxy(this._handleAbort, this), this._request.onerror = createjs.proxy(this._handleError, this), this._request.ontimeout = createjs.proxy(this._handleTimeout, this), 1 == this._xhrLevel) {
  3510. var a = createjs.LoadQueue.LOAD_TIMEOUT;
  3511. if (0 == a)
  3512. a = createjs.LoadQueue.loadTimeout;
  3513. else
  3514. try {
  3515. console.warn("LoadQueue.LOAD_TIMEOUT has been deprecated in favor of LoadQueue.loadTimeout")
  3516. } catch (b) {
  3517. }
  3518. this._loadTimeout =
  3519. setTimeout(createjs.proxy(this._handleTimeout, this), a)
  3520. }
  3521. this._request.onload = createjs.proxy(this._handleLoad, this);
  3522. this._request.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this);
  3523. try {
  3524. this._item.values && this._item.method != createjs.LoadQueue.GET ? this._item.method == createjs.LoadQueue.POST && this._request.send(this._formatQueryString(this._item.values)) : this._request.send()
  3525. } catch (c) {
  3526. a = new createjs.Event("error"), a.error = c, this._sendError(a)
  3527. }
  3528. };
  3529. b.getAllResponseHeaders = function() {
  3530. return this._request.getAllResponseHeaders instanceof
  3531. Function ? this._request.getAllResponseHeaders() : null
  3532. };
  3533. b.getResponseHeader = function(a) {
  3534. return this._request.getResponseHeader instanceof Function ? this._request.getResponseHeader(a) : null
  3535. };
  3536. b._handleProgress = function(a) {
  3537. if (a && !(0 < a.loaded && 0 == a.total)) {
  3538. var b = new createjs.Event("progress");
  3539. b.loaded = a.loaded;
  3540. b.total = a.total;
  3541. this._sendProgress(b)
  3542. }
  3543. };
  3544. b._handleLoadStart = function() {
  3545. clearTimeout(this._loadTimeout);
  3546. this._sendLoadStart()
  3547. };
  3548. b._handleAbort = function() {
  3549. this._clean();
  3550. var a = new createjs.Event("error");
  3551. a.text = "XHR_ABORTED";
  3552. this._sendError(a)
  3553. };
  3554. b._handleError = function() {
  3555. this._clean();
  3556. var a = new createjs.Event("error");
  3557. this._sendError(a)
  3558. };
  3559. b._handleReadyStateChange = function() {
  3560. 4 == this._request.readyState && this._handleLoad()
  3561. };
  3562. b._handleLoad = function() {
  3563. if (!this.loaded) {
  3564. if (this.loaded = !0, !this._checkError())
  3565. return this._handleError(), void 0;
  3566. this._response = this._getResponse();
  3567. this._clean();
  3568. this._generateTag() && this._sendComplete()
  3569. }
  3570. };
  3571. b._handleTimeout = function(a) {
  3572. this._clean();
  3573. (new createjs.Event("error")).text =
  3574. "PRELOAD_TIMEOUT";
  3575. this._sendError(a)
  3576. };
  3577. b._checkError = function() {
  3578. switch (parseInt(this._request.status)) {
  3579. case 404:
  3580. case 0:
  3581. return!1
  3582. }
  3583. return!0
  3584. };
  3585. b._getResponse = function() {
  3586. if (null != this._response)
  3587. return this._response;
  3588. if (null != this._request.response)
  3589. return this._request.response;
  3590. try {
  3591. if (null != this._request.responseText)
  3592. return this._request.responseText
  3593. } catch (a) {
  3594. }
  3595. try {
  3596. if (null != this._request.responseXML)
  3597. return this._request.responseXML
  3598. } catch (b) {
  3599. }
  3600. return null
  3601. };
  3602. b._createXHR = function(a) {
  3603. var b = this._isCrossDomain(a),
  3604. c = null;
  3605. if (b && window.XDomainRequest)
  3606. c = new XDomainRequest;
  3607. else if (window.XMLHttpRequest)
  3608. c = new XMLHttpRequest;
  3609. else
  3610. try {
  3611. c = new ActiveXObject("Msxml2.XMLHTTP.6.0")
  3612. } catch (g) {
  3613. try {
  3614. c = new ActiveXObject("Msxml2.XMLHTTP.3.0")
  3615. } catch (e) {
  3616. try {
  3617. c = new ActiveXObject("Msxml2.XMLHTTP")
  3618. } catch (f) {
  3619. return!1
  3620. }
  3621. }
  3622. }
  3623. createjs.LoadQueue.isText(a.type) && c.overrideMimeType && c.overrideMimeType("text/plain; charset=utf-8");
  3624. this._xhrLevel = "string" == typeof c.responseType ? 2 : 1;
  3625. var h = null;
  3626. return h = a.method == createjs.LoadQueue.GET ? this.buildPath(a.src,
  3627. a.values) : a.src, c.open(a.method || createjs.LoadQueue.GET, h, !0), b && c instanceof XMLHttpRequest && 1 == this._xhrLevel && c.setRequestHeader("Origin", location.origin), a.values && a.method == createjs.LoadQueue.POST && c.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), createjs.LoadQueue.isBinary(a.type) && (c.responseType = "arraybuffer"), this._request = c, !0
  3628. };
  3629. b._clean = function() {
  3630. clearTimeout(this._loadTimeout);
  3631. var a = this._request;
  3632. a.onloadstart = null;
  3633. a.onprogress = null;
  3634. a.onabort = null;
  3635. a.onerror = null;
  3636. a.onload = null;
  3637. a.ontimeout = null;
  3638. a.onloadend = null;
  3639. a.onreadystatechange = null
  3640. };
  3641. b._generateTag = function() {
  3642. var a = this._item.tag;
  3643. switch (this._item.type) {
  3644. case createjs.LoadQueue.IMAGE:
  3645. return a.onload = createjs.proxy(this._handleTagReady, this), "" != this._crossOrigin && (a.crossOrigin = "Anonymous"), a.src = this.buildPath(this._item.src, this._item.values), this._rawResponse = this._response, this._response = a, !1;
  3646. case createjs.LoadQueue.JAVASCRIPT:
  3647. return a = document.createElement("script"), a.text = this._response, this._rawResponse =
  3648. this._response, this._response = a, !0;
  3649. case createjs.LoadQueue.CSS:
  3650. if (document.getElementsByTagName("head")[0].appendChild(a), a.styleSheet)
  3651. a.styleSheet.cssText = this._response;
  3652. else {
  3653. var b = document.createTextNode(this._response);
  3654. a.appendChild(b)
  3655. }
  3656. return this._rawResponse = this._response, this._response = a, !0;
  3657. case createjs.LoadQueue.XML:
  3658. return b = this._parseXML(this._response, "text/xml"), this._rawResponse = this._response, this._response = b, !0;
  3659. case createjs.LoadQueue.SVG:
  3660. return b = this._parseXML(this._response, "image/svg+xml"),
  3661. this._rawResponse = this._response, null != b.documentElement ? (a.appendChild(b.documentElement), this._response = a) : this._response = b, !0;
  3662. case createjs.LoadQueue.JSON:
  3663. case createjs.LoadQueue.MANIFEST:
  3664. a = {};
  3665. try {
  3666. a = JSON.parse(this._response)
  3667. } catch (c) {
  3668. a = c
  3669. }
  3670. return this._rawResponse = this._response, this._response = a, !0
  3671. }
  3672. return!0
  3673. };
  3674. b._parseXML = function(a, b) {
  3675. var c = null;
  3676. try {
  3677. window.DOMParser ? c = (new DOMParser).parseFromString(a, b) : (c = new ActiveXObject("Microsoft.XMLDOM"), c.async = !1, c.loadXML(a))
  3678. } catch (g) {
  3679. }
  3680. return c
  3681. };
  3682. b._handleTagReady =
  3683. function() {
  3684. this._sendComplete()
  3685. };
  3686. b.toString = function() {
  3687. return"[PreloadJS XHRLoader]"
  3688. };
  3689. createjs.XHRLoader = c
  3690. })();
  3691. "object" != typeof JSON && (JSON = {});
  3692. (function() {
  3693. function c(a) {
  3694. return 10 > a ? "0" + a : a
  3695. }
  3696. function b(a) {
  3697. return d.lastIndex = 0, d.test(a) ? '"' + a.replace(d, function(a) {
  3698. var b = f[a];
  3699. return"string" == typeof b ? b : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4)
  3700. }) + '"' : '"' + a + '"'
  3701. }
  3702. function a(c, d) {
  3703. var f, k, r, q, s, u = g, t = d[c];
  3704. switch (t && "object" == typeof t && "function" == typeof t.toJSON && (t = t.toJSON(c)), "function" == typeof h && (t = h.call(d, c, t)), typeof t) {
  3705. case "string":
  3706. return b(t);
  3707. case "number":
  3708. return isFinite(t) ? String(t) : "null";
  3709. case "boolean":
  3710. case "null":
  3711. return String(t);
  3712. case "object":
  3713. if (!t)
  3714. return"null";
  3715. if (g += e, s = [], "[object Array]" === Object.prototype.toString.apply(t)) {
  3716. q = t.length;
  3717. for (f = 0; q > f; f += 1)
  3718. s[f] = a(f, t) || "null";
  3719. return r = 0 === s.length ? "[]" : g ? "[\n" + g + s.join(",\n" + g) + "\n" + u + "]" : "[" + s.join(",") + "]", g = u, r
  3720. }
  3721. if (h && "object" == typeof h)
  3722. for (q = h.length, f = 0; q > f; f += 1)
  3723. "string" == typeof h[f] && (k = h[f], r = a(k, t), r && s.push(b(k) + (g ? ": " : ":") + r));
  3724. else
  3725. for (k in t)
  3726. Object.prototype.hasOwnProperty.call(t, k) && (r = a(k, t), r && s.push(b(k) + (g ? ": " : ":") + r));
  3727. return r = 0 === s.length ? "{}" : g ? "{\n" + g +
  3728. s.join(",\n" + g) + "\n" + u + "}" : "{" + s.join(",") + "}", g = u, r
  3729. }
  3730. }
  3731. "function" != typeof Date.prototype.toJSON && (Date.prototype.toJSON = function() {
  3732. return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + c(this.getUTCMonth() + 1) + "-" + c(this.getUTCDate()) + "T" + c(this.getUTCHours()) + ":" + c(this.getUTCMinutes()) + ":" + c(this.getUTCSeconds()) + "Z" : null
  3733. }, String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() {
  3734. return this.valueOf()
  3735. });
  3736. var k = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
  3737. d = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, g, e, f = {"\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\"}, h;
  3738. "function" != typeof JSON.stringify && (JSON.stringify = function(b, c, d) {
  3739. var f;
  3740. if (g = "", e = "", "number" == typeof d)
  3741. for (f = 0; d > f; f += 1)
  3742. e += " ";
  3743. else
  3744. "string" == typeof d && (e = d);
  3745. if (h = c, c && "function" != typeof c && ("object" != typeof c || "number" != typeof c.length))
  3746. throw Error("JSON.stringify");
  3747. return a("", {"": b})
  3748. });
  3749. "function" != typeof JSON.parse && (JSON.parse = function(a, b) {
  3750. function c(a, d) {
  3751. var e, f, k = a[d];
  3752. if (k && "object" == typeof k)
  3753. for (e in k)
  3754. Object.prototype.hasOwnProperty.call(k, e) && (f = c(k, e), void 0 !== f ? k[e] = f : delete k[e]);
  3755. return b.call(a, d, k)
  3756. }
  3757. var d;
  3758. if (a = String(a), k.lastIndex = 0, k.test(a) && (a = a.replace(k, function(a) {
  3759. return"\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4)
  3760. })), /^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
  3761. "]").replace(/(?:^|:|,)(?:\s*\[)+/g, "")))
  3762. return d = eval("(" + a + ")"), "function" == typeof b ? c({"": d}, "") : d;
  3763. throw new SyntaxError("JSON.parse");
  3764. })
  3765. })();
  3766. this.createjs = this.createjs || {};
  3767. (function() {
  3768. var c = createjs.SoundJS = createjs.SoundJS || {};
  3769. c.version = "NEXT";
  3770. c.buildDate = "Thu, 12 Dec 2013 23:37:06 GMT"
  3771. })();
  3772. this.createjs = this.createjs || {};
  3773. (function() {
  3774. function c() {
  3775. throw"Sound cannot be instantiated";
  3776. }
  3777. function b(a, b) {
  3778. this.init(a, b)
  3779. }
  3780. function a() {
  3781. }
  3782. c.DELIMITER = "|";
  3783. c.INTERRUPT_ANY = "any";
  3784. c.INTERRUPT_EARLY = "early";
  3785. c.INTERRUPT_LATE = "late";
  3786. c.INTERRUPT_NONE = "none";
  3787. c.PLAY_INITED = "playInited";
  3788. c.PLAY_SUCCEEDED = "playSucceeded";
  3789. c.PLAY_INTERRUPTED = "playInterrupted";
  3790. c.PLAY_FINISHED = "playFinished";
  3791. c.PLAY_FAILED = "playFailed";
  3792. c.SUPPORTED_EXTENSIONS = "mp3 ogg mpeg wav m4a mp4 aiff wma mid".split(" ");
  3793. c.EXTENSION_MAP = {m4a: "mp4"};
  3794. c.FILE_PATTERN = /^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([/.]*?(?:[^?]+)?\/)?((?:[^/?]+)\.(\w+))(?:\?(\S+)?)?$/;
  3795. c.defaultInterruptBehavior = c.INTERRUPT_NONE;
  3796. c.alternateExtensions = [];
  3797. c._lastID = 0;
  3798. c.activePlugin = null;
  3799. c._pluginsRegistered = !1;
  3800. c._masterVolume = 1;
  3801. c._masterMute = !1;
  3802. c._instances = [];
  3803. c._idHash = {};
  3804. c._preloadHash = {};
  3805. c._defaultSoundInstance = null;
  3806. c.addEventListener = null;
  3807. c.removeEventListener = null;
  3808. c.removeAllEventListeners = null;
  3809. c.dispatchEvent = null;
  3810. c.hasEventListener = null;
  3811. c._listeners = null;
  3812. createjs.EventDispatcher.initialize(c);
  3813. c._sendFileLoadEvent = function(a) {
  3814. if (c._preloadHash[a])
  3815. for (var b = 0, e = c._preloadHash[a].length; e >
  3816. b; b++) {
  3817. var f = c._preloadHash[a][b];
  3818. if (c._preloadHash[a][b] = !0, c.hasEventListener("fileload")) {
  3819. var k = new createjs.Event("fileload");
  3820. k.src = f.src;
  3821. k.id = f.id;
  3822. k.data = f.data;
  3823. c.dispatchEvent(k)
  3824. }
  3825. }
  3826. };
  3827. c.getPreloadHandlers = function() {
  3828. return{callback: createjs.proxy(c.initLoad, c), types: ["sound"], extensions: c.SUPPORTED_EXTENSIONS}
  3829. };
  3830. c.registerPlugin = function(a) {
  3831. try {
  3832. console.log("createjs.Sound.registerPlugin has been deprecated. Please use registerPlugins.")
  3833. } catch (b) {
  3834. }
  3835. return c._registerPlugin(a)
  3836. };
  3837. c._registerPlugin =
  3838. function(a) {
  3839. return c._pluginsRegistered = !0, null == a ? !1 : a.isSupported() ? (c.activePlugin = new a, !0) : !1
  3840. };
  3841. c.registerPlugins = function(a) {
  3842. for (var b = 0, e = a.length; e > b; b++)
  3843. if (c._registerPlugin(a[b]))
  3844. return!0;
  3845. return!1
  3846. };
  3847. c.initializeDefaultPlugins = function() {
  3848. return null != c.activePlugin ? !0 : c._pluginsRegistered ? !1 : c.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin]) ? !0 : !1
  3849. };
  3850. c.isReady = function() {
  3851. return null != c.activePlugin
  3852. };
  3853. c.getCapabilities = function() {
  3854. return null == c.activePlugin ? null : c.activePlugin._capabilities
  3855. };
  3856. c.getCapability = function(a) {
  3857. return null == c.activePlugin ? null : c.activePlugin._capabilities[a]
  3858. };
  3859. c.initLoad = function(a, b, e, f, k) {
  3860. a = a.replace(k, "");
  3861. a = c.registerSound(a, e, f, !1, k);
  3862. return null == a ? !1 : a
  3863. };
  3864. c.registerSound = function(a, k, e, f, h) {
  3865. if (!c.initializeDefaultPlugins())
  3866. return!1;
  3867. var l = (a instanceof Object && (h = k, k = a.id, e = a.data, a = a.src), c.alternateExtensions.length) ? c._parsePath2(a, "sound", k, e) : c._parsePath(a, "sound", k, e);
  3868. if (null == l)
  3869. return!1;
  3870. null != h && (a = h + a, l.src = h + l.src);
  3871. null != k && (c._idHash[k] = l.src);
  3872. h = null;
  3873. null != e && (isNaN(e.channels) ? isNaN(e) || (h = parseInt(e)) : h = parseInt(e.channels));
  3874. var m = c.activePlugin.register(l.src, h);
  3875. if (null != m && (null != m.numChannels && (h = m.numChannels), b.create(l.src, h), null != e && isNaN(e) ? e.channels = l.data.channels = h || b.maxPerChannel() : e = l.data = h || b.maxPerChannel(), null != m.tag ? l.tag = m.tag : m.src && (l.src = m.src), null != m.completeHandler && (l.completeHandler = m.completeHandler), m.type && (l.type = m.type)), 0 != f)
  3876. if (c._preloadHash[l.src] || (c._preloadHash[l.src] = []), c._preloadHash[l.src].push({src: a,
  3877. id: k, data: e}), 1 == c._preloadHash[l.src].length)
  3878. c.activePlugin.preload(l.src, m);
  3879. else if (1 == c._preloadHash[l.src][0])
  3880. return!0;
  3881. return l
  3882. };
  3883. c.registerManifest = function(a, b) {
  3884. for (var c = [], f = 0, k = a.length; k > f; f++)
  3885. c[f] = createjs.Sound.registerSound(a[f].src, a[f].id, a[f].data, a[f].preload, b);
  3886. return c
  3887. };
  3888. c.removeSound = function(a, k) {
  3889. if (null == c.activePlugin)
  3890. return!1;
  3891. var e = (a instanceof Object && (a = a.src), a = c._getSrcById(a), c.alternateExtensions.length) ? c._parsePath2(a) : c._parsePath(a);
  3892. if (null == e)
  3893. return!1;
  3894. null != k && (e.src =
  3895. k + e.src);
  3896. a = e.src;
  3897. for (var f in c._idHash)
  3898. c._idHash[f] == a && delete c._idHash[f];
  3899. return b.removeSrc(a), delete c._preloadHash[a], c.activePlugin.removeSound(a), !0
  3900. };
  3901. c.removeManifest = function(a, b) {
  3902. for (var c = [], f = 0, k = a.length; k > f; f++)
  3903. c[f] = createjs.Sound.removeSound(a[f].src, b);
  3904. return c
  3905. };
  3906. c.removeAllSounds = function() {
  3907. c._idHash = {};
  3908. c._preloadHash = {};
  3909. b.removeAll();
  3910. c.activePlugin.removeAllSounds()
  3911. };
  3912. c.loadComplete = function(a) {
  3913. var b = c.alternateExtensions.length ? c._parsePath2(a, "sound") : c._parsePath(a, "sound");
  3914. return a =
  3915. b ? c._getSrcById(b.src) : c._getSrcById(a), 1 == c._preloadHash[a][0]
  3916. };
  3917. c._parsePath = function(a, b, e, f) {
  3918. "string" != typeof a && (a = a.toString());
  3919. a = a.split(c.DELIMITER);
  3920. if (1 < a.length)
  3921. try {
  3922. console.log('createjs.Sound.DELIMITER "|" loading approach has been deprecated. Please use the new alternateExtensions property.')
  3923. } catch (k) {
  3924. }
  3925. b = {type: b || "sound", id: e, data: f};
  3926. e = c.getCapabilities();
  3927. f = 0;
  3928. for (var l = a.length; l > f; f++) {
  3929. var m = a[f], n = m.match(c.FILE_PATTERN);
  3930. if (null == n)
  3931. return!1;
  3932. var p = n[4], n = n[5];
  3933. if (e[n] && -1 < createjs.indexOf(c.SUPPORTED_EXTENSIONS,
  3934. n))
  3935. return b.name = p, b.src = m, b.extension = n, b
  3936. }
  3937. return null
  3938. };
  3939. c._parsePath2 = function(a, b, e, f) {
  3940. "string" != typeof a && (a = a.toString());
  3941. var k = a.match(c.FILE_PATTERN);
  3942. if (null == k)
  3943. return!1;
  3944. for (var l = k[4], m = k[5], n = c.getCapabilities(), p = 0; !n[m]; )
  3945. if (m = c.alternateExtensions[p++], p > c.alternateExtensions.length)
  3946. return null;
  3947. a = a.replace("." + k[5], "." + m);
  3948. b = {type: b || "sound", id: e, data: f};
  3949. return b.name = l, b.src = a, b.extension = m, b
  3950. };
  3951. c.play = function(a, b, e, f, k, l, m) {
  3952. a = c.createInstance(a);
  3953. return c._playInstance(a, b, e, f, k, l, m) || a.playFailed(),
  3954. a
  3955. };
  3956. c.createInstance = function(a) {
  3957. if (!c.initializeDefaultPlugins())
  3958. return c._defaultSoundInstance;
  3959. var k = (a = c._getSrcById(a), c.alternateExtensions.length) ? c._parsePath2(a, "sound") : c._parsePath(a, "sound");
  3960. a = null;
  3961. return null != k && null != k.src ? (b.create(k.src), a = c.activePlugin.create(k.src)) : a = c._defaultSoundInstance, a.uniqueId = c._lastID++, a
  3962. };
  3963. c.setVolume = function(a) {
  3964. if (null == Number(a))
  3965. return!1;
  3966. if (a = Math.max(0, Math.min(1, a)), c._masterVolume = a, !this.activePlugin || !this.activePlugin.setVolume || !this.activePlugin.setVolume(a))
  3967. for (var b =
  3968. this._instances, e = 0, k = b.length; k > e; e++)
  3969. b[e].setMasterVolume(a)
  3970. };
  3971. c.getVolume = function() {
  3972. return c._masterVolume
  3973. };
  3974. c.setMute = function(a) {
  3975. if (null == a || void 0 == a)
  3976. return!1;
  3977. if (this._masterMute = a, !this.activePlugin || !this.activePlugin.setMute || !this.activePlugin.setMute(a))
  3978. for (var b = this._instances, c = 0, k = b.length; k > c; c++)
  3979. b[c].setMasterMute(a);
  3980. return!0
  3981. };
  3982. c.getMute = function() {
  3983. return this._masterMute
  3984. };
  3985. c.stop = function() {
  3986. for (var a = this._instances, b = a.length; b--; )
  3987. a[b].stop()
  3988. };
  3989. c._playInstance = function(a, b, e, k, h, l,
  3990. m) {
  3991. if (b instanceof Object && (e = b.delay, k = b.offset, h = b.loop, l = b.volume, m = b.pan, b = b.interrupt), b = b || c.defaultInterruptBehavior, null == e && (e = 0), null == k && (k = a.getPosition()), null == h && (h = 0), null == l && (l = a.volume), null == m && (m = a.pan), 0 == e) {
  3992. if (!c._beginPlaying(a, b, k, h, l, m))
  3993. return!1
  3994. } else
  3995. e = setTimeout(function() {
  3996. c._beginPlaying(a, b, k, h, l, m)
  3997. }, e), a._delayTimeoutId = e;
  3998. return this._instances.push(a), !0
  3999. };
  4000. c._beginPlaying = function(a, c, e, k, h, l) {
  4001. return b.add(a, c) ? a._beginPlaying(e, k, h, l) ? !0 : (a = createjs.indexOf(this._instances,
  4002. a), -1 < a && this._instances.splice(a, 1), !1) : !1
  4003. };
  4004. c._getSrcById = function(a) {
  4005. return null == c._idHash || null == c._idHash[a] ? a : c._idHash[a]
  4006. };
  4007. c._playFinished = function(a) {
  4008. b.remove(a);
  4009. a = createjs.indexOf(this._instances, a);
  4010. -1 < a && this._instances.splice(a, 1)
  4011. };
  4012. createjs.Sound = c;
  4013. b.channels = {};
  4014. b.create = function(a, c) {
  4015. return null == b.get(a) ? (b.channels[a] = new b(a, c), !0) : !1
  4016. };
  4017. b.removeSrc = function(a) {
  4018. var c = b.get(a);
  4019. return null == c ? !1 : (c.removeAll(), delete b.channels[a], !0)
  4020. };
  4021. b.removeAll = function() {
  4022. for (var a in b.channels)
  4023. b.channels[a].removeAll();
  4024. b.channels = {}
  4025. };
  4026. b.add = function(a, c) {
  4027. var e = b.get(a.src);
  4028. return null == e ? !1 : e.add(a, c)
  4029. };
  4030. b.remove = function(a) {
  4031. var c = b.get(a.src);
  4032. return null == c ? !1 : (c.remove(a), !0)
  4033. };
  4034. b.maxPerChannel = function() {
  4035. return k.maxDefault
  4036. };
  4037. b.get = function(a) {
  4038. return b.channels[a]
  4039. };
  4040. var k = b.prototype;
  4041. k.src = null;
  4042. k.max = null;
  4043. k.maxDefault = 100;
  4044. k.length = 0;
  4045. k.init = function(a, b) {
  4046. this.src = a;
  4047. this.max = b || this.maxDefault;
  4048. -1 == this.max && (this.max = this.maxDefault);
  4049. this._instances = []
  4050. };
  4051. k.get = function(a) {
  4052. return this._instances[a]
  4053. };
  4054. k.add = function(a, b) {
  4055. return this.getSlot(b,
  4056. a) ? (this._instances.push(a), this.length++, !0) : !1
  4057. };
  4058. k.remove = function(a) {
  4059. a = createjs.indexOf(this._instances, a);
  4060. return-1 == a ? !1 : (this._instances.splice(a, 1), this.length--, !0)
  4061. };
  4062. k.removeAll = function() {
  4063. for (var a = this.length - 1; 0 <= a; a--)
  4064. this._instances[a].stop()
  4065. };
  4066. k.getSlot = function(a) {
  4067. for (var b, e, k = 0, h = this.max; h > k; k++) {
  4068. if (b = this.get(k), null == b)
  4069. return!0;
  4070. (a != c.INTERRUPT_NONE || b.playState == c.PLAY_FINISHED) && (0 != k ? b.playState == c.PLAY_FINISHED || b.playState == c.PLAY_INTERRUPTED || b.playState == c.PLAY_FAILED ? e = b : (a ==
  4071. c.INTERRUPT_EARLY && b.getPosition() < e.getPosition() || a == c.INTERRUPT_LATE && b.getPosition() > e.getPosition()) && (e = b) : e = b)
  4072. }
  4073. return null != e ? (e._interrupt(), this.remove(e), !0) : !1
  4074. };
  4075. k.toString = function() {
  4076. return"[Sound SoundChannel]"
  4077. };
  4078. c._defaultSoundInstance = new function() {
  4079. this.isDefault = !0;
  4080. this.addEventListener = this.removeEventListener = this.removeAllEventListeners = this.dispatchEvent = this.hasEventListener = this._listeners = this._interrupt = this._playFailed = this.pause = this.resume = this.play = this._beginPlaying = this._cleanUp =
  4081. this.stop = this.setMasterVolume = this.setVolume = this.mute = this.setMute = this.getMute = this.setPan = this.getPosition = this.setPosition = this.playFailed = function() {
  4082. return!1
  4083. };
  4084. this.getVolume = this.getPan = this.getDuration = function() {
  4085. return 0
  4086. };
  4087. this.playState = c.PLAY_FAILED;
  4088. this.toString = function() {
  4089. return"[Sound Default Sound Instance]"
  4090. }
  4091. };
  4092. a.init = function() {
  4093. var b = window.navigator.userAgent;
  4094. a.isFirefox = -1 < b.indexOf("Firefox");
  4095. a.isOpera = null != window.opera;
  4096. a.isChrome = -1 < b.indexOf("Chrome");
  4097. a.isIOS = -1 < b.indexOf("iPod") ||
  4098. -1 < b.indexOf("iPhone") || -1 < b.indexOf("iPad");
  4099. a.isAndroid = -1 < b.indexOf("Android");
  4100. a.isBlackberry = -1 < b.indexOf("Blackberry")
  4101. };
  4102. a.init();
  4103. createjs.Sound.BrowserDetect = a
  4104. })();
  4105. this.createjs = this.createjs || {};
  4106. (function() {
  4107. function c() {
  4108. this._init()
  4109. }
  4110. c._capabilities = null;
  4111. c.isSupported = function() {
  4112. var a = createjs.Sound.BrowserDetect.isIOS || createjs.Sound.BrowserDetect.isAndroid || createjs.Sound.BrowserDetect.isBlackberry;
  4113. return"file:" != location.protocol || a || this._isFileXHRSupported() ? (c._generateCapabilities(), null == c.context ? !1 : !0) : !1
  4114. };
  4115. c._isFileXHRSupported = function() {
  4116. var a = !0, b = new XMLHttpRequest;
  4117. try {
  4118. b.open("GET", "fail.fail", !1)
  4119. } catch (c) {
  4120. return a = !1
  4121. }
  4122. b.onerror = function() {
  4123. a = !1
  4124. };
  4125. b.onload = function() {
  4126. a = 404 == this.status ||
  4127. 200 == this.status || 0 == this.status && "" != this.response
  4128. };
  4129. try {
  4130. b.send()
  4131. } catch (g) {
  4132. a = !1
  4133. }
  4134. return a
  4135. };
  4136. c._generateCapabilities = function() {
  4137. if (null == c._capabilities) {
  4138. var a = document.createElement("audio");
  4139. if (null == a.canPlayType)
  4140. return null;
  4141. if (window.webkitAudioContext)
  4142. c.context = new webkitAudioContext;
  4143. else {
  4144. if (!window.AudioContext)
  4145. return null;
  4146. c.context = new AudioContext
  4147. }
  4148. c._compatibilitySetUp();
  4149. c.playEmptySound();
  4150. c._capabilities = {panning: !0, volume: !0, tracks: -1};
  4151. for (var b = createjs.Sound.SUPPORTED_EXTENSIONS, d = createjs.Sound.EXTENSION_MAP,
  4152. g = 0, e = b.length; e > g; g++) {
  4153. var f = b[g], h = d[f] || f;
  4154. c._capabilities[f] = "no" != a.canPlayType("audio/" + f) && "" != a.canPlayType("audio/" + f) || "no" != a.canPlayType("audio/" + h) && "" != a.canPlayType("audio/" + h)
  4155. }
  4156. 2 > c.context.destination.numberOfChannels && (c._capabilities.panning = !1);
  4157. c.dynamicsCompressorNode = c.context.createDynamicsCompressor();
  4158. c.dynamicsCompressorNode.connect(c.context.destination);
  4159. c.gainNode = c.context.createGain();
  4160. c.gainNode.connect(c.dynamicsCompressorNode)
  4161. }
  4162. };
  4163. c._compatibilitySetUp = function() {
  4164. if (!c.context.createGain) {
  4165. c.context.createGain =
  4166. c.context.createGainNode;
  4167. var a = c.context.createBufferSource();
  4168. a.__proto__.start = a.__proto__.noteGrainOn;
  4169. a.__proto__.stop = a.__proto__.noteOff;
  4170. this._panningModel = 0
  4171. }
  4172. };
  4173. c.playEmptySound = function() {
  4174. var a = this.context.createBuffer(1, 1, 22050), b = this.context.createBufferSource();
  4175. b.buffer = a;
  4176. b.connect(this.context.destination);
  4177. b.start(0, 0, 0)
  4178. };
  4179. var b = c.prototype;
  4180. b._capabilities = null;
  4181. b._volume = 1;
  4182. b.context = null;
  4183. b._panningModel = "equalpower";
  4184. b.dynamicsCompressorNode = null;
  4185. b.gainNode = null;
  4186. b._arrayBuffers = null;
  4187. b._init =
  4188. function() {
  4189. this._capabilities = c._capabilities;
  4190. this._arrayBuffers = {};
  4191. this.context = c.context;
  4192. this.gainNode = c.gainNode;
  4193. this.dynamicsCompressorNode = c.dynamicsCompressorNode
  4194. };
  4195. b.register = function(a) {
  4196. this._arrayBuffers[a] = !0;
  4197. return{tag: new createjs.WebAudioPlugin.Loader(a, this)}
  4198. };
  4199. b.isPreloadStarted = function(a) {
  4200. return null != this._arrayBuffers[a]
  4201. };
  4202. b.isPreloadComplete = function(a) {
  4203. return!(null == this._arrayBuffers[a] || 1 == this._arrayBuffers[a])
  4204. };
  4205. b.removeSound = function(a) {
  4206. delete this._arrayBuffers[a]
  4207. };
  4208. b.removeAllSounds =
  4209. function() {
  4210. this._arrayBuffers = {}
  4211. };
  4212. b.addPreloadResults = function(a, b) {
  4213. this._arrayBuffers[a] = b
  4214. };
  4215. b._handlePreloadComplete = function() {
  4216. createjs.Sound._sendFileLoadEvent(this.src)
  4217. };
  4218. b.preload = function(a) {
  4219. this._arrayBuffers[a] = !0;
  4220. a = new createjs.WebAudioPlugin.Loader(a, this);
  4221. a.onload = this._handlePreloadComplete;
  4222. a.load()
  4223. };
  4224. b.create = function(a) {
  4225. return this.isPreloadStarted(a) || this.preload(a), new createjs.WebAudioPlugin.SoundInstance(a, this)
  4226. };
  4227. b.setVolume = function(a) {
  4228. return this._volume = a, this._updateVolume(),
  4229. !0
  4230. };
  4231. b._updateVolume = function() {
  4232. var a = createjs.Sound._masterMute ? 0 : this._volume;
  4233. a != this.gainNode.gain.value && (this.gainNode.gain.value = a)
  4234. };
  4235. b.getVolume = function() {
  4236. return this._volume
  4237. };
  4238. b.setMute = function() {
  4239. return this._updateVolume(), !0
  4240. };
  4241. b.toString = function() {
  4242. return"[WebAudioPlugin]"
  4243. };
  4244. createjs.WebAudioPlugin = c
  4245. })();
  4246. (function() {
  4247. function c(a, b) {
  4248. this._init(a, b)
  4249. }
  4250. var b = c.prototype = new createjs.EventDispatcher;
  4251. b.src = null;
  4252. b.uniqueId = -1;
  4253. b.playState = null;
  4254. b._owner = null;
  4255. b._offset = 0;
  4256. b._delay = 0;
  4257. b._volume = 1;
  4258. try {
  4259. Object.defineProperty(b, "volume", {get: function() {
  4260. return this._volume
  4261. }, set: function(a) {
  4262. return null == Number(a) ? !1 : (a = Math.max(0, Math.min(1, a)), this._volume = a, this._updateVolume(), void 0)
  4263. }})
  4264. } catch (a) {
  4265. }
  4266. b._pan = 0;
  4267. try {
  4268. Object.defineProperty(b, "pan", {get: function() {
  4269. return this._pan
  4270. }, set: function(a) {
  4271. return this._owner._capabilities.panning &&
  4272. null != Number(a) ? (a = Math.max(-1, Math.min(1, a)), this._pan = a, this.panNode.setPosition(a, 0, -0.5), void 0) : !1
  4273. }})
  4274. } catch (k) {
  4275. }
  4276. b._duration = 0;
  4277. b._remainingLoops = 0;
  4278. b._delayTimeoutId = null;
  4279. b._soundCompleteTimeout = null;
  4280. b.gainNode = null;
  4281. b.panNode = null;
  4282. b.sourceNode = null;
  4283. b._sourceNodeNext = null;
  4284. b._muted = !1;
  4285. b._paused = !1;
  4286. b._startTime = 0;
  4287. b._endedHandler = null;
  4288. b._sendEvent = function(a) {
  4289. a = new createjs.Event(a);
  4290. this.dispatchEvent(a)
  4291. };
  4292. b._init = function(a, b) {
  4293. this._owner = b;
  4294. this.src = a;
  4295. this.gainNode = this._owner.context.createGain();
  4296. this.panNode = this._owner.context.createPanner();
  4297. this.panNode.panningModel = this._owner._panningModel;
  4298. this.panNode.connect(this.gainNode);
  4299. this._owner.isPreloadComplete(this.src) && (this._duration = 1E3 * this._owner._arrayBuffers[this.src].duration);
  4300. this._endedHandler = createjs.proxy(this._handleSoundComplete, this)
  4301. };
  4302. b._cleanUp = function() {
  4303. this.sourceNode && this.playState == createjs.Sound.PLAY_SUCCEEDED && (this.sourceNode = this._cleanUpAudioNode(this.sourceNode), this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext));
  4304. 0 != this.gainNode.numberOfOutputs && this.gainNode.disconnect(0);
  4305. clearTimeout(this._delayTimeoutId);
  4306. clearTimeout(this._soundCompleteTimeout);
  4307. this._startTime = 0;
  4308. null != window.createjs && createjs.Sound._playFinished(this)
  4309. };
  4310. b._cleanUpAudioNode = function(a) {
  4311. return a && (a.stop(0), a.disconnect(this.panNode), a = null), a
  4312. };
  4313. b._interrupt = function() {
  4314. this._cleanUp();
  4315. this.playState = createjs.Sound.PLAY_INTERRUPTED;
  4316. this._paused = !1;
  4317. this._sendEvent("interrupted")
  4318. };
  4319. b._handleSoundReady = function() {
  4320. if (null != window.createjs) {
  4321. if (1E3 *
  4322. this._offset > this.getDuration())
  4323. return this.playFailed(), void 0;
  4324. 0 > this._offset && (this._offset = 0);
  4325. this.playState = createjs.Sound.PLAY_SUCCEEDED;
  4326. this._paused = !1;
  4327. this.gainNode.connect(this._owner.gainNode);
  4328. var a = this._owner._arrayBuffers[this.src].duration;
  4329. this.sourceNode = this._createAndPlayAudioNode(this._owner.context.currentTime - a, this._offset);
  4330. this._duration = 1E3 * a;
  4331. this._startTime = this.sourceNode.startTime - this._offset;
  4332. this._soundCompleteTimeout = setTimeout(this._endedHandler, 1E3 * (a - this._offset));
  4333. 0 != this._remainingLoops && (this._sourceNodeNext = this._createAndPlayAudioNode(this._startTime, 0))
  4334. }
  4335. };
  4336. b._createAndPlayAudioNode = function(a, b) {
  4337. var c = this._owner.context.createBufferSource();
  4338. return c.buffer = this._owner._arrayBuffers[this.src], c.connect(this.panNode), this._owner.context.currentTime, c.startTime = a + c.buffer.duration, c.start(c.startTime, b, c.buffer.duration - b), c
  4339. };
  4340. b.play = function(a, b, c, k, h, l) {
  4341. this._cleanUp();
  4342. createjs.Sound._playInstance(this, a, b, c, k, h, l)
  4343. };
  4344. b._beginPlaying = function(a, b, c, k) {
  4345. return null !=
  4346. window.createjs && this.src ? (this._offset = a / 1E3, this._remainingLoops = b, this.volume = c, this.pan = k, this._owner.isPreloadComplete(this.src) ? (this._handleSoundReady(null), this._sendEvent("succeeded"), 1) : (this.playFailed(), void 0)) : void 0
  4347. };
  4348. b.pause = function() {
  4349. return this._paused || this.playState != createjs.Sound.PLAY_SUCCEEDED ? !1 : (this._paused = !0, this._offset = this._owner.context.currentTime - this._startTime, this._cleanUpAudioNode(this.sourceNode), this._cleanUpAudioNode(this._sourceNodeNext), 0 != this.gainNode.numberOfOutputs &&
  4350. this.gainNode.disconnect(), clearTimeout(this._delayTimeoutId), clearTimeout(this._soundCompleteTimeout), !0)
  4351. };
  4352. b.resume = function() {
  4353. return this._paused ? (this._handleSoundReady(null), !0) : !1
  4354. };
  4355. b.stop = function() {
  4356. return this._cleanUp(), this.playState = createjs.Sound.PLAY_FINISHED, this._offset = 0, !0
  4357. };
  4358. b.setVolume = function(a) {
  4359. return this.volume = a, !0
  4360. };
  4361. b._updateVolume = function() {
  4362. var a = this._muted ? 0 : this._volume;
  4363. return a != this.gainNode.gain.value ? (this.gainNode.gain.value = a, !0) : !1
  4364. };
  4365. b.getVolume = function() {
  4366. return this.volume
  4367. };
  4368. b.setMute = function(a) {
  4369. return null == a || void 0 == a ? !1 : (this._muted = a, this._updateVolume(), !0)
  4370. };
  4371. b.getMute = function() {
  4372. return this._muted
  4373. };
  4374. b.setPan = function(a) {
  4375. return this.pan = a, this.pan != a ? !1 : void 0
  4376. };
  4377. b.getPan = function() {
  4378. return this.pan
  4379. };
  4380. b.getPosition = function() {
  4381. return 1E3 * (this._paused || null == this.sourceNode ? this._offset : this._owner.context.currentTime - this._startTime)
  4382. };
  4383. b.setPosition = function(a) {
  4384. return this._offset = a / 1E3, this.sourceNode && this.playState == createjs.Sound.PLAY_SUCCEEDED && (this._cleanUpAudioNode(this.sourceNode),
  4385. this._cleanUpAudioNode(this._sourceNodeNext), clearTimeout(this._soundCompleteTimeout)), this._paused || this.playState != createjs.Sound.PLAY_SUCCEEDED || this._handleSoundReady(null), !0
  4386. };
  4387. b.getDuration = function() {
  4388. return this._duration
  4389. };
  4390. b._handleSoundComplete = function() {
  4391. return this._offset = 0, 0 != this._remainingLoops ? (this._remainingLoops--, this._sourceNodeNext ? (this._cleanUpAudioNode(this.sourceNode), this.sourceNode = this._sourceNodeNext, this._startTime = this.sourceNode.startTime, this._sourceNodeNext = this._createAndPlayAudioNode(this._startTime,
  4392. 0), this._soundCompleteTimeout = setTimeout(this._endedHandler, this._duration)) : this._handleSoundReady(null), this._sendEvent("loop"), void 0) : (null != window.createjs && (this._cleanUp(), this.playState = createjs.Sound.PLAY_FINISHED, this._sendEvent("complete")), void 0)
  4393. };
  4394. b.playFailed = function() {
  4395. null != window.createjs && (this._cleanUp(), this.playState = createjs.Sound.PLAY_FAILED, this._sendEvent("failed"))
  4396. };
  4397. b.toString = function() {
  4398. return"[WebAudioPlugin SoundInstance]"
  4399. };
  4400. createjs.WebAudioPlugin.SoundInstance = c
  4401. })();
  4402. (function() {
  4403. function c(a, b) {
  4404. this._init(a, b)
  4405. }
  4406. var b = c.prototype;
  4407. b.request = null;
  4408. b.owner = null;
  4409. b.progress = -1;
  4410. b.src = null;
  4411. b.originalSrc = null;
  4412. b.result = null;
  4413. b.onload = null;
  4414. b.onprogress = null;
  4415. b.onError = null;
  4416. b._init = function(a, b) {
  4417. this.originalSrc = this.src = a;
  4418. this.owner = b
  4419. };
  4420. b.load = function(a) {
  4421. null != a && (this.src = a);
  4422. this.request = new XMLHttpRequest;
  4423. this.request.open("GET", this.src, !0);
  4424. this.request.responseType = "arraybuffer";
  4425. this.request.onload = createjs.proxy(this.handleLoad, this);
  4426. this.request.onError = createjs.proxy(this.handleError,
  4427. this);
  4428. this.request.onprogress = createjs.proxy(this.handleProgress, this);
  4429. this.request.send()
  4430. };
  4431. b.handleProgress = function(a, b) {
  4432. this.progress = a / b;
  4433. null != this.onprogress && this.onprogress({loaded: a, total: b, progress: this.progress})
  4434. };
  4435. b.handleLoad = function() {
  4436. this.owner.context.decodeAudioData(this.request.response, createjs.proxy(this.handleAudioDecoded, this), createjs.proxy(this.handleError, this))
  4437. };
  4438. b.handleAudioDecoded = function(a) {
  4439. this.progress = 1;
  4440. this.result = a;
  4441. this.src = this.originalSrc;
  4442. this.owner.addPreloadResults(this.src,
  4443. this.result);
  4444. this.onload && this.onload()
  4445. };
  4446. b.handleError = function(a) {
  4447. this.owner.removeSound(this.src);
  4448. this.onerror && this.onerror(a)
  4449. };
  4450. b.toString = function() {
  4451. return"[WebAudioPlugin Loader]"
  4452. };
  4453. createjs.WebAudioPlugin.Loader = c
  4454. })();
  4455. this.createjs = this.createjs || {};
  4456. (function() {
  4457. function c() {
  4458. this._init()
  4459. }
  4460. c.MAX_INSTANCES = 30;
  4461. c._AUDIO_READY = "canplaythrough";
  4462. c._AUDIO_ENDED = "ended";
  4463. c._AUDIO_SEEKED = "seeked";
  4464. c._AUDIO_STALLED = "stalled";
  4465. c._capabilities = null;
  4466. c.enableIOS = !1;
  4467. c.isSupported = function() {
  4468. if (createjs.Sound.BrowserDetect.isIOS && !c.enableIOS)
  4469. return!1;
  4470. c._generateCapabilities();
  4471. return null == c.tag || null == c._capabilities ? !1 : !0
  4472. };
  4473. c._generateCapabilities = function() {
  4474. if (null == c._capabilities) {
  4475. var a = c.tag = document.createElement("audio");
  4476. if (null == a.canPlayType)
  4477. return null;
  4478. c._capabilities = {panning: !0, volume: !0, tracks: -1};
  4479. for (var b = createjs.Sound.SUPPORTED_EXTENSIONS, d = createjs.Sound.EXTENSION_MAP, g = 0, e = b.length; e > g; g++) {
  4480. var f = b[g], h = d[f] || f;
  4481. c._capabilities[f] = "no" != a.canPlayType("audio/" + f) && "" != a.canPlayType("audio/" + f) || "no" != a.canPlayType("audio/" + h) && "" != a.canPlayType("audio/" + h)
  4482. }
  4483. }
  4484. };
  4485. var b = c.prototype;
  4486. b._capabilities = null;
  4487. b._audioSources = null;
  4488. b.defaultNumChannels = 2;
  4489. b.loadedHandler = null;
  4490. b._init = function() {
  4491. this._capabilities = c._capabilities;
  4492. this._audioSources = {}
  4493. };
  4494. b.register = function(a, b) {
  4495. this._audioSources[a] = !0;
  4496. for (var c = createjs.HTMLAudioPlugin.TagPool.get(a), g = null, e = b || this.defaultNumChannels, f = 0; e > f; f++)
  4497. g = this._createTag(a), c.add(g);
  4498. if (g.id = a, this.loadedHandler = createjs.proxy(this._handleTagLoad, this), g.addEventListener && g.addEventListener("canplaythrough", this.loadedHandler), null == g.onreadystatechange)
  4499. g.onreadystatechange = this.loadedHandler;
  4500. else {
  4501. var h = g.onreadystatechange;
  4502. g.onreadystatechange = function() {
  4503. h();
  4504. this.loadedHandler()
  4505. }
  4506. }
  4507. return{tag: g, numChannels: e}
  4508. };
  4509. b._handleTagLoad = function(a) {
  4510. a.target.removeEventListener && a.target.removeEventListener("canplaythrough", this.loadedHandler);
  4511. a.target.onreadystatechange = null;
  4512. a.target.src != a.target.id && createjs.HTMLAudioPlugin.TagPool.checkSrc(a.target.id)
  4513. };
  4514. b._createTag = function(a) {
  4515. var b = document.createElement("audio");
  4516. return b.autoplay = !1, b.preload = "none", b.src = a, b
  4517. };
  4518. b.removeSound = function(a) {
  4519. delete this._audioSources[a];
  4520. createjs.HTMLAudioPlugin.TagPool.remove(a)
  4521. };
  4522. b.removeAllSounds = function() {
  4523. this._audioSources = {};
  4524. createjs.HTMLAudioPlugin.TagPool.removeAll()
  4525. };
  4526. b.create = function(a) {
  4527. if (!this.isPreloadStarted(a)) {
  4528. var b = createjs.HTMLAudioPlugin.TagPool.get(a), c = this._createTag(a);
  4529. c.id = a;
  4530. b.add(c);
  4531. this.preload(a, {tag: c})
  4532. }
  4533. return new createjs.HTMLAudioPlugin.SoundInstance(a, this)
  4534. };
  4535. b.isPreloadStarted = function(a) {
  4536. return null != this._audioSources[a]
  4537. };
  4538. b.preload = function(a, b) {
  4539. this._audioSources[a] = !0;
  4540. new createjs.HTMLAudioPlugin.Loader(a, b.tag)
  4541. };
  4542. b.toString = function() {
  4543. return"[HTMLAudioPlugin]"
  4544. };
  4545. createjs.HTMLAudioPlugin = c
  4546. })();
  4547. (function() {
  4548. function c(a, b) {
  4549. this._init(a, b)
  4550. }
  4551. var b = c.prototype = new createjs.EventDispatcher;
  4552. b.src = null;
  4553. b.uniqueId = -1;
  4554. b.playState = null;
  4555. b._owner = null;
  4556. b.loaded = !1;
  4557. b._offset = 0;
  4558. b._delay = 0;
  4559. b._volume = 1;
  4560. try {
  4561. Object.defineProperty(b, "volume", {get: function() {
  4562. return this._volume
  4563. }, set: function(a) {
  4564. null != Number(a) && (a = Math.max(0, Math.min(1, a)), this._volume = a, this._updateVolume())
  4565. }})
  4566. } catch (a) {
  4567. }
  4568. b.pan = 0;
  4569. b._duration = 0;
  4570. b._remainingLoops = 0;
  4571. b._delayTimeoutId = null;
  4572. b.tag = null;
  4573. b._muted = !1;
  4574. b._paused = !1;
  4575. b._endedHandler = null;
  4576. b._readyHandler = null;
  4577. b._stalledHandler = null;
  4578. b.loopHandler = null;
  4579. b._init = function(a, b) {
  4580. this.src = a;
  4581. this._owner = b;
  4582. this._endedHandler = createjs.proxy(this._handleSoundComplete, this);
  4583. this._readyHandler = createjs.proxy(this._handleSoundReady, this);
  4584. this._stalledHandler = createjs.proxy(this._handleSoundStalled, this);
  4585. this.loopHandler = createjs.proxy(this.handleSoundLoop, this)
  4586. };
  4587. b._sendEvent = function(a) {
  4588. a = new createjs.Event(a);
  4589. this.dispatchEvent(a)
  4590. };
  4591. b._cleanUp = function() {
  4592. var a = this.tag;
  4593. if (null != a) {
  4594. a.pause();
  4595. a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,
  4596. this._endedHandler, !1);
  4597. a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, !1);
  4598. a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this.loopHandler, !1);
  4599. try {
  4600. a.currentTime = 0
  4601. } catch (b) {
  4602. }
  4603. createjs.HTMLAudioPlugin.TagPool.setInstance(this.src, a);
  4604. this.tag = null
  4605. }
  4606. clearTimeout(this._delayTimeoutId);
  4607. null != window.createjs && createjs.Sound._playFinished(this)
  4608. };
  4609. b._interrupt = function() {
  4610. null != this.tag && (this.playState = createjs.Sound.PLAY_INTERRUPTED, this._cleanUp(), this._paused = !1,
  4611. this._sendEvent("interrupted"))
  4612. };
  4613. b.play = function(a, b, c, e, f, h) {
  4614. this._cleanUp();
  4615. createjs.Sound._playInstance(this, a, b, c, e, f, h)
  4616. };
  4617. b._beginPlaying = function(a, b, c, e) {
  4618. if (null == window.createjs)
  4619. return-1;
  4620. var f = this.tag = createjs.HTMLAudioPlugin.TagPool.getInstance(this.src);
  4621. return null == f ? (this.playFailed(), -1) : (f.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1), this._offset = a, this.volume = c, this.pan = e, this._updateVolume(), this._remainingLoops = b, 4 !== f.readyState ? (f.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,
  4622. this._readyHandler, !1), f.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, !1), f.preload = "auto", f.load()) : this._handleSoundReady(null), this._sendEvent("succeeded"), 1)
  4623. };
  4624. b._handleSoundStalled = function() {
  4625. this._cleanUp();
  4626. this._sendEvent("failed")
  4627. };
  4628. b._handleSoundReady = function() {
  4629. if (null != window.createjs) {
  4630. if (this._duration = 1E3 * this.tag.duration, this.playState = createjs.Sound.PLAY_SUCCEEDED, this._paused = !1, this.tag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler,
  4631. !1), this._offset >= this.getDuration())
  4632. return this.playFailed(), void 0;
  4633. 0 < this._offset && (this.tag.currentTime = 0.001 * this._offset);
  4634. -1 == this._remainingLoops && (this.tag.loop = !0);
  4635. 0 != this._remainingLoops && (this.tag.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this.loopHandler, !1), this.tag.loop = !0);
  4636. this.tag.play()
  4637. }
  4638. };
  4639. b.pause = function() {
  4640. return this._paused || this.playState != createjs.Sound.PLAY_SUCCEEDED || null == this.tag ? !1 : (this._paused = !0, this.tag.pause(), clearTimeout(this._delayTimeoutId), !0)
  4641. };
  4642. b.resume =
  4643. function() {
  4644. return this._paused && null != this.tag ? (this._paused = !1, this.tag.play(), !0) : !1
  4645. };
  4646. b.stop = function() {
  4647. return this._offset = 0, this.pause(), this.playState = createjs.Sound.PLAY_FINISHED, this._cleanUp(), !0
  4648. };
  4649. b.setMasterVolume = function() {
  4650. return this._updateVolume(), !0
  4651. };
  4652. b.setVolume = function(a) {
  4653. return this.volume = a, !0
  4654. };
  4655. b._updateVolume = function() {
  4656. if (null != this.tag) {
  4657. var a = this._muted || createjs.Sound._masterMute ? 0 : this._volume * createjs.Sound._masterVolume;
  4658. return a != this.tag.volume && (this.tag.volume = a), !0
  4659. }
  4660. return!1
  4661. };
  4662. b.getVolume = function() {
  4663. return this.volume
  4664. };
  4665. b.setMasterMute = function() {
  4666. return this._updateVolume(), !0
  4667. };
  4668. b.setMute = function(a) {
  4669. return null == a || void 0 == a ? !1 : (this._muted = a, this._updateVolume(), !0)
  4670. };
  4671. b.getMute = function() {
  4672. return this._muted
  4673. };
  4674. b.setPan = function() {
  4675. return!1
  4676. };
  4677. b.getPan = function() {
  4678. return 0
  4679. };
  4680. b.getPosition = function() {
  4681. return null == this.tag ? this._offset : 1E3 * this.tag.currentTime
  4682. };
  4683. b.setPosition = function(a) {
  4684. if (null == this.tag)
  4685. this._offset = a;
  4686. else {
  4687. this.tag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,
  4688. this.loopHandler, !1);
  4689. try {
  4690. this.tag.currentTime = 0.001 * a
  4691. } catch (b) {
  4692. return!1
  4693. }
  4694. this.tag.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this.loopHandler, !1)
  4695. }
  4696. return!0
  4697. };
  4698. b.getDuration = function() {
  4699. return this._duration
  4700. };
  4701. b._handleSoundComplete = function() {
  4702. this._offset = 0;
  4703. null != window.createjs && (this.playState = createjs.Sound.PLAY_FINISHED, this._cleanUp(), this._sendEvent("complete"))
  4704. };
  4705. b.handleSoundLoop = function() {
  4706. this._offset = 0;
  4707. this._remainingLoops--;
  4708. 0 == this._remainingLoops && (this.tag.loop = !1, this.tag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,
  4709. this.loopHandler, !1));
  4710. this._sendEvent("loop")
  4711. };
  4712. b.playFailed = function() {
  4713. null != window.createjs && (this.playState = createjs.Sound.PLAY_FAILED, this._cleanUp(), this._sendEvent("failed"))
  4714. };
  4715. b.toString = function() {
  4716. return"[HTMLAudioPlugin SoundInstance]"
  4717. };
  4718. createjs.HTMLAudioPlugin.SoundInstance = c
  4719. })();
  4720. (function() {
  4721. function c(a, b) {
  4722. this._init(a, b)
  4723. }
  4724. var b = c.prototype;
  4725. b.src = null;
  4726. b.tag = null;
  4727. b.preloadTimer = null;
  4728. b.loadedHandler = null;
  4729. b._init = function(a, b) {
  4730. if (this.src = a, this.tag = b, this.preloadTimer = setInterval(createjs.proxy(this.preloadTick, this), 200), this.loadedHandler = createjs.proxy(this.sendLoadedEvent, this), this.tag.addEventListener && this.tag.addEventListener("canplaythrough", this.loadedHandler), null == this.tag.onreadystatechange)
  4731. this.tag.onreadystatechange = createjs.proxy(this.sendLoadedEvent, this);
  4732. else {
  4733. var c =
  4734. this.tag.onreadystatechange;
  4735. this.tag.onreadystatechange = function() {
  4736. c();
  4737. this.tag.onreadystatechange = createjs.proxy(this.sendLoadedEvent, this)
  4738. }
  4739. }
  4740. this.tag.preload = "auto";
  4741. this.tag.load()
  4742. };
  4743. b.preloadTick = function() {
  4744. var a = this.tag.buffered, b = this.tag.duration;
  4745. 0 < a.length && a.end(0) >= b - 1 && this.handleTagLoaded()
  4746. };
  4747. b.handleTagLoaded = function() {
  4748. clearInterval(this.preloadTimer)
  4749. };
  4750. b.sendLoadedEvent = function() {
  4751. this.tag.removeEventListener && this.tag.removeEventListener("canplaythrough", this.loadedHandler);
  4752. this.tag.onreadystatechange =
  4753. null;
  4754. createjs.Sound._sendFileLoadEvent(this.src)
  4755. };
  4756. b.toString = function() {
  4757. return"[HTMLAudioPlugin Loader]"
  4758. };
  4759. createjs.HTMLAudioPlugin.Loader = c
  4760. })();
  4761. (function() {
  4762. function c(a) {
  4763. this._init(a)
  4764. }
  4765. c.tags = {};
  4766. c.get = function(a) {
  4767. var b = c.tags[a];
  4768. return null == b && (b = c.tags[a] = new c(a)), b
  4769. };
  4770. c.remove = function(a) {
  4771. var b = c.tags[a];
  4772. return null == b ? !1 : (b.removeAll(), delete c.tags[a], !0)
  4773. };
  4774. c.removeAll = function() {
  4775. for (var a in c.tags)
  4776. c.tags[a].removeAll();
  4777. c.tags = {}
  4778. };
  4779. c.getInstance = function(a) {
  4780. a = c.tags[a];
  4781. return null == a ? null : a.get()
  4782. };
  4783. c.setInstance = function(a, b) {
  4784. var d = c.tags[a];
  4785. return null == d ? null : d.set(b)
  4786. };
  4787. c.checkSrc = function(a) {
  4788. a = c.tags[a];
  4789. return null == a ? null : (a.checkSrcChange(),
  4790. void 0)
  4791. };
  4792. var b = c.prototype;
  4793. b.src = null;
  4794. b.length = 0;
  4795. b.available = 0;
  4796. b.tags = null;
  4797. b._init = function(a) {
  4798. this.src = a;
  4799. this.tags = []
  4800. };
  4801. b.add = function(a) {
  4802. this.tags.push(a);
  4803. this.length++;
  4804. this.available++
  4805. };
  4806. b.removeAll = function() {
  4807. for (; this.length--; )
  4808. delete this.tags[this.length];
  4809. this.src = null;
  4810. this.tags.length = 0
  4811. };
  4812. b.get = function() {
  4813. if (0 == this.tags.length)
  4814. return null;
  4815. this.available = this.tags.length;
  4816. var a = this.tags.pop();
  4817. return null == a.parentNode && document.body.appendChild(a), a
  4818. };
  4819. b.set = function(a) {
  4820. -1 == createjs.indexOf(this.tags,
  4821. a) && this.tags.push(a);
  4822. this.available = this.tags.length
  4823. };
  4824. b.checkSrcChange = function() {
  4825. for (var a = this.tags.length - 1, b = this.tags[a].src; a--; )
  4826. this.tags[a].src = b
  4827. };
  4828. b.toString = function() {
  4829. return"[HTMLAudioPlugin TagPool]"
  4830. };
  4831. createjs.HTMLAudioPlugin.TagPool = c
  4832. })();
  4833. this.createjs = this.createjs || {};
  4834. (function() {
  4835. var c = function(a, b, c) {
  4836. this.initialize(a, b, c)
  4837. }, b = c.prototype = new createjs.EventDispatcher;
  4838. c.NONE = 0;
  4839. c.LOOP = 1;
  4840. c.REVERSE = 2;
  4841. c.IGNORE = {};
  4842. c._tweens = [];
  4843. c._plugins = {};
  4844. c.get = function(a, b, d, g) {
  4845. return g && c.removeTweens(a), new c(a, b, d)
  4846. };
  4847. c.tick = function(a, b) {
  4848. for (var d = c._tweens.slice(), g = d.length - 1; 0 <= g; g--) {
  4849. var e = d[g];
  4850. b && !e.ignoreGlobalPause || e._paused || e.tick(e._useTicks ? 1 : a)
  4851. }
  4852. };
  4853. c.handleEvent = function(a) {
  4854. "tick" == a.type && this.tick(a.delta, a.paused)
  4855. };
  4856. c.removeTweens = function(a) {
  4857. if (a.tweenjs_count) {
  4858. for (var b =
  4859. c._tweens, d = b.length - 1; 0 <= d; d--)
  4860. b[d]._target == a && (b[d]._paused = !0, b.splice(d, 1));
  4861. a.tweenjs_count = 0
  4862. }
  4863. };
  4864. c.removeAllTweens = function() {
  4865. for (var a = c._tweens, b = 0, d = a.length; d > b; b++) {
  4866. var g = a[b];
  4867. g.paused = !0;
  4868. g.target.tweenjs_count = 0
  4869. }
  4870. a.length = 0
  4871. };
  4872. c.hasActiveTweens = function(a) {
  4873. return a ? a.tweenjs_count : c._tweens && !!c._tweens.length
  4874. };
  4875. c.installPlugin = function(a, b) {
  4876. var d = a.priority;
  4877. null == d && (a.priority = d = 0);
  4878. for (var g = 0, e = b.length, f = c._plugins; e > g; g++) {
  4879. var h = b[g];
  4880. if (f[h]) {
  4881. for (var l = f[h], m = 0, n = l.length; n > m && !(d < l[m].priority); m++)
  4882. ;
  4883. f[h].splice(m, 0, a)
  4884. } else
  4885. f[h] = [a]
  4886. }
  4887. };
  4888. c._register = function(a, b) {
  4889. var d = a._target, g = c._tweens;
  4890. if (b)
  4891. d && (d.tweenjs_count = d.tweenjs_count ? d.tweenjs_count + 1 : 1), g.push(a), !c._inited && createjs.Ticker && (createjs.Ticker.addEventListener("tick", c), c._inited = !0);
  4892. else
  4893. for (d && d.tweenjs_count--, d = g.length; d--; )
  4894. if (g[d] == a)
  4895. return g.splice(d, 1), void 0
  4896. };
  4897. b.ignoreGlobalPause = !1;
  4898. b.loop = !1;
  4899. b.duration = 0;
  4900. b.pluginData = null;
  4901. b.target = null;
  4902. b.position = null;
  4903. b.passive = !1;
  4904. b._paused = !1;
  4905. b._curQueueProps = null;
  4906. b._initQueueProps = null;
  4907. b._steps =
  4908. null;
  4909. b._actions = null;
  4910. b._prevPosition = 0;
  4911. b._stepPosition = 0;
  4912. b._prevPos = -1;
  4913. b._target = null;
  4914. b._useTicks = !1;
  4915. b._inited = !1;
  4916. b.initialize = function(a, b, d) {
  4917. this.target = this._target = a;
  4918. b && (this._useTicks = b.useTicks, this.ignoreGlobalPause = b.ignoreGlobalPause, this.loop = b.loop, b.onChange && this.addEventListener("change", b.onChange), b.override && c.removeTweens(a));
  4919. this.pluginData = d || {};
  4920. this._curQueueProps = {};
  4921. this._initQueueProps = {};
  4922. this._steps = [];
  4923. this._actions = [];
  4924. b && b.paused ? this._paused = !0 : c._register(this, !0);
  4925. b && null !=
  4926. b.position && this.setPosition(b.position, c.NONE)
  4927. };
  4928. b.wait = function(a, b) {
  4929. if (null == a || 0 >= a)
  4930. return this;
  4931. var c = this._cloneProps(this._curQueueProps);
  4932. return this._addStep({d: a, p0: c, e: this._linearEase, p1: c, v: b})
  4933. };
  4934. b.to = function(a, b, c) {
  4935. return(isNaN(b) || 0 > b) && (b = 0), this._addStep({d: b || 0, p0: this._cloneProps(this._curQueueProps), e: c, p1: this._cloneProps(this._appendQueueProps(a))})
  4936. };
  4937. b.call = function(a, b, c) {
  4938. return this._addAction({f: a, p: b ? b : [this], o: c ? c : this._target})
  4939. };
  4940. b.set = function(a, b) {
  4941. return this._addAction({f: this._set,
  4942. o: this, p: [a, b ? b : this._target]})
  4943. };
  4944. b.play = function(a) {
  4945. return a || (a = this), this.call(a.setPaused, [!1], a)
  4946. };
  4947. b.pause = function(a) {
  4948. return a || (a = this), this.call(a.setPaused, [!0], a)
  4949. };
  4950. b.setPosition = function(a, b) {
  4951. 0 > a && (a = 0);
  4952. null == b && (b = 1);
  4953. var c = a, g = !1;
  4954. if (c >= this.duration && (this.loop ? c %= this.duration : (c = this.duration, g = !0)), c == this._prevPos)
  4955. return g;
  4956. var e = this._prevPos;
  4957. if (this.position = this._prevPos = c, this._prevPosition = a, this._target)
  4958. if (g)
  4959. this._updateTargetProps(null, 1);
  4960. else if (0 < this._steps.length) {
  4961. for (var f =
  4962. 0, h = this._steps.length; h > f && !(this._steps[f].t > c); f++)
  4963. ;
  4964. f = this._steps[f - 1];
  4965. this._updateTargetProps(f, (this._stepPosition = c - f.t) / f.d)
  4966. }
  4967. return 0 != b && 0 < this._actions.length && (this._useTicks ? this._runActions(c, c) : 1 == b && e > c ? (e != this.duration && this._runActions(e, this.duration), this._runActions(0, c, !0)) : this._runActions(e, c)), g && this.setPaused(!0), this.dispatchEvent("change"), g
  4968. };
  4969. b.tick = function(a) {
  4970. this._paused || this.setPosition(this._prevPosition + a)
  4971. };
  4972. b.setPaused = function(a) {
  4973. return this._paused = !!a, c._register(this,
  4974. !a), this
  4975. };
  4976. b.w = b.wait;
  4977. b.t = b.to;
  4978. b.c = b.call;
  4979. b.s = b.set;
  4980. b.toString = function() {
  4981. return"[Tween]"
  4982. };
  4983. b.clone = function() {
  4984. throw"Tween can not be cloned.";
  4985. };
  4986. b._updateTargetProps = function(a, b) {
  4987. var d, g, e, f;
  4988. if (a || 1 != b) {
  4989. if (this.passive = !!a.v, this.passive)
  4990. return;
  4991. a.e && (b = a.e(b, 0, 1, 1));
  4992. d = a.p0;
  4993. g = a.p1
  4994. } else
  4995. this.passive = !1, d = g = this._curQueueProps;
  4996. for (var h in this._initQueueProps) {
  4997. null == (e = d[h]) && (d[h] = e = this._initQueueProps[h]);
  4998. null == (f = g[h]) && (g[h] = f = e);
  4999. e = e == f || 0 == b || 1 == b || "number" != typeof e ? 1 == b ? f : e : e + (f - e) * b;
  5000. var l = !1;
  5001. if (f = c._plugins[h])
  5002. for (var m = 0, n = f.length; n > m; m++) {
  5003. var p = f[m].tween(this, h, e, d, g, b, !!a && d == g, !a);
  5004. p == c.IGNORE ? l = !0 : e = p
  5005. }
  5006. l || (this._target[h] = e)
  5007. }
  5008. };
  5009. b._runActions = function(a, b, c) {
  5010. var g = a, e = b, f = -1, h = this._actions.length, l = 1;
  5011. for (a > b && (g = b, e = a, f = h, h = l = -1); (f += l) != h; ) {
  5012. b = this._actions[f];
  5013. var m = b.t;
  5014. (m == e || m > g && e > m || c && m == a) && b.f.apply(b.o, b.p)
  5015. }
  5016. };
  5017. b._appendQueueProps = function(a) {
  5018. var b, d, g, e, f, h;
  5019. for (h in a)
  5020. if (void 0 === this._initQueueProps[h]) {
  5021. if (d = this._target[h], b = c._plugins[h])
  5022. for (g = 0, e = b.length; e > g; g++)
  5023. d = b[g].init(this,
  5024. h, d);
  5025. this._initQueueProps[h] = this._curQueueProps[h] = void 0 === d ? null : d
  5026. }
  5027. for (h in a) {
  5028. if (d = this._curQueueProps[h], b = c._plugins[h])
  5029. for (f = f || {}, g = 0, e = b.length; e > g; g++)
  5030. b[g].step && b[g].step(this, h, d, a[h], f);
  5031. this._curQueueProps[h] = a[h]
  5032. }
  5033. return f && this._appendQueueProps(f), this._curQueueProps
  5034. };
  5035. b._cloneProps = function(a) {
  5036. var b = {}, c;
  5037. for (c in a)
  5038. b[c] = a[c];
  5039. return b
  5040. };
  5041. b._addStep = function(a) {
  5042. return 0 < a.d && (this._steps.push(a), a.t = this.duration, this.duration += a.d), this
  5043. };
  5044. b._addAction = function(a) {
  5045. return a.t = this.duration,
  5046. this._actions.push(a), this
  5047. };
  5048. b._set = function(a, b) {
  5049. for (var c in a)
  5050. b[c] = a[c]
  5051. };
  5052. createjs.Tween = c
  5053. })();
  5054. this.createjs = this.createjs || {};
  5055. (function() {
  5056. var c = function(a, b, c) {
  5057. this.initialize(a, b, c)
  5058. }, b = c.prototype = new createjs.EventDispatcher;
  5059. b.ignoreGlobalPause = !1;
  5060. b.duration = 0;
  5061. b.loop = !1;
  5062. b.position = null;
  5063. b._paused = !1;
  5064. b._tweens = null;
  5065. b._labels = null;
  5066. b._labelList = null;
  5067. b._prevPosition = 0;
  5068. b._prevPos = -1;
  5069. b._useTicks = !1;
  5070. b.initialize = function(a, b, c) {
  5071. this._tweens = [];
  5072. c && (this._useTicks = c.useTicks, this.loop = c.loop, this.ignoreGlobalPause = c.ignoreGlobalPause, c.onChange && this.addEventListener("change", c.onChange));
  5073. a && this.addTween.apply(this, a);
  5074. this.setLabels(b);
  5075. c && c.paused ? this._paused = !0 : createjs.Tween._register(this, !0);
  5076. c && null != c.position && this.setPosition(c.position, createjs.Tween.NONE)
  5077. };
  5078. b.addTween = function(a) {
  5079. var b = arguments.length;
  5080. if (1 < b) {
  5081. for (var c = 0; b > c; c++)
  5082. this.addTween(arguments[c]);
  5083. return arguments[0]
  5084. }
  5085. return 0 == b ? null : (this.removeTween(a), this._tweens.push(a), a.setPaused(!0), a._paused = !1, a._useTicks = this._useTicks, a.duration > this.duration && (this.duration = a.duration), 0 <= this._prevPos && a.setPosition(this._prevPos, createjs.Tween.NONE), a)
  5086. };
  5087. b.removeTween =
  5088. function(a) {
  5089. var b = arguments.length;
  5090. if (1 < b) {
  5091. for (var c = !0, g = 0; b > g; g++)
  5092. c = c && this.removeTween(arguments[g]);
  5093. return c
  5094. }
  5095. if (0 == b)
  5096. return!1;
  5097. b = this._tweens;
  5098. for (g = b.length; g--; )
  5099. if (b[g] == a)
  5100. return b.splice(g, 1), a.duration >= this.duration && this.updateDuration(), !0;
  5101. return!1
  5102. };
  5103. b.addLabel = function(a, b) {
  5104. this._labels[a] = b;
  5105. var c = this._labelList;
  5106. if (c) {
  5107. for (var g = 0, e = c.length; e > g && !(b < c[g].position); g++)
  5108. ;
  5109. c.splice(g, 0, {label: a, position: b})
  5110. }
  5111. };
  5112. b.setLabels = function(a) {
  5113. this._labels = a ? a : {}
  5114. };
  5115. b.getLabels = function() {
  5116. var a = this._labelList;
  5117. if (!a) {
  5118. var a = this._labelList = [], b = this._labels, c;
  5119. for (c in b)
  5120. a.push({label: c, position: b[c]});
  5121. a.sort(function(a, b) {
  5122. return a.position - b.position
  5123. })
  5124. }
  5125. return a
  5126. };
  5127. b.getCurrentLabel = function() {
  5128. var a = this.getLabels(), b = this.position, c = a.length;
  5129. if (c) {
  5130. for (var g = 0; c > g && !(b < a[g].position); g++)
  5131. ;
  5132. return 0 == g ? null : a[g - 1].label
  5133. }
  5134. return null
  5135. };
  5136. b.gotoAndPlay = function(a) {
  5137. this.setPaused(!1);
  5138. this._goto(a)
  5139. };
  5140. b.gotoAndStop = function(a) {
  5141. this.setPaused(!0);
  5142. this._goto(a)
  5143. };
  5144. b.setPosition = function(a, b) {
  5145. 0 > a && (a = 0);
  5146. var c = this.loop ? a % this.duration :
  5147. a, g = !this.loop && a >= this.duration;
  5148. if (c == this._prevPos)
  5149. return g;
  5150. this._prevPosition = a;
  5151. this.position = this._prevPos = c;
  5152. for (var e = 0, f = this._tweens.length; f > e; e++)
  5153. if (this._tweens[e].setPosition(c, b), c != this._prevPos)
  5154. return!1;
  5155. return g && this.setPaused(!0), this.dispatchEvent("change"), g
  5156. };
  5157. b.setPaused = function(a) {
  5158. this._paused = !!a;
  5159. createjs.Tween._register(this, !a)
  5160. };
  5161. b.updateDuration = function() {
  5162. for (var a = this.duration = 0, b = this._tweens.length; b > a; a++) {
  5163. var c = this._tweens[a];
  5164. c.duration > this.duration && (this.duration =
  5165. c.duration)
  5166. }
  5167. };
  5168. b.tick = function(a) {
  5169. this.setPosition(this._prevPosition + a)
  5170. };
  5171. b.resolve = function(a) {
  5172. var b = parseFloat(a);
  5173. return isNaN(b) && (b = this._labels[a]), b
  5174. };
  5175. b.toString = function() {
  5176. return"[Timeline]"
  5177. };
  5178. b.clone = function() {
  5179. throw"Timeline can not be cloned.";
  5180. };
  5181. b._goto = function(a) {
  5182. a = this.resolve(a);
  5183. null != a && this.setPosition(a)
  5184. };
  5185. createjs.Timeline = c
  5186. })();
  5187. this.createjs = this.createjs || {};
  5188. (function() {
  5189. var c = function() {
  5190. throw"Ease cannot be instantiated.";
  5191. };
  5192. c.linear = function(b) {
  5193. return b
  5194. };
  5195. c.none = c.linear;
  5196. c.get = function(b) {
  5197. return-1 > b && (b = -1), 1 < b && (b = 1), function(a) {
  5198. return 0 == b ? a : 0 > b ? a * (a * -b + 1 + b) : a * ((2 - a) * b + (1 - b))
  5199. }
  5200. };
  5201. c.getPowIn = function(b) {
  5202. return function(a) {
  5203. return Math.pow(a, b)
  5204. }
  5205. };
  5206. c.getPowOut = function(b) {
  5207. return function(a) {
  5208. return 1 - Math.pow(1 - a, b)
  5209. }
  5210. };
  5211. c.getPowInOut = function(b) {
  5212. return function(a) {
  5213. return 1 > (a *= 2) ? 0.5 * Math.pow(a, b) : 1 - 0.5 * Math.abs(Math.pow(2 - a, b))
  5214. }
  5215. };
  5216. c.quadIn = c.getPowIn(2);
  5217. c.quadOut =
  5218. c.getPowOut(2);
  5219. c.quadInOut = c.getPowInOut(2);
  5220. c.cubicIn = c.getPowIn(3);
  5221. c.cubicOut = c.getPowOut(3);
  5222. c.cubicInOut = c.getPowInOut(3);
  5223. c.quartIn = c.getPowIn(4);
  5224. c.quartOut = c.getPowOut(4);
  5225. c.quartInOut = c.getPowInOut(4);
  5226. c.quintIn = c.getPowIn(5);
  5227. c.quintOut = c.getPowOut(5);
  5228. c.quintInOut = c.getPowInOut(5);
  5229. c.sineIn = function(b) {
  5230. return 1 - Math.cos(b * Math.PI / 2)
  5231. };
  5232. c.sineOut = function(b) {
  5233. return Math.sin(b * Math.PI / 2)
  5234. };
  5235. c.sineInOut = function(b) {
  5236. return-0.5 * (Math.cos(Math.PI * b) - 1)
  5237. };
  5238. c.getBackIn = function(b) {
  5239. return function(a) {
  5240. return a *
  5241. a * ((b + 1) * a - b)
  5242. }
  5243. };
  5244. c.backIn = c.getBackIn(1.7);
  5245. c.getBackOut = function(b) {
  5246. return function(a) {
  5247. return--a * a * ((b + 1) * a + b) + 1
  5248. }
  5249. };
  5250. c.backOut = c.getBackOut(1.7);
  5251. c.getBackInOut = function(b) {
  5252. return b *= 1.525, function(a) {
  5253. return 1 > (a *= 2) ? 0.5 * a * a * ((b + 1) * a - b) : 0.5 * ((a -= 2) * a * ((b + 1) * a + b) + 2)
  5254. }
  5255. };
  5256. c.backInOut = c.getBackInOut(1.7);
  5257. c.circIn = function(b) {
  5258. return-(Math.sqrt(1 - b * b) - 1)
  5259. };
  5260. c.circOut = function(b) {
  5261. return Math.sqrt(1 - --b * b)
  5262. };
  5263. c.circInOut = function(b) {
  5264. return 1 > (b *= 2) ? -0.5 * (Math.sqrt(1 - b * b) - 1) : 0.5 * (Math.sqrt(1 - (b -= 2) * b) + 1)
  5265. };
  5266. c.bounceIn =
  5267. function(b) {
  5268. return 1 - c.bounceOut(1 - b)
  5269. };
  5270. c.bounceOut = function(b) {
  5271. return 1 / 2.75 > b ? 7.5625 * b * b : 2 / 2.75 > b ? 7.5625 * (b -= 1.5 / 2.75) * b + 0.75 : 2.5 / 2.75 > b ? 7.5625 * (b -= 2.25 / 2.75) * b + 0.9375 : 7.5625 * (b -= 2.625 / 2.75) * b + 0.984375
  5272. };
  5273. c.bounceInOut = function(b) {
  5274. return 0.5 > b ? 0.5 * c.bounceIn(2 * b) : 0.5 * c.bounceOut(2 * b - 1) + 0.5
  5275. };
  5276. c.getElasticIn = function(b, a) {
  5277. var c = 2 * Math.PI;
  5278. return function(d) {
  5279. if (0 == d || 1 == d)
  5280. return d;
  5281. var g = a / c * Math.asin(1 / b);
  5282. return-(b * Math.pow(2, 10 * (d -= 1)) * Math.sin((d - g) * c / a))
  5283. }
  5284. };
  5285. c.elasticIn = c.getElasticIn(1, 0.3);
  5286. c.getElasticOut =
  5287. function(b, a) {
  5288. var c = 2 * Math.PI;
  5289. return function(d) {
  5290. if (0 == d || 1 == d)
  5291. return d;
  5292. var g = a / c * Math.asin(1 / b);
  5293. return b * Math.pow(2, -10 * d) * Math.sin((d - g) * c / a) + 1
  5294. }
  5295. };
  5296. c.elasticOut = c.getElasticOut(1, 0.3);
  5297. c.getElasticInOut = function(b, a) {
  5298. var c = 2 * Math.PI;
  5299. return function(d) {
  5300. var g = a / c * Math.asin(1 / b);
  5301. return 1 > (d *= 2) ? -0.5 * b * Math.pow(2, 10 * (d -= 1)) * Math.sin((d - g) * c / a) : 0.5 * b * Math.pow(2, -10 * (d -= 1)) * Math.sin((d - g) * c / a) + 1
  5302. }
  5303. };
  5304. c.elasticInOut = c.getElasticInOut(1, 0.3 * 1.5);
  5305. createjs.Ease = c
  5306. })();
  5307. this.createjs = this.createjs || {};
  5308. (function() {
  5309. var c = function() {
  5310. throw"MotionGuidePlugin cannot be instantiated.";
  5311. };
  5312. c.priority = 0;
  5313. c._rotOffS;
  5314. c._rotOffE;
  5315. c._rotNormS;
  5316. c._rotNormE;
  5317. c.install = function() {
  5318. return createjs.Tween.installPlugin(c, ["guide", "x", "y", "rotation"]), createjs.Tween.IGNORE
  5319. };
  5320. c.init = function(b, a, c) {
  5321. var d = b.target;
  5322. return d.hasOwnProperty("x") || (d.x = 0), d.hasOwnProperty("y") || (d.y = 0), d.hasOwnProperty("rotation") || (d.rotation = 0), "rotation" == a && (b.__needsRot = !0), "guide" == a ? null : c
  5323. };
  5324. c.step = function(b, a, k, d, g) {
  5325. if ("rotation" == a && (b.__rotGlobalS =
  5326. k, b.__rotGlobalE = d, c.testRotData(b, g)), "guide" != a)
  5327. return d;
  5328. var e;
  5329. d.hasOwnProperty("path") || (d.path = []);
  5330. a = d.path;
  5331. if (d.hasOwnProperty("end") || (d.end = 1), d.hasOwnProperty("start") || (d.start = k && k.hasOwnProperty("end") && k.path === a ? k.end : 0), d.hasOwnProperty("_segments") && d._length)
  5332. return d;
  5333. k = a.length;
  5334. if (!(6 <= k && 0 == (k - 2) % 4))
  5335. throw"invalid 'path' data, please see documentation for valid paths";
  5336. d._segments = [];
  5337. d._length = 0;
  5338. for (var f = 2; k > f; f += 4) {
  5339. for (var h, l, m = a[f - 2], n = a[f - 1], p = a[f + 0], r = a[f + 1], q = a[f + 2], s = a[f + 3],
  5340. u = m, t = n, w = 0, z = [], A = 1; 10 >= A; A++) {
  5341. l = A / 10;
  5342. var y = 1 - l;
  5343. h = y * y * m + 2 * y * l * p + l * l * q;
  5344. l = y * y * n + 2 * y * l * r + l * l * s;
  5345. w += z[z.push(Math.sqrt((e = h - u) * e + (e = l - t) * e)) - 1];
  5346. u = h;
  5347. t = l
  5348. }
  5349. d._segments.push(w);
  5350. d._segments.push(z);
  5351. d._length += w
  5352. }
  5353. e = d.orient;
  5354. d.orient = !0;
  5355. a = {};
  5356. return c.calc(d, d.start, a), b.__rotPathS = Number(a.rotation.toFixed(5)), c.calc(d, d.end, a), b.__rotPathE = Number(a.rotation.toFixed(5)), d.orient = !1, c.calc(d, d.end, g), d.orient = e, d.orient ? (b.__guideData = d, c.testRotData(b, g), d) : d
  5357. };
  5358. c.testRotData = function(b, a) {
  5359. if (void 0 === b.__rotGlobalS ||
  5360. void 0 === b.__rotGlobalE) {
  5361. if (b.__needsRot)
  5362. return;
  5363. b.__rotGlobalS = b.__rotGlobalE = void 0 !== b._curQueueProps.rotation ? b._curQueueProps.rotation : a.rotation = b.target.rotation || 0
  5364. }
  5365. if (void 0 !== b.__guideData) {
  5366. var c = b.__guideData, d = b.__rotGlobalE - b.__rotGlobalS, g = b.__rotPathE - b.__rotPathS, e = d - g;
  5367. if ("auto" == c.orient)
  5368. 180 < e ? e -= 360 : -180 > e && (e += 360);
  5369. else if ("cw" == c.orient) {
  5370. for (; 0 > e; )
  5371. e += 360;
  5372. 0 == e && 0 < d && 180 != d && (e += 360)
  5373. } else if ("ccw" == c.orient) {
  5374. for (e = d - (180 < g?360 - g:g); 0 < e; )
  5375. e -= 360;
  5376. 0 == e && 0 > d && -180 != d && (e -= 360)
  5377. }
  5378. c.rotDelta =
  5379. e;
  5380. c.rotOffS = b.__rotGlobalS - b.__rotPathS;
  5381. b.__rotGlobalS = b.__rotGlobalE = b.__guideData = b.__needsRot = void 0
  5382. }
  5383. };
  5384. c.tween = function(b, a, k, d, g, e, f) {
  5385. g = g.guide;
  5386. if (void 0 == g || g === d.guide)
  5387. return k;
  5388. if (g.lastRatio != e) {
  5389. switch (c.calc(g, (g.end - g.start) * (f ? g.end : e) + g.start, b.target), g.orient) {
  5390. case "cw":
  5391. case "ccw":
  5392. case "auto":
  5393. b.target.rotation += g.rotOffS + g.rotDelta * e;
  5394. break;
  5395. default:
  5396. b.target.rotation += g.rotOffS
  5397. }
  5398. g.lastRatio = e
  5399. }
  5400. return"rotation" != a || g.orient && "false" != g.orient ? b.target[a] : k
  5401. };
  5402. c.calc = function(b, a, k) {
  5403. void 0 ==
  5404. b._segments && c.validate(b);
  5405. void 0 == k && (k = {x: 0, y: 0, rotation: 0});
  5406. var d = b._segments, g = b.path, e = b._length * a, f = d.length - 2;
  5407. for (a = 0; e > d[a] && f > a; )
  5408. e -= d[a], a += 2;
  5409. for (var d = d[a + 1], h = 0, f = d.length - 1; e > d[h] && f > h; )
  5410. e -= d[h], h++;
  5411. e = h / ++f + e / (f * d[h]);
  5412. a = 2 * a + 2;
  5413. f = 1 - e;
  5414. return k.x = f * f * g[a - 2] + 2 * f * e * g[a + 0] + e * e * g[a + 2], k.y = f * f * g[a - 1] + 2 * f * e * g[a + 1] + e * e * g[a + 3], b.orient && (k.rotation = 57.2957795 * Math.atan2((g[a + 1] - g[a - 1]) * f + (g[a + 3] - g[a + 1]) * e, (g[a + 0] - g[a - 2]) * f + (g[a + 2] - g[a + 0]) * e)), k
  5415. };
  5416. createjs.MotionGuidePlugin = c
  5417. })();
  5418. this.createjs = this.createjs || {};
  5419. (function() {
  5420. var c = createjs.TweenJS = createjs.TweenJS || {};
  5421. c.version = "NEXT";
  5422. c.buildDate = "Thu, 12 Dec 2013 23:37:07 GMT"
  5423. })();
  5424. </script><script>(function() {
  5425. function m(e, b, f, g) {
  5426. b.split(" ").forEach(function(b) {
  5427. e.addEventListener(b, f, g || !1)
  5428. })
  5429. }
  5430. function C(e, b, f, g) {
  5431. b.split(" ").forEach(function(b) {
  5432. e.removeEventListener(b, f, g || !1)
  5433. })
  5434. }
  5435. function M() {
  5436. function e() {
  5437. n = 0;
  5438. Z = K;
  5439. D = N;
  5440. x = M;
  5441. O = Y;
  5442. q.text = p.text = r = 0;
  5443. q.x = p.x = 400;
  5444. $ = Date.now() / 1E3 | 0;
  5445. window.removeEventListener("resize", f, !1);
  5446. s.style.display = "none";
  5447. B()
  5448. }
  5449. function b() {
  5450. y = Math.min(innerWidth / 640, innerHeight / 960);
  5451. P = 640 * y | 0;
  5452. Q = 960 * y | 0;
  5453. R = (innerHeight - Q) / 2 | 0;
  5454. S = (innerWidth - P) / 2 | 0;
  5455. var d = E.style, c = {width: P + "px", height: Q +
  5456. "px", left: S + "px", top: R + "px"}, a;
  5457. for (a in c)
  5458. c.hasOwnProperty(a) && (d[a] = c[a])
  5459. }
  5460. function f() {
  5461. var d = 640 / 960 * innerHeight | 0;
  5462. s.style.width = d + "px";
  5463. s.style.left = ((innerWidth - d) / 2 | 0) + "px";
  5464. aa.style.fontSize = (34 / 960 * innerHeight | 0) + "px"
  5465. }
  5466. function g() {
  5467. function d(a) {
  5468. a.stopPropagation();
  5469. switch (a.target.getAttribute("data-action")) {
  5470. case "retry":
  5471. C(s, "click", d);
  5472. e();
  5473. _hmt.push(["_trackEvent", "button", "gameReStart"]);
  5474. break;
  5475. case "share":
  5476. F.style.display = "block", m(F, "click", function fa() {
  5477. C(F, "click", fa);
  5478. F.style.display = "none"
  5479. }),
  5480. _hmt.push(["_trackEvent", "button", "share"])
  5481. }
  5482. }
  5483. f();
  5484. window.addEventListener("resize", f, !1);
  5485. k = 100 * (r / 80);
  5486. k = isNaN(k) ? 0.1 : Math.max(0.1, Math.min(99.9, k));
  5487. k = k.toFixed(1);
  5488. for (var c = n, a = T.length - 1; -1 < a; --a) {
  5489. var ba = T[a], c = c - ba[0] * n;
  5490. if (r >= c) {
  5491. ca = ba[1];
  5492. break
  5493. }
  5494. }
  5495. aa.innerHTML = '\u6211\u6293\u4e86<span style="color:#f00">' + r + "</span>\u53ea\u8783\u87f9\u5566\uff01\u6253\u8d25" + k + "%\u7684\u6355\u87f9\u5927\u795e\uff0c\u6211\u662f" + ca;
  5496. da(r);
  5497. s.style.display = "block";
  5498. m(s, "click", d)
  5499. }
  5500. function L(d) {
  5501. var c = new createjs.Bitmap(ga);
  5502. c.x = d.x - ha / 2 - 13;
  5503. c.y = d.y - ea - 14;
  5504. l.addChild(c);
  5505. var a = new createjs.Bitmap(ia);
  5506. return{full: function() {
  5507. var c = a.getBounds();
  5508. a.x = d.x - c.width / 2 - 10;
  5509. a.y = d.y - ea + 34;
  5510. l.addChild(a)
  5511. }, clean: function() {
  5512. l.removeChild(c);
  5513. l.removeChild(a)
  5514. }}
  5515. }
  5516. function z(d) {
  5517. function c(a, d, e, t, b) {
  5518. 0 >= e ? b() : (--e, G.get(a).to({x: d}, t).to({x: d}, t).call(function() {
  5519. c(a, d, e, t, b)
  5520. }))
  5521. }
  5522. var a = d.person;
  5523. if (!a || a.y > u - 10)
  5524. return!1;
  5525. d.hit = !0;
  5526. ++r;
  5527. q.text = p.text = r;
  5528. q.x = p.x =
  5529. 480 - p.getBounds().width;
  5530. var e = d.y + a.y;
  5531. G.removeTweens(a);
  5532. var t = L({x: d._x, y: e});
  5533. c(a, 5, 1, x / 8, function() {
  5534. a.visible = !1;
  5535. var e = h.getResult(a.wetId), b = new createjs.Bitmap(e);
  5536. b.x = 0;
  5537. b.y = a.y;
  5538. d.addChild(b);
  5539. t.full();
  5540. c(b, 3, 2, x / 8, function() {
  5541. setTimeout(function() {
  5542. t.clean();
  5543. G.get(b).to({y: u, x: 0}, O).call(function() {
  5544. d.person = null;
  5545. d.removeChild(a);
  5546. d.removeChild(b);
  5547. a.x = 0;
  5548. a.y = u;
  5549. d.shown = !1;
  5550. d.hit = !1
  5551. })
  5552. }, x / 8)
  5553. })
  5554. });
  5555. return!0
  5556. }
  5557. function ja() {
  5558. for (var d = [], c = v.length - 1; -1 < c; --c) {
  5559. var a = v[c];
  5560. a.shown || a.hit || d.push(a)
  5561. }
  5562. return d
  5563. }
  5564. function ka(d,
  5565. c) {
  5566. for (var a = d.slice(), e = Math.min(a.length, c), b = [], f = 0; f < e; ++f) {
  5567. var g = a.length * Math.random() | 0;
  5568. b.push(a[g]);
  5569. a.splice(g, 1)
  5570. }
  5571. return b
  5572. }
  5573. function la() {
  5574. var d = "person-" + U[U.length * Math.random() | 0], c = h.getResult(d), c = new createjs.Bitmap(c);
  5575. c.wetId = d + "-wet";
  5576. c.x = 0;
  5577. c.y = u;
  5578. return c
  5579. }
  5580. function w(d) {
  5581. var c = ja();
  5582. 0 < c.length && c.length > v.length / 2 && (d = ka(c, d), n += d.length, d.forEach(function(a, d) {
  5583. a.shown = !0;
  5584. var c = a.person = la();
  5585. a.addChild(c);
  5586. G.get(c).wait(100 * d).to({y: 0}, Z).wait(x).to({y: u}, O).call(function() {
  5587. a.person = null;
  5588. a.removeChild(c);
  5589. a.shown = !1
  5590. })
  5591. }))
  5592. }
  5593. function B() {
  5594. var d = $ + V - (Date.now() / 1E3 | 0);
  5595. 0 >= d ? (A.text = '0"', setTimeout(g, 2E3)) : (10 >= d ? (D = 0.6 * N, w(2)) : (D = (0.5 + 0.5 * d / V) * N, w(1)), A.text = d + '"', setTimeout(B, D))
  5596. }
  5597. var E = document.getElementById("canvas"), l = new createjs.Stage(E), G = createjs.Tween, H = createjs.Ticker;
  5598. H.setFPS(30);
  5599. H.addEventListener("tick", l);
  5600. var v = [], u = 174, J = [516, 671, 835], H = [].concat.apply([], [118, 330, 538].map(function(d) {
  5601. return J.map(function(c) {
  5602. return[d, c]
  5603. })
  5604. })), K = 300, N = 600, M = 300, Y = 300, Z, D, x, O, r, V = 30, $, W = new createjs.Bitmap(h.getResult("bg"));
  5605. W.x = 0;
  5606. W.y = 0;
  5607. l.addChild(W);
  5608. var A = new createjs.Text(V + '"', "72px Arial", "#fff");
  5609. A.x = 130;
  5610. A.y = 28;
  5611. l.addChild(A);
  5612. var p = new createjs.Text(0, "148px Arial", "#fff"), q = new createjs.Text(0, "148px Arial", "#253574");
  5613. q.x = p.x = 400;
  5614. q.y = p.y = 28;
  5615. p.outline = 6;
  5616. l.addChild(p);
  5617. l.addChild(q);
  5618. var s = document.getElementById("board"), aa = document.getElementById("board-text"), P, Q, R, S, y;
  5619. b();
  5620. window.addEventListener("resize", b, !1);
  5621. var F = document.getElementById("share-tip");
  5622. (new Image).src = "img/share_tip.png?1408476074";
  5623. var ha = 114, ea =
  5624. 152, ga = h.getResult("bucket"), ia = h.getResult("water"), X = ["touchstart", "mousedown"], I;
  5625. m(E, X.join(" "), function c(a) {
  5626. if (void 0 === I) {
  5627. I = a.type;
  5628. for (var e = X.length - 1; -1 < e; --e) {
  5629. var b = X[e];
  5630. b !== I && C(E, b, c)
  5631. }
  5632. } else if (I !== a.type)
  5633. return;
  5634. a.stopPropagation();
  5635. b = a.touches ? a.touches[0].pageX : a.pageX;
  5636. a = a.touches ? a.touches[0].pageY : a.pageY;
  5637. b = (b - S) / y | 0;
  5638. a = (a - R) / y | 0;
  5639. for (e = v.length - 1; -1 < e; --e) {
  5640. var f = v[e];
  5641. if (!f.hit && f.shown) {
  5642. var g = f.x, l = f.y;
  5643. if (b >= g && (b <= g + 200 && a >= l && a <= l + 180) && z(f))
  5644. break
  5645. }
  5646. }
  5647. });
  5648. H.forEach(function(c) {
  5649. var a = new createjs.Container,
  5650. e = c[0];
  5651. c = c[1];
  5652. a._x = e;
  5653. a._y = c;
  5654. a.x = e - 71;
  5655. a.y = c - u;
  5656. var b = new createjs.Shape;
  5657. b.setBounds(0, 0, 200, 200);
  5658. b.graphics.drawCircle(100, 100, 100);
  5659. b.x = e - 100;
  5660. b.y = c - 200;
  5661. a.mask = b;
  5662. l.addChild(a);
  5663. v.push(a)
  5664. });
  5665. e()
  5666. }
  5667. function da(e) {
  5668. e = e || 0;
  5669. var b = "http://game.3gjj.cn/games/ice_bucket";
  5670. B("http://game.3gjj.cn/games/ice_bucket/img/bucket.png", b, "\u6211\u5728\u51b0\u6876\u6311\u6218\u6cfc\u4e86" + e + "\u6876\u51b0\u6c34,\u8d85\u8fc7\u4e86" + k + "%\u4eba,\u5feb\u6311\u6218\u6211!\u653e\u5f03\u5c31\u53bb\u6350\u6b3e\u5427~",
  5671. "\u5173\u6ce8\u808c\u840e\u7f29\u6027\u810a\u9ad3\u4fa7\u7d22\u786c\u5316\u75c7(ALS)\u75c5\uff0c\u53c2\u4e0e\u51b0\u6876\u6311\u6218\u6d3b\u52a8", "http://game.3gjj.cn/games/ice_bucket")
  5672. }
  5673. var B;
  5674. !function() {
  5675. var e = "", b = "", f = "", g = "", k = "";
  5676. B = function(z, h, m, n, w) {
  5677. "" != z && null != z ? e = z : "";
  5678. "" != h && null != h ? b = h : "";
  5679. "" != m && null != m ? f = m : "";
  5680. "" != n && null != n ? g = n : "";
  5681. "" != w && null != w ? k = w : ""
  5682. };
  5683. document.addEventListener("WeixinJSBridgeReady", function() {
  5684. WeixinJSBridge.on("menu:share:appmessage", function(h) {
  5685. WeixinJSBridge.invoke("sendAppMessage",
  5686. {img_url: e, link: b, desc: g, title: f}, function(b) {
  5687. document.location.href = k
  5688. })
  5689. });
  5690. WeixinJSBridge.on("menu:share:timeline", function(h) {
  5691. WeixinJSBridge.invoke("shareTimeline", {img_url: e, img_width: "300", img_height: "300", link: b, desc: g, title: f}, function(b) {
  5692. document.location.href = k
  5693. })
  5694. });
  5695. WeixinJSBridge.on("menu:share:weibo", function(e) {
  5696. WeixinJSBridge.invoke("shareWeibo", {content: g, url: b}, function(b) {
  5697. document.location.href = k
  5698. })
  5699. })
  5700. }, !1)
  5701. }();
  5702. var Y = document.getElementById("loading"), J = document.getElementById("loading-progress");
  5703. J.innerHTML = "10";
  5704. var U = ["lj", "fs", "ldh"], K = [{src: "bg.jpg?1408476074", id: "bg"}, {src: "bucket.png?1408476074", id: "bucket"}, {src: "water-full.png?1408476074", id: "water"}];
  5705. U.forEach(function(e) {
  5706. K.push({src: "person-" + e + ".png?1408476074", id: "person-" + e}, {src: "person-" + e + "-wet.png?1408476074", id: "person-" + e + "-wet"})
  5707. });
  5708. var h = new createjs.LoadQueue(!1, "img/");
  5709. h.loadManifest(K);
  5710. h.on("progress", function(e) {
  5711. J.innerHTML = (100 * e.progress).toFixed(2)
  5712. });
  5713. m(document, "touchmove", function(e) {
  5714. e.preventDefault();
  5715. e.stopPropagation()
  5716. });
  5717. var k = 0.1, n = 0, T = [[0.1, "\u5c4c\u4e1d\u6355\u87f9\u624b"], [0.1, "\u6355\u87f9\u4e13\u4e1a\u6237"], [0.2, "\u6355\u87f9\u4e13\u4e1a\u6237"], [0.3, "\u6355\u87f9\u795e\u4e2d\u795e"], [0.3, "\u6355\u87f9\u795e\u4e2d\u795e"]], ca = T[0][1];
  5718. h.on("complete", function() {
  5719. var e = document.getElementById("start"), b = document.getElementById("start-btn"), f = !1;
  5720. m(b, "click", function L(h) {
  5721. h.preventDefault();
  5722. C(b, "click", L);
  5723. e.style.display = "none";
  5724. f || (f = !0, M(), _hmt.push(["_trackEvent", "button", "gameStart"]))
  5725. });
  5726. Y.style.display = "none"
  5727. });
  5728. da()
  5729. })();
  5730. </script><script type="text/javascript" src="http://tajs.qq.com/stats?sId=36313548" charset="UTF-8"></script></html>