index.html 296 KB

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