worker-coffee.js 335 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589
  1. "no use strict";
  2. ;(function(window) {
  3. if (typeof window.window != "undefined" && window.document) {
  4. return;
  5. }
  6. window.console = function() {
  7. var msgs = Array.prototype.slice.call(arguments, 0);
  8. postMessage({type: "log", data: msgs});
  9. };
  10. window.console.error =
  11. window.console.warn =
  12. window.console.log =
  13. window.console.trace = window.console;
  14. window.window = window;
  15. window.ace = window;
  16. window.onerror = function(message, file, line, col, err) {
  17. console.error("Worker " + (err ? err.stack : message));
  18. };
  19. window.normalizeModule = function(parentId, moduleName) {
  20. // normalize plugin requires
  21. if (moduleName.indexOf("!") !== -1) {
  22. var chunks = moduleName.split("!");
  23. return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
  24. }
  25. // normalize relative requires
  26. if (moduleName.charAt(0) == ".") {
  27. var base = parentId.split("/").slice(0, -1).join("/");
  28. moduleName = (base ? base + "/" : "") + moduleName;
  29. while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
  30. var previous = moduleName;
  31. moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
  32. }
  33. }
  34. return moduleName;
  35. };
  36. window.require = function(parentId, id) {
  37. if (!id) {
  38. id = parentId;
  39. parentId = null;
  40. }
  41. if (!id.charAt)
  42. throw new Error("worker.js require() accepts only (parentId, id) as arguments");
  43. id = window.normalizeModule(parentId, id);
  44. var module = window.require.modules[id];
  45. if (module) {
  46. if (!module.initialized) {
  47. module.initialized = true;
  48. module.exports = module.factory().exports;
  49. }
  50. return module.exports;
  51. }
  52. var chunks = id.split("/");
  53. if (!window.require.tlns)
  54. return console.log("unable to load " + id);
  55. chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
  56. var path = chunks.join("/") + ".js";
  57. window.require.id = id;
  58. importScripts(path);
  59. return window.require(parentId, id);
  60. };
  61. window.require.modules = {};
  62. window.require.tlns = {};
  63. window.define = function(id, deps, factory) {
  64. if (arguments.length == 2) {
  65. factory = deps;
  66. if (typeof id != "string") {
  67. deps = id;
  68. id = window.require.id;
  69. }
  70. } else if (arguments.length == 1) {
  71. factory = id;
  72. deps = [];
  73. id = window.require.id;
  74. }
  75. if (!deps.length)
  76. // If there is no dependencies, we inject 'require', 'exports' and
  77. // 'module' as dependencies, to provide CommonJS compatibility.
  78. deps = ['require', 'exports', 'module'];
  79. if (id.indexOf("text!") === 0)
  80. return;
  81. var req = function(childId) {
  82. return window.require(id, childId);
  83. };
  84. window.require.modules[id] = {
  85. exports: {},
  86. factory: function() {
  87. var module = this;
  88. var returnExports = factory.apply(this, deps.map(function(dep) {
  89. switch(dep) {
  90. // Because 'require', 'exports' and 'module' aren't actual
  91. // dependencies, we must handle them seperately.
  92. case 'require': return req;
  93. case 'exports': return module.exports;
  94. case 'module': return module;
  95. // But for all other dependencies, we can just go ahead and
  96. // require them.
  97. default: return req(dep);
  98. }
  99. }));
  100. if (returnExports)
  101. module.exports = returnExports;
  102. return module;
  103. }
  104. };
  105. };
  106. window.define.amd = {};
  107. window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
  108. require.tlns = topLevelNamespaces;
  109. };
  110. window.initSender = function initSender() {
  111. var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
  112. var oop = window.require("ace/lib/oop");
  113. var Sender = function() {};
  114. (function() {
  115. oop.implement(this, EventEmitter);
  116. this.callback = function(data, callbackId) {
  117. postMessage({
  118. type: "call",
  119. id: callbackId,
  120. data: data
  121. });
  122. };
  123. this.emit = function(name, data) {
  124. postMessage({
  125. type: "event",
  126. name: name,
  127. data: data
  128. });
  129. };
  130. }).call(Sender.prototype);
  131. return new Sender();
  132. };
  133. var main = window.main = null;
  134. var sender = window.sender = null;
  135. window.onmessage = function(e) {
  136. var msg = e.data;
  137. if (msg.command) {
  138. if (main[msg.command])
  139. main[msg.command].apply(main, msg.args);
  140. else
  141. throw new Error("Unknown command:" + msg.command);
  142. }
  143. else if (msg.init) {
  144. initBaseUrls(msg.tlns);
  145. require("ace/lib/es5-shim");
  146. sender = window.sender = initSender();
  147. var clazz = require(msg.module)[msg.classname];
  148. main = window.main = new clazz(sender);
  149. }
  150. else if (msg.event && sender) {
  151. sender._signal(msg.event, msg.data);
  152. }
  153. };
  154. })(this);
  155. ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
  156. "use strict";
  157. exports.inherits = function(ctor, superCtor) {
  158. ctor.super_ = superCtor;
  159. ctor.prototype = Object.create(superCtor.prototype, {
  160. constructor: {
  161. value: ctor,
  162. enumerable: false,
  163. writable: true,
  164. configurable: true
  165. }
  166. });
  167. };
  168. exports.mixin = function(obj, mixin) {
  169. for (var key in mixin) {
  170. obj[key] = mixin[key];
  171. }
  172. return obj;
  173. };
  174. exports.implement = function(proto, mixin) {
  175. exports.mixin(proto, mixin);
  176. };
  177. });
  178. ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
  179. "use strict";
  180. var EventEmitter = {};
  181. var stopPropagation = function() { this.propagationStopped = true; };
  182. var preventDefault = function() { this.defaultPrevented = true; };
  183. EventEmitter._emit =
  184. EventEmitter._dispatchEvent = function(eventName, e) {
  185. this._eventRegistry || (this._eventRegistry = {});
  186. this._defaultHandlers || (this._defaultHandlers = {});
  187. var listeners = this._eventRegistry[eventName] || [];
  188. var defaultHandler = this._defaultHandlers[eventName];
  189. if (!listeners.length && !defaultHandler)
  190. return;
  191. if (typeof e != "object" || !e)
  192. e = {};
  193. if (!e.type)
  194. e.type = eventName;
  195. if (!e.stopPropagation)
  196. e.stopPropagation = stopPropagation;
  197. if (!e.preventDefault)
  198. e.preventDefault = preventDefault;
  199. listeners = listeners.slice();
  200. for (var i=0; i<listeners.length; i++) {
  201. listeners[i](e, this);
  202. if (e.propagationStopped)
  203. break;
  204. }
  205. if (defaultHandler && !e.defaultPrevented)
  206. return defaultHandler(e, this);
  207. };
  208. EventEmitter._signal = function(eventName, e) {
  209. var listeners = (this._eventRegistry || {})[eventName];
  210. if (!listeners)
  211. return;
  212. listeners = listeners.slice();
  213. for (var i=0; i<listeners.length; i++)
  214. listeners[i](e, this);
  215. };
  216. EventEmitter.once = function(eventName, callback) {
  217. var _self = this;
  218. callback && this.addEventListener(eventName, function newCallback() {
  219. _self.removeEventListener(eventName, newCallback);
  220. callback.apply(null, arguments);
  221. });
  222. };
  223. EventEmitter.setDefaultHandler = function(eventName, callback) {
  224. var handlers = this._defaultHandlers
  225. if (!handlers)
  226. handlers = this._defaultHandlers = {_disabled_: {}};
  227. if (handlers[eventName]) {
  228. var old = handlers[eventName];
  229. var disabled = handlers._disabled_[eventName];
  230. if (!disabled)
  231. handlers._disabled_[eventName] = disabled = [];
  232. disabled.push(old);
  233. var i = disabled.indexOf(callback);
  234. if (i != -1)
  235. disabled.splice(i, 1);
  236. }
  237. handlers[eventName] = callback;
  238. };
  239. EventEmitter.removeDefaultHandler = function(eventName, callback) {
  240. var handlers = this._defaultHandlers
  241. if (!handlers)
  242. return;
  243. var disabled = handlers._disabled_[eventName];
  244. if (handlers[eventName] == callback) {
  245. var old = handlers[eventName];
  246. if (disabled)
  247. this.setDefaultHandler(eventName, disabled.pop());
  248. } else if (disabled) {
  249. var i = disabled.indexOf(callback);
  250. if (i != -1)
  251. disabled.splice(i, 1);
  252. }
  253. };
  254. EventEmitter.on =
  255. EventEmitter.addEventListener = function(eventName, callback, capturing) {
  256. this._eventRegistry = this._eventRegistry || {};
  257. var listeners = this._eventRegistry[eventName];
  258. if (!listeners)
  259. listeners = this._eventRegistry[eventName] = [];
  260. if (listeners.indexOf(callback) == -1)
  261. listeners[capturing ? "unshift" : "push"](callback);
  262. return callback;
  263. };
  264. EventEmitter.off =
  265. EventEmitter.removeListener =
  266. EventEmitter.removeEventListener = function(eventName, callback) {
  267. this._eventRegistry = this._eventRegistry || {};
  268. var listeners = this._eventRegistry[eventName];
  269. if (!listeners)
  270. return;
  271. var index = listeners.indexOf(callback);
  272. if (index !== -1)
  273. listeners.splice(index, 1);
  274. };
  275. EventEmitter.removeAllListeners = function(eventName) {
  276. if (this._eventRegistry) this._eventRegistry[eventName] = [];
  277. };
  278. exports.EventEmitter = EventEmitter;
  279. });
  280. ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
  281. "use strict";
  282. var comparePoints = function(p1, p2) {
  283. return p1.row - p2.row || p1.column - p2.column;
  284. };
  285. var Range = function(startRow, startColumn, endRow, endColumn) {
  286. this.start = {
  287. row: startRow,
  288. column: startColumn
  289. };
  290. this.end = {
  291. row: endRow,
  292. column: endColumn
  293. };
  294. };
  295. (function() {
  296. this.isEqual = function(range) {
  297. return this.start.row === range.start.row &&
  298. this.end.row === range.end.row &&
  299. this.start.column === range.start.column &&
  300. this.end.column === range.end.column;
  301. };
  302. this.toString = function() {
  303. return ("Range: [" + this.start.row + "/" + this.start.column +
  304. "] -> [" + this.end.row + "/" + this.end.column + "]");
  305. };
  306. this.contains = function(row, column) {
  307. return this.compare(row, column) == 0;
  308. };
  309. this.compareRange = function(range) {
  310. var cmp,
  311. end = range.end,
  312. start = range.start;
  313. cmp = this.compare(end.row, end.column);
  314. if (cmp == 1) {
  315. cmp = this.compare(start.row, start.column);
  316. if (cmp == 1) {
  317. return 2;
  318. } else if (cmp == 0) {
  319. return 1;
  320. } else {
  321. return 0;
  322. }
  323. } else if (cmp == -1) {
  324. return -2;
  325. } else {
  326. cmp = this.compare(start.row, start.column);
  327. if (cmp == -1) {
  328. return -1;
  329. } else if (cmp == 1) {
  330. return 42;
  331. } else {
  332. return 0;
  333. }
  334. }
  335. };
  336. this.comparePoint = function(p) {
  337. return this.compare(p.row, p.column);
  338. };
  339. this.containsRange = function(range) {
  340. return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
  341. };
  342. this.intersects = function(range) {
  343. var cmp = this.compareRange(range);
  344. return (cmp == -1 || cmp == 0 || cmp == 1);
  345. };
  346. this.isEnd = function(row, column) {
  347. return this.end.row == row && this.end.column == column;
  348. };
  349. this.isStart = function(row, column) {
  350. return this.start.row == row && this.start.column == column;
  351. };
  352. this.setStart = function(row, column) {
  353. if (typeof row == "object") {
  354. this.start.column = row.column;
  355. this.start.row = row.row;
  356. } else {
  357. this.start.row = row;
  358. this.start.column = column;
  359. }
  360. };
  361. this.setEnd = function(row, column) {
  362. if (typeof row == "object") {
  363. this.end.column = row.column;
  364. this.end.row = row.row;
  365. } else {
  366. this.end.row = row;
  367. this.end.column = column;
  368. }
  369. };
  370. this.inside = function(row, column) {
  371. if (this.compare(row, column) == 0) {
  372. if (this.isEnd(row, column) || this.isStart(row, column)) {
  373. return false;
  374. } else {
  375. return true;
  376. }
  377. }
  378. return false;
  379. };
  380. this.insideStart = function(row, column) {
  381. if (this.compare(row, column) == 0) {
  382. if (this.isEnd(row, column)) {
  383. return false;
  384. } else {
  385. return true;
  386. }
  387. }
  388. return false;
  389. };
  390. this.insideEnd = function(row, column) {
  391. if (this.compare(row, column) == 0) {
  392. if (this.isStart(row, column)) {
  393. return false;
  394. } else {
  395. return true;
  396. }
  397. }
  398. return false;
  399. };
  400. this.compare = function(row, column) {
  401. if (!this.isMultiLine()) {
  402. if (row === this.start.row) {
  403. return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
  404. };
  405. }
  406. if (row < this.start.row)
  407. return -1;
  408. if (row > this.end.row)
  409. return 1;
  410. if (this.start.row === row)
  411. return column >= this.start.column ? 0 : -1;
  412. if (this.end.row === row)
  413. return column <= this.end.column ? 0 : 1;
  414. return 0;
  415. };
  416. this.compareStart = function(row, column) {
  417. if (this.start.row == row && this.start.column == column) {
  418. return -1;
  419. } else {
  420. return this.compare(row, column);
  421. }
  422. };
  423. this.compareEnd = function(row, column) {
  424. if (this.end.row == row && this.end.column == column) {
  425. return 1;
  426. } else {
  427. return this.compare(row, column);
  428. }
  429. };
  430. this.compareInside = function(row, column) {
  431. if (this.end.row == row && this.end.column == column) {
  432. return 1;
  433. } else if (this.start.row == row && this.start.column == column) {
  434. return -1;
  435. } else {
  436. return this.compare(row, column);
  437. }
  438. };
  439. this.clipRows = function(firstRow, lastRow) {
  440. if (this.end.row > lastRow)
  441. var end = {row: lastRow + 1, column: 0};
  442. else if (this.end.row < firstRow)
  443. var end = {row: firstRow, column: 0};
  444. if (this.start.row > lastRow)
  445. var start = {row: lastRow + 1, column: 0};
  446. else if (this.start.row < firstRow)
  447. var start = {row: firstRow, column: 0};
  448. return Range.fromPoints(start || this.start, end || this.end);
  449. };
  450. this.extend = function(row, column) {
  451. var cmp = this.compare(row, column);
  452. if (cmp == 0)
  453. return this;
  454. else if (cmp == -1)
  455. var start = {row: row, column: column};
  456. else
  457. var end = {row: row, column: column};
  458. return Range.fromPoints(start || this.start, end || this.end);
  459. };
  460. this.isEmpty = function() {
  461. return (this.start.row === this.end.row && this.start.column === this.end.column);
  462. };
  463. this.isMultiLine = function() {
  464. return (this.start.row !== this.end.row);
  465. };
  466. this.clone = function() {
  467. return Range.fromPoints(this.start, this.end);
  468. };
  469. this.collapseRows = function() {
  470. if (this.end.column == 0)
  471. return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
  472. else
  473. return new Range(this.start.row, 0, this.end.row, 0)
  474. };
  475. this.toScreenRange = function(session) {
  476. var screenPosStart = session.documentToScreenPosition(this.start);
  477. var screenPosEnd = session.documentToScreenPosition(this.end);
  478. return new Range(
  479. screenPosStart.row, screenPosStart.column,
  480. screenPosEnd.row, screenPosEnd.column
  481. );
  482. };
  483. this.moveBy = function(row, column) {
  484. this.start.row += row;
  485. this.start.column += column;
  486. this.end.row += row;
  487. this.end.column += column;
  488. };
  489. }).call(Range.prototype);
  490. Range.fromPoints = function(start, end) {
  491. return new Range(start.row, start.column, end.row, end.column);
  492. };
  493. Range.comparePoints = comparePoints;
  494. Range.comparePoints = function(p1, p2) {
  495. return p1.row - p2.row || p1.column - p2.column;
  496. };
  497. exports.Range = Range;
  498. });
  499. ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
  500. "use strict";
  501. var oop = require("./lib/oop");
  502. var EventEmitter = require("./lib/event_emitter").EventEmitter;
  503. var Anchor = exports.Anchor = function(doc, row, column) {
  504. this.$onChange = this.onChange.bind(this);
  505. this.attach(doc);
  506. if (typeof column == "undefined")
  507. this.setPosition(row.row, row.column);
  508. else
  509. this.setPosition(row, column);
  510. };
  511. (function() {
  512. oop.implement(this, EventEmitter);
  513. this.getPosition = function() {
  514. return this.$clipPositionToDocument(this.row, this.column);
  515. };
  516. this.getDocument = function() {
  517. return this.document;
  518. };
  519. this.$insertRight = false;
  520. this.onChange = function(e) {
  521. var delta = e.data;
  522. var range = delta.range;
  523. if (range.start.row == range.end.row && range.start.row != this.row)
  524. return;
  525. if (range.start.row > this.row)
  526. return;
  527. if (range.start.row == this.row && range.start.column > this.column)
  528. return;
  529. var row = this.row;
  530. var column = this.column;
  531. var start = range.start;
  532. var end = range.end;
  533. if (delta.action === "insertText") {
  534. if (start.row === row && start.column <= column) {
  535. if (start.column === column && this.$insertRight) {
  536. } else if (start.row === end.row) {
  537. column += end.column - start.column;
  538. } else {
  539. column -= start.column;
  540. row += end.row - start.row;
  541. }
  542. } else if (start.row !== end.row && start.row < row) {
  543. row += end.row - start.row;
  544. }
  545. } else if (delta.action === "insertLines") {
  546. if (start.row === row && column === 0 && this.$insertRight) {
  547. }
  548. else if (start.row <= row) {
  549. row += end.row - start.row;
  550. }
  551. } else if (delta.action === "removeText") {
  552. if (start.row === row && start.column < column) {
  553. if (end.column >= column)
  554. column = start.column;
  555. else
  556. column = Math.max(0, column - (end.column - start.column));
  557. } else if (start.row !== end.row && start.row < row) {
  558. if (end.row === row)
  559. column = Math.max(0, column - end.column) + start.column;
  560. row -= (end.row - start.row);
  561. } else if (end.row === row) {
  562. row -= end.row - start.row;
  563. column = Math.max(0, column - end.column) + start.column;
  564. }
  565. } else if (delta.action == "removeLines") {
  566. if (start.row <= row) {
  567. if (end.row <= row)
  568. row -= end.row - start.row;
  569. else {
  570. row = start.row;
  571. column = 0;
  572. }
  573. }
  574. }
  575. this.setPosition(row, column, true);
  576. };
  577. this.setPosition = function(row, column, noClip) {
  578. var pos;
  579. if (noClip) {
  580. pos = {
  581. row: row,
  582. column: column
  583. };
  584. } else {
  585. pos = this.$clipPositionToDocument(row, column);
  586. }
  587. if (this.row == pos.row && this.column == pos.column)
  588. return;
  589. var old = {
  590. row: this.row,
  591. column: this.column
  592. };
  593. this.row = pos.row;
  594. this.column = pos.column;
  595. this._signal("change", {
  596. old: old,
  597. value: pos
  598. });
  599. };
  600. this.detach = function() {
  601. this.document.removeEventListener("change", this.$onChange);
  602. };
  603. this.attach = function(doc) {
  604. this.document = doc || this.document;
  605. this.document.on("change", this.$onChange);
  606. };
  607. this.$clipPositionToDocument = function(row, column) {
  608. var pos = {};
  609. if (row >= this.document.getLength()) {
  610. pos.row = Math.max(0, this.document.getLength() - 1);
  611. pos.column = this.document.getLine(pos.row).length;
  612. }
  613. else if (row < 0) {
  614. pos.row = 0;
  615. pos.column = 0;
  616. }
  617. else {
  618. pos.row = row;
  619. pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
  620. }
  621. if (column < 0)
  622. pos.column = 0;
  623. return pos;
  624. };
  625. }).call(Anchor.prototype);
  626. });
  627. ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
  628. "use strict";
  629. var oop = require("./lib/oop");
  630. var EventEmitter = require("./lib/event_emitter").EventEmitter;
  631. var Range = require("./range").Range;
  632. var Anchor = require("./anchor").Anchor;
  633. var Document = function(text) {
  634. this.$lines = [];
  635. if (text.length === 0) {
  636. this.$lines = [""];
  637. } else if (Array.isArray(text)) {
  638. this._insertLines(0, text);
  639. } else {
  640. this.insert({row: 0, column:0}, text);
  641. }
  642. };
  643. (function() {
  644. oop.implement(this, EventEmitter);
  645. this.setValue = function(text) {
  646. var len = this.getLength();
  647. this.remove(new Range(0, 0, len, this.getLine(len-1).length));
  648. this.insert({row: 0, column:0}, text);
  649. };
  650. this.getValue = function() {
  651. return this.getAllLines().join(this.getNewLineCharacter());
  652. };
  653. this.createAnchor = function(row, column) {
  654. return new Anchor(this, row, column);
  655. };
  656. if ("aaa".split(/a/).length === 0)
  657. this.$split = function(text) {
  658. return text.replace(/\r\n|\r/g, "\n").split("\n");
  659. };
  660. else
  661. this.$split = function(text) {
  662. return text.split(/\r\n|\r|\n/);
  663. };
  664. this.$detectNewLine = function(text) {
  665. var match = text.match(/^.*?(\r\n|\r|\n)/m);
  666. this.$autoNewLine = match ? match[1] : "\n";
  667. this._signal("changeNewLineMode");
  668. };
  669. this.getNewLineCharacter = function() {
  670. switch (this.$newLineMode) {
  671. case "windows":
  672. return "\r\n";
  673. case "unix":
  674. return "\n";
  675. default:
  676. return this.$autoNewLine || "\n";
  677. }
  678. };
  679. this.$autoNewLine = "";
  680. this.$newLineMode = "auto";
  681. this.setNewLineMode = function(newLineMode) {
  682. if (this.$newLineMode === newLineMode)
  683. return;
  684. this.$newLineMode = newLineMode;
  685. this._signal("changeNewLineMode");
  686. };
  687. this.getNewLineMode = function() {
  688. return this.$newLineMode;
  689. };
  690. this.isNewLine = function(text) {
  691. return (text == "\r\n" || text == "\r" || text == "\n");
  692. };
  693. this.getLine = function(row) {
  694. return this.$lines[row] || "";
  695. };
  696. this.getLines = function(firstRow, lastRow) {
  697. return this.$lines.slice(firstRow, lastRow + 1);
  698. };
  699. this.getAllLines = function() {
  700. return this.getLines(0, this.getLength());
  701. };
  702. this.getLength = function() {
  703. return this.$lines.length;
  704. };
  705. this.getTextRange = function(range) {
  706. if (range.start.row == range.end.row) {
  707. return this.getLine(range.start.row)
  708. .substring(range.start.column, range.end.column);
  709. }
  710. var lines = this.getLines(range.start.row, range.end.row);
  711. lines[0] = (lines[0] || "").substring(range.start.column);
  712. var l = lines.length - 1;
  713. if (range.end.row - range.start.row == l)
  714. lines[l] = lines[l].substring(0, range.end.column);
  715. return lines.join(this.getNewLineCharacter());
  716. };
  717. this.$clipPosition = function(position) {
  718. var length = this.getLength();
  719. if (position.row >= length) {
  720. position.row = Math.max(0, length - 1);
  721. position.column = this.getLine(length-1).length;
  722. } else if (position.row < 0)
  723. position.row = 0;
  724. return position;
  725. };
  726. this.insert = function(position, text) {
  727. if (!text || text.length === 0)
  728. return position;
  729. position = this.$clipPosition(position);
  730. if (this.getLength() <= 1)
  731. this.$detectNewLine(text);
  732. var lines = this.$split(text);
  733. var firstLine = lines.splice(0, 1)[0];
  734. var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
  735. position = this.insertInLine(position, firstLine);
  736. if (lastLine !== null) {
  737. position = this.insertNewLine(position); // terminate first line
  738. position = this._insertLines(position.row, lines);
  739. position = this.insertInLine(position, lastLine || "");
  740. }
  741. return position;
  742. };
  743. this.insertLines = function(row, lines) {
  744. if (row >= this.getLength())
  745. return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
  746. return this._insertLines(Math.max(row, 0), lines);
  747. };
  748. this._insertLines = function(row, lines) {
  749. if (lines.length == 0)
  750. return {row: row, column: 0};
  751. while (lines.length > 0xF000) {
  752. var end = this._insertLines(row, lines.slice(0, 0xF000));
  753. lines = lines.slice(0xF000);
  754. row = end.row;
  755. }
  756. var args = [row, 0];
  757. args.push.apply(args, lines);
  758. this.$lines.splice.apply(this.$lines, args);
  759. var range = new Range(row, 0, row + lines.length, 0);
  760. var delta = {
  761. action: "insertLines",
  762. range: range,
  763. lines: lines
  764. };
  765. this._signal("change", { data: delta });
  766. return range.end;
  767. };
  768. this.insertNewLine = function(position) {
  769. position = this.$clipPosition(position);
  770. var line = this.$lines[position.row] || "";
  771. this.$lines[position.row] = line.substring(0, position.column);
  772. this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
  773. var end = {
  774. row : position.row + 1,
  775. column : 0
  776. };
  777. var delta = {
  778. action: "insertText",
  779. range: Range.fromPoints(position, end),
  780. text: this.getNewLineCharacter()
  781. };
  782. this._signal("change", { data: delta });
  783. return end;
  784. };
  785. this.insertInLine = function(position, text) {
  786. if (text.length == 0)
  787. return position;
  788. var line = this.$lines[position.row] || "";
  789. this.$lines[position.row] = line.substring(0, position.column) + text
  790. + line.substring(position.column);
  791. var end = {
  792. row : position.row,
  793. column : position.column + text.length
  794. };
  795. var delta = {
  796. action: "insertText",
  797. range: Range.fromPoints(position, end),
  798. text: text
  799. };
  800. this._signal("change", { data: delta });
  801. return end;
  802. };
  803. this.remove = function(range) {
  804. if (!(range instanceof Range))
  805. range = Range.fromPoints(range.start, range.end);
  806. range.start = this.$clipPosition(range.start);
  807. range.end = this.$clipPosition(range.end);
  808. if (range.isEmpty())
  809. return range.start;
  810. var firstRow = range.start.row;
  811. var lastRow = range.end.row;
  812. if (range.isMultiLine()) {
  813. var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
  814. var lastFullRow = lastRow - 1;
  815. if (range.end.column > 0)
  816. this.removeInLine(lastRow, 0, range.end.column);
  817. if (lastFullRow >= firstFullRow)
  818. this._removeLines(firstFullRow, lastFullRow);
  819. if (firstFullRow != firstRow) {
  820. this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
  821. this.removeNewLine(range.start.row);
  822. }
  823. }
  824. else {
  825. this.removeInLine(firstRow, range.start.column, range.end.column);
  826. }
  827. return range.start;
  828. };
  829. this.removeInLine = function(row, startColumn, endColumn) {
  830. if (startColumn == endColumn)
  831. return;
  832. var range = new Range(row, startColumn, row, endColumn);
  833. var line = this.getLine(row);
  834. var removed = line.substring(startColumn, endColumn);
  835. var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
  836. this.$lines.splice(row, 1, newLine);
  837. var delta = {
  838. action: "removeText",
  839. range: range,
  840. text: removed
  841. };
  842. this._signal("change", { data: delta });
  843. return range.start;
  844. };
  845. this.removeLines = function(firstRow, lastRow) {
  846. if (firstRow < 0 || lastRow >= this.getLength())
  847. return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
  848. return this._removeLines(firstRow, lastRow);
  849. };
  850. this._removeLines = function(firstRow, lastRow) {
  851. var range = new Range(firstRow, 0, lastRow + 1, 0);
  852. var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
  853. var delta = {
  854. action: "removeLines",
  855. range: range,
  856. nl: this.getNewLineCharacter(),
  857. lines: removed
  858. };
  859. this._signal("change", { data: delta });
  860. return removed;
  861. };
  862. this.removeNewLine = function(row) {
  863. var firstLine = this.getLine(row);
  864. var secondLine = this.getLine(row+1);
  865. var range = new Range(row, firstLine.length, row+1, 0);
  866. var line = firstLine + secondLine;
  867. this.$lines.splice(row, 2, line);
  868. var delta = {
  869. action: "removeText",
  870. range: range,
  871. text: this.getNewLineCharacter()
  872. };
  873. this._signal("change", { data: delta });
  874. };
  875. this.replace = function(range, text) {
  876. if (!(range instanceof Range))
  877. range = Range.fromPoints(range.start, range.end);
  878. if (text.length == 0 && range.isEmpty())
  879. return range.start;
  880. if (text == this.getTextRange(range))
  881. return range.end;
  882. this.remove(range);
  883. if (text) {
  884. var end = this.insert(range.start, text);
  885. }
  886. else {
  887. end = range.start;
  888. }
  889. return end;
  890. };
  891. this.applyDeltas = function(deltas) {
  892. for (var i=0; i<deltas.length; i++) {
  893. var delta = deltas[i];
  894. var range = Range.fromPoints(delta.range.start, delta.range.end);
  895. if (delta.action == "insertLines")
  896. this.insertLines(range.start.row, delta.lines);
  897. else if (delta.action == "insertText")
  898. this.insert(range.start, delta.text);
  899. else if (delta.action == "removeLines")
  900. this._removeLines(range.start.row, range.end.row - 1);
  901. else if (delta.action == "removeText")
  902. this.remove(range);
  903. }
  904. };
  905. this.revertDeltas = function(deltas) {
  906. for (var i=deltas.length-1; i>=0; i--) {
  907. var delta = deltas[i];
  908. var range = Range.fromPoints(delta.range.start, delta.range.end);
  909. if (delta.action == "insertLines")
  910. this._removeLines(range.start.row, range.end.row - 1);
  911. else if (delta.action == "insertText")
  912. this.remove(range);
  913. else if (delta.action == "removeLines")
  914. this._insertLines(range.start.row, delta.lines);
  915. else if (delta.action == "removeText")
  916. this.insert(range.start, delta.text);
  917. }
  918. };
  919. this.indexToPosition = function(index, startRow) {
  920. var lines = this.$lines || this.getAllLines();
  921. var newlineLength = this.getNewLineCharacter().length;
  922. for (var i = startRow || 0, l = lines.length; i < l; i++) {
  923. index -= lines[i].length + newlineLength;
  924. if (index < 0)
  925. return {row: i, column: index + lines[i].length + newlineLength};
  926. }
  927. return {row: l-1, column: lines[l-1].length};
  928. };
  929. this.positionToIndex = function(pos, startRow) {
  930. var lines = this.$lines || this.getAllLines();
  931. var newlineLength = this.getNewLineCharacter().length;
  932. var index = 0;
  933. var row = Math.min(pos.row, lines.length);
  934. for (var i = startRow || 0; i < row; ++i)
  935. index += lines[i].length + newlineLength;
  936. return index + pos.column;
  937. };
  938. }).call(Document.prototype);
  939. exports.Document = Document;
  940. });
  941. ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
  942. "use strict";
  943. exports.last = function(a) {
  944. return a[a.length - 1];
  945. };
  946. exports.stringReverse = function(string) {
  947. return string.split("").reverse().join("");
  948. };
  949. exports.stringRepeat = function (string, count) {
  950. var result = '';
  951. while (count > 0) {
  952. if (count & 1)
  953. result += string;
  954. if (count >>= 1)
  955. string += string;
  956. }
  957. return result;
  958. };
  959. var trimBeginRegexp = /^\s\s*/;
  960. var trimEndRegexp = /\s\s*$/;
  961. exports.stringTrimLeft = function (string) {
  962. return string.replace(trimBeginRegexp, '');
  963. };
  964. exports.stringTrimRight = function (string) {
  965. return string.replace(trimEndRegexp, '');
  966. };
  967. exports.copyObject = function(obj) {
  968. var copy = {};
  969. for (var key in obj) {
  970. copy[key] = obj[key];
  971. }
  972. return copy;
  973. };
  974. exports.copyArray = function(array){
  975. var copy = [];
  976. for (var i=0, l=array.length; i<l; i++) {
  977. if (array[i] && typeof array[i] == "object")
  978. copy[i] = this.copyObject( array[i] );
  979. else
  980. copy[i] = array[i];
  981. }
  982. return copy;
  983. };
  984. exports.deepCopy = function (obj) {
  985. if (typeof obj !== "object" || !obj)
  986. return obj;
  987. var cons = obj.constructor;
  988. if (cons === RegExp)
  989. return obj;
  990. var copy = cons();
  991. for (var key in obj) {
  992. if (typeof obj[key] === "object") {
  993. copy[key] = exports.deepCopy(obj[key]);
  994. } else {
  995. copy[key] = obj[key];
  996. }
  997. }
  998. return copy;
  999. };
  1000. exports.arrayToMap = function(arr) {
  1001. var map = {};
  1002. for (var i=0; i<arr.length; i++) {
  1003. map[arr[i]] = 1;
  1004. }
  1005. return map;
  1006. };
  1007. exports.createMap = function(props) {
  1008. var map = Object.create(null);
  1009. for (var i in props) {
  1010. map[i] = props[i];
  1011. }
  1012. return map;
  1013. };
  1014. exports.arrayRemove = function(array, value) {
  1015. for (var i = 0; i <= array.length; i++) {
  1016. if (value === array[i]) {
  1017. array.splice(i, 1);
  1018. }
  1019. }
  1020. };
  1021. exports.escapeRegExp = function(str) {
  1022. return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
  1023. };
  1024. exports.escapeHTML = function(str) {
  1025. return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
  1026. };
  1027. exports.getMatchOffsets = function(string, regExp) {
  1028. var matches = [];
  1029. string.replace(regExp, function(str) {
  1030. matches.push({
  1031. offset: arguments[arguments.length-2],
  1032. length: str.length
  1033. });
  1034. });
  1035. return matches;
  1036. };
  1037. exports.deferredCall = function(fcn) {
  1038. var timer = null;
  1039. var callback = function() {
  1040. timer = null;
  1041. fcn();
  1042. };
  1043. var deferred = function(timeout) {
  1044. deferred.cancel();
  1045. timer = setTimeout(callback, timeout || 0);
  1046. return deferred;
  1047. };
  1048. deferred.schedule = deferred;
  1049. deferred.call = function() {
  1050. this.cancel();
  1051. fcn();
  1052. return deferred;
  1053. };
  1054. deferred.cancel = function() {
  1055. clearTimeout(timer);
  1056. timer = null;
  1057. return deferred;
  1058. };
  1059. deferred.isPending = function() {
  1060. return timer;
  1061. };
  1062. return deferred;
  1063. };
  1064. exports.delayedCall = function(fcn, defaultTimeout) {
  1065. var timer = null;
  1066. var callback = function() {
  1067. timer = null;
  1068. fcn();
  1069. };
  1070. var _self = function(timeout) {
  1071. if (timer == null)
  1072. timer = setTimeout(callback, timeout || defaultTimeout);
  1073. };
  1074. _self.delay = function(timeout) {
  1075. timer && clearTimeout(timer);
  1076. timer = setTimeout(callback, timeout || defaultTimeout);
  1077. };
  1078. _self.schedule = _self;
  1079. _self.call = function() {
  1080. this.cancel();
  1081. fcn();
  1082. };
  1083. _self.cancel = function() {
  1084. timer && clearTimeout(timer);
  1085. timer = null;
  1086. };
  1087. _self.isPending = function() {
  1088. return timer;
  1089. };
  1090. return _self;
  1091. };
  1092. });
  1093. ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
  1094. "use strict";
  1095. var Document = require("../document").Document;
  1096. var lang = require("../lib/lang");
  1097. var Mirror = exports.Mirror = function(sender) {
  1098. this.sender = sender;
  1099. var doc = this.doc = new Document("");
  1100. var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
  1101. var _self = this;
  1102. sender.on("change", function(e) {
  1103. doc.applyDeltas(e.data);
  1104. if (_self.$timeout)
  1105. return deferredUpdate.schedule(_self.$timeout);
  1106. _self.onUpdate();
  1107. });
  1108. };
  1109. (function() {
  1110. this.$timeout = 500;
  1111. this.setTimeout = function(timeout) {
  1112. this.$timeout = timeout;
  1113. };
  1114. this.setValue = function(value) {
  1115. this.doc.setValue(value);
  1116. this.deferredUpdate.schedule(this.$timeout);
  1117. };
  1118. this.getValue = function(callbackId) {
  1119. this.sender.callback(this.doc.getValue(), callbackId);
  1120. };
  1121. this.onUpdate = function() {
  1122. };
  1123. this.isPending = function() {
  1124. return this.deferredUpdate.isPending();
  1125. };
  1126. }).call(Mirror.prototype);
  1127. });
  1128. ace.define("ace/mode/coffee/rewriter",["require","exports","module"], function(require, exports, module) {
  1129. var BALANCED_PAIRS, CALL_CLOSERS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref,
  1130. __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
  1131. __slice = [].slice;
  1132. generate = function(tag, value) {
  1133. var tok;
  1134. tok = [tag, value];
  1135. tok.generated = true;
  1136. return tok;
  1137. };
  1138. exports.Rewriter = (function() {
  1139. function Rewriter() {}
  1140. Rewriter.prototype.rewrite = function(tokens) {
  1141. this.tokens = tokens;
  1142. this.removeLeadingNewlines();
  1143. this.closeOpenCalls();
  1144. this.closeOpenIndexes();
  1145. this.normalizeLines();
  1146. this.tagPostfixConditionals();
  1147. this.addImplicitBracesAndParens();
  1148. this.addLocationDataToGeneratedTokens();
  1149. return this.tokens;
  1150. };
  1151. Rewriter.prototype.scanTokens = function(block) {
  1152. var i, token, tokens;
  1153. tokens = this.tokens;
  1154. i = 0;
  1155. while (token = tokens[i]) {
  1156. i += block.call(this, token, i, tokens);
  1157. }
  1158. return true;
  1159. };
  1160. Rewriter.prototype.detectEnd = function(i, condition, action) {
  1161. var levels, token, tokens, _ref, _ref1;
  1162. tokens = this.tokens;
  1163. levels = 0;
  1164. while (token = tokens[i]) {
  1165. if (levels === 0 && condition.call(this, token, i)) {
  1166. return action.call(this, token, i);
  1167. }
  1168. if (!token || levels < 0) {
  1169. return action.call(this, token, i - 1);
  1170. }
  1171. if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
  1172. levels += 1;
  1173. } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) {
  1174. levels -= 1;
  1175. }
  1176. i += 1;
  1177. }
  1178. return i - 1;
  1179. };
  1180. Rewriter.prototype.removeLeadingNewlines = function() {
  1181. var i, tag, _i, _len, _ref;
  1182. _ref = this.tokens;
  1183. for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
  1184. tag = _ref[i][0];
  1185. if (tag !== 'TERMINATOR') {
  1186. break;
  1187. }
  1188. }
  1189. if (i) {
  1190. return this.tokens.splice(0, i);
  1191. }
  1192. };
  1193. Rewriter.prototype.closeOpenCalls = function() {
  1194. var action, condition;
  1195. condition = function(token, i) {
  1196. var _ref;
  1197. return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')';
  1198. };
  1199. action = function(token, i) {
  1200. return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END';
  1201. };
  1202. return this.scanTokens(function(token, i) {
  1203. if (token[0] === 'CALL_START') {
  1204. this.detectEnd(i + 1, condition, action);
  1205. }
  1206. return 1;
  1207. });
  1208. };
  1209. Rewriter.prototype.closeOpenIndexes = function() {
  1210. var action, condition;
  1211. condition = function(token, i) {
  1212. var _ref;
  1213. return (_ref = token[0]) === ']' || _ref === 'INDEX_END';
  1214. };
  1215. action = function(token, i) {
  1216. return token[0] = 'INDEX_END';
  1217. };
  1218. return this.scanTokens(function(token, i) {
  1219. if (token[0] === 'INDEX_START') {
  1220. this.detectEnd(i + 1, condition, action);
  1221. }
  1222. return 1;
  1223. });
  1224. };
  1225. Rewriter.prototype.matchTags = function() {
  1226. var fuzz, i, j, pattern, _i, _ref, _ref1;
  1227. i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
  1228. fuzz = 0;
  1229. for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) {
  1230. while (this.tag(i + j + fuzz) === 'HERECOMMENT') {
  1231. fuzz += 2;
  1232. }
  1233. if (pattern[j] == null) {
  1234. continue;
  1235. }
  1236. if (typeof pattern[j] === 'string') {
  1237. pattern[j] = [pattern[j]];
  1238. }
  1239. if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) {
  1240. return false;
  1241. }
  1242. }
  1243. return true;
  1244. };
  1245. Rewriter.prototype.looksObjectish = function(j) {
  1246. return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':');
  1247. };
  1248. Rewriter.prototype.findTagsBackwards = function(i, tags) {
  1249. var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
  1250. backStack = [];
  1251. while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) {
  1252. if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) {
  1253. backStack.push(this.tag(i));
  1254. }
  1255. if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) {
  1256. backStack.pop();
  1257. }
  1258. i -= 1;
  1259. }
  1260. return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0;
  1261. };
  1262. Rewriter.prototype.addImplicitBracesAndParens = function() {
  1263. var stack;
  1264. stack = [];
  1265. return this.scanTokens(function(token, i, tokens) {
  1266. var endAllImplicitCalls, endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, prevToken, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
  1267. tag = token[0];
  1268. prevTag = (prevToken = i > 0 ? tokens[i - 1] : [])[0];
  1269. nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0];
  1270. stackTop = function() {
  1271. return stack[stack.length - 1];
  1272. };
  1273. startIdx = i;
  1274. forward = function(n) {
  1275. return i - startIdx + n;
  1276. };
  1277. inImplicit = function() {
  1278. var _ref, _ref1;
  1279. return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0;
  1280. };
  1281. inImplicitCall = function() {
  1282. var _ref;
  1283. return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '(';
  1284. };
  1285. inImplicitObject = function() {
  1286. var _ref;
  1287. return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{';
  1288. };
  1289. inImplicitControl = function() {
  1290. var _ref;
  1291. return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL';
  1292. };
  1293. startImplicitCall = function(j) {
  1294. var idx;
  1295. idx = j != null ? j : i;
  1296. stack.push([
  1297. '(', idx, {
  1298. ours: true
  1299. }
  1300. ]);
  1301. tokens.splice(idx, 0, generate('CALL_START', '('));
  1302. if (j == null) {
  1303. return i += 1;
  1304. }
  1305. };
  1306. endImplicitCall = function() {
  1307. stack.pop();
  1308. tokens.splice(i, 0, generate('CALL_END', ')'));
  1309. return i += 1;
  1310. };
  1311. endAllImplicitCalls = function() {
  1312. while (inImplicitCall()) {
  1313. endImplicitCall();
  1314. }
  1315. };
  1316. startImplicitObject = function(j, startsLine) {
  1317. var idx;
  1318. if (startsLine == null) {
  1319. startsLine = true;
  1320. }
  1321. idx = j != null ? j : i;
  1322. stack.push([
  1323. '{', idx, {
  1324. sameLine: true,
  1325. startsLine: startsLine,
  1326. ours: true
  1327. }
  1328. ]);
  1329. tokens.splice(idx, 0, generate('{', generate(new String('{'))));
  1330. if (j == null) {
  1331. return i += 1;
  1332. }
  1333. };
  1334. endImplicitObject = function(j) {
  1335. j = j != null ? j : i;
  1336. stack.pop();
  1337. tokens.splice(j, 0, generate('}', '}'));
  1338. return i += 1;
  1339. };
  1340. if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) {
  1341. stack.push([
  1342. 'CONTROL', i, {
  1343. ours: true
  1344. }
  1345. ]);
  1346. return forward(1);
  1347. }
  1348. if (tag === 'INDENT' && inImplicit()) {
  1349. if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') {
  1350. while (inImplicitCall()) {
  1351. endImplicitCall();
  1352. }
  1353. }
  1354. if (inImplicitControl()) {
  1355. stack.pop();
  1356. }
  1357. stack.push([tag, i]);
  1358. return forward(1);
  1359. }
  1360. if (__indexOf.call(EXPRESSION_START, tag) >= 0) {
  1361. stack.push([tag, i]);
  1362. return forward(1);
  1363. }
  1364. if (__indexOf.call(EXPRESSION_END, tag) >= 0) {
  1365. while (inImplicit()) {
  1366. if (inImplicitCall()) {
  1367. endImplicitCall();
  1368. } else if (inImplicitObject()) {
  1369. endImplicitObject();
  1370. } else {
  1371. stack.pop();
  1372. }
  1373. }
  1374. stack.pop();
  1375. }
  1376. if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) {
  1377. if (tag === '?') {
  1378. tag = token[0] = 'FUNC_EXIST';
  1379. }
  1380. startImplicitCall(i + 1);
  1381. return forward(2);
  1382. }
  1383. if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) {
  1384. startImplicitCall(i + 1);
  1385. stack.push(['INDENT', i + 2]);
  1386. return forward(3);
  1387. }
  1388. if (tag === ':') {
  1389. if (this.tag(i - 2) === '@') {
  1390. s = i - 2;
  1391. } else {
  1392. s = i - 1;
  1393. }
  1394. while (this.tag(s - 2) === 'HERECOMMENT') {
  1395. s -= 2;
  1396. }
  1397. startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine;
  1398. if (stackTop()) {
  1399. _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1];
  1400. if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) {
  1401. return forward(1);
  1402. }
  1403. }
  1404. startImplicitObject(s, !!startsLine);
  1405. return forward(2);
  1406. }
  1407. if (inImplicitCall() && __indexOf.call(CALL_CLOSERS, tag) >= 0) {
  1408. if (prevTag === 'OUTDENT') {
  1409. endImplicitCall();
  1410. return forward(1);
  1411. }
  1412. if (prevToken.newLine) {
  1413. endAllImplicitCalls();
  1414. return forward(1);
  1415. }
  1416. }
  1417. if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) {
  1418. stackTop()[2].sameLine = false;
  1419. }
  1420. if (__indexOf.call(IMPLICIT_END, tag) >= 0) {
  1421. while (inImplicit()) {
  1422. _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine);
  1423. if (inImplicitCall() && prevTag !== ',') {
  1424. endImplicitCall();
  1425. } else if (inImplicitObject() && sameLine && !startsLine) {
  1426. endImplicitObject();
  1427. } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) {
  1428. endImplicitObject();
  1429. } else {
  1430. break;
  1431. }
  1432. }
  1433. }
  1434. if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) {
  1435. offset = nextTag === 'OUTDENT' ? 1 : 0;
  1436. while (inImplicitObject()) {
  1437. endImplicitObject(i + offset);
  1438. }
  1439. }
  1440. return forward(1);
  1441. });
  1442. };
  1443. Rewriter.prototype.addLocationDataToGeneratedTokens = function() {
  1444. return this.scanTokens(function(token, i, tokens) {
  1445. var column, line, nextLocation, prevLocation, _ref, _ref1;
  1446. if (token[2]) {
  1447. return 1;
  1448. }
  1449. if (!(token.generated || token.explicit)) {
  1450. return 1;
  1451. }
  1452. if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) {
  1453. line = nextLocation.first_line, column = nextLocation.first_column;
  1454. } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) {
  1455. line = prevLocation.last_line, column = prevLocation.last_column;
  1456. } else {
  1457. line = column = 0;
  1458. }
  1459. token[2] = {
  1460. first_line: line,
  1461. first_column: column,
  1462. last_line: line,
  1463. last_column: column
  1464. };
  1465. return 1;
  1466. });
  1467. };
  1468. Rewriter.prototype.normalizeLines = function() {
  1469. var action, condition, indent, outdent, starter;
  1470. starter = indent = outdent = null;
  1471. condition = function(token, i) {
  1472. var _ref, _ref1, _ref2, _ref3;
  1473. return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'TERMINATOR' && (_ref1 = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref1) >= 0)) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref2 = token[0]) === 'CATCH' || _ref2 === 'FINALLY') && (starter === '->' || starter === '=>')) || (_ref3 = token[0], __indexOf.call(CALL_CLOSERS, _ref3) >= 0) && this.tokens[i - 1].newLine;
  1474. };
  1475. action = function(token, i) {
  1476. return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);
  1477. };
  1478. return this.scanTokens(function(token, i, tokens) {
  1479. var j, tag, _i, _ref, _ref1, _ref2;
  1480. tag = token[0];
  1481. if (tag === 'TERMINATOR') {
  1482. if (this.tag(i + 1) === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') {
  1483. tokens.splice.apply(tokens, [i, 1].concat(__slice.call(this.indentation())));
  1484. return 1;
  1485. }
  1486. if (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0) {
  1487. tokens.splice(i, 1);
  1488. return 0;
  1489. }
  1490. }
  1491. if (tag === 'CATCH') {
  1492. for (j = _i = 1; _i <= 2; j = ++_i) {
  1493. if (!((_ref1 = this.tag(i + j)) === 'OUTDENT' || _ref1 === 'TERMINATOR' || _ref1 === 'FINALLY')) {
  1494. continue;
  1495. }
  1496. tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation())));
  1497. return 2 + j;
  1498. }
  1499. }
  1500. if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) {
  1501. starter = tag;
  1502. _ref2 = this.indentation(true), indent = _ref2[0], outdent = _ref2[1];
  1503. if (starter === 'THEN') {
  1504. indent.fromThen = true;
  1505. }
  1506. tokens.splice(i + 1, 0, indent);
  1507. this.detectEnd(i + 2, condition, action);
  1508. if (tag === 'THEN') {
  1509. tokens.splice(i, 1);
  1510. }
  1511. return 1;
  1512. }
  1513. return 1;
  1514. });
  1515. };
  1516. Rewriter.prototype.tagPostfixConditionals = function() {
  1517. var action, condition, original;
  1518. original = null;
  1519. condition = function(token, i) {
  1520. var prevTag, tag;
  1521. tag = token[0];
  1522. prevTag = this.tokens[i - 1][0];
  1523. return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0);
  1524. };
  1525. action = function(token, i) {
  1526. if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) {
  1527. return original[0] = 'POST_' + original[0];
  1528. }
  1529. };
  1530. return this.scanTokens(function(token, i) {
  1531. if (token[0] !== 'IF') {
  1532. return 1;
  1533. }
  1534. original = token;
  1535. this.detectEnd(i + 1, condition, action);
  1536. return 1;
  1537. });
  1538. };
  1539. Rewriter.prototype.indentation = function(implicit) {
  1540. var indent, outdent;
  1541. if (implicit == null) {
  1542. implicit = false;
  1543. }
  1544. indent = ['INDENT', 2];
  1545. outdent = ['OUTDENT', 2];
  1546. if (implicit) {
  1547. indent.generated = outdent.generated = true;
  1548. }
  1549. if (!implicit) {
  1550. indent.explicit = outdent.explicit = true;
  1551. }
  1552. return [indent, outdent];
  1553. };
  1554. Rewriter.prototype.generate = generate;
  1555. Rewriter.prototype.tag = function(i) {
  1556. var _ref;
  1557. return (_ref = this.tokens[i]) != null ? _ref[0] : void 0;
  1558. };
  1559. return Rewriter;
  1560. })();
  1561. BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']];
  1562. exports.INVERSES = INVERSES = {};
  1563. EXPRESSION_START = [];
  1564. EXPRESSION_END = [];
  1565. for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) {
  1566. _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];
  1567. EXPRESSION_START.push(INVERSES[rite] = left);
  1568. EXPRESSION_END.push(INVERSES[left] = rite);
  1569. }
  1570. EXPRESSION_CLOSE = ['CATCH', 'THEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END);
  1571. IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];
  1572. IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++'];
  1573. IMPLICIT_UNSPACED_CALL = ['+', '-'];
  1574. IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR'];
  1575. SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN'];
  1576. SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN'];
  1577. LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];
  1578. CALL_CLOSERS = ['.', '?.', '::', '?::'];
  1579. });
  1580. ace.define("ace/mode/coffee/helpers",["require","exports","module"], function(require, exports, module) {
  1581. var buildLocationData, extend, flatten, last, repeat, syntaxErrorToString, _ref;
  1582. exports.starts = function(string, literal, start) {
  1583. return literal === string.substr(start, literal.length);
  1584. };
  1585. exports.ends = function(string, literal, back) {
  1586. var len;
  1587. len = literal.length;
  1588. return literal === string.substr(string.length - len - (back || 0), len);
  1589. };
  1590. exports.repeat = repeat = function(str, n) {
  1591. var res;
  1592. res = '';
  1593. while (n > 0) {
  1594. if (n & 1) {
  1595. res += str;
  1596. }
  1597. n >>>= 1;
  1598. str += str;
  1599. }
  1600. return res;
  1601. };
  1602. exports.compact = function(array) {
  1603. var item, _i, _len, _results;
  1604. _results = [];
  1605. for (_i = 0, _len = array.length; _i < _len; _i++) {
  1606. item = array[_i];
  1607. if (item) {
  1608. _results.push(item);
  1609. }
  1610. }
  1611. return _results;
  1612. };
  1613. exports.count = function(string, substr) {
  1614. var num, pos;
  1615. num = pos = 0;
  1616. if (!substr.length) {
  1617. return 1 / 0;
  1618. }
  1619. while (pos = 1 + string.indexOf(substr, pos)) {
  1620. num++;
  1621. }
  1622. return num;
  1623. };
  1624. exports.merge = function(options, overrides) {
  1625. return extend(extend({}, options), overrides);
  1626. };
  1627. extend = exports.extend = function(object, properties) {
  1628. var key, val;
  1629. for (key in properties) {
  1630. val = properties[key];
  1631. object[key] = val;
  1632. }
  1633. return object;
  1634. };
  1635. exports.flatten = flatten = function(array) {
  1636. var element, flattened, _i, _len;
  1637. flattened = [];
  1638. for (_i = 0, _len = array.length; _i < _len; _i++) {
  1639. element = array[_i];
  1640. if (element instanceof Array) {
  1641. flattened = flattened.concat(flatten(element));
  1642. } else {
  1643. flattened.push(element);
  1644. }
  1645. }
  1646. return flattened;
  1647. };
  1648. exports.del = function(obj, key) {
  1649. var val;
  1650. val = obj[key];
  1651. delete obj[key];
  1652. return val;
  1653. };
  1654. exports.last = last = function(array, back) {
  1655. return array[array.length - (back || 0) - 1];
  1656. };
  1657. exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) {
  1658. var e, _i, _len;
  1659. for (_i = 0, _len = this.length; _i < _len; _i++) {
  1660. e = this[_i];
  1661. if (fn(e)) {
  1662. return true;
  1663. }
  1664. }
  1665. return false;
  1666. };
  1667. exports.invertLiterate = function(code) {
  1668. var line, lines, maybe_code;
  1669. maybe_code = true;
  1670. lines = (function() {
  1671. var _i, _len, _ref1, _results;
  1672. _ref1 = code.split('\n');
  1673. _results = [];
  1674. for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
  1675. line = _ref1[_i];
  1676. if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) {
  1677. _results.push(line);
  1678. } else if (maybe_code = /^\s*$/.test(line)) {
  1679. _results.push(line);
  1680. } else {
  1681. _results.push('# ' + line);
  1682. }
  1683. }
  1684. return _results;
  1685. })();
  1686. return lines.join('\n');
  1687. };
  1688. buildLocationData = function(first, last) {
  1689. if (!last) {
  1690. return first;
  1691. } else {
  1692. return {
  1693. first_line: first.first_line,
  1694. first_column: first.first_column,
  1695. last_line: last.last_line,
  1696. last_column: last.last_column
  1697. };
  1698. }
  1699. };
  1700. exports.addLocationDataFn = function(first, last) {
  1701. return function(obj) {
  1702. if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) {
  1703. obj.updateLocationDataIfMissing(buildLocationData(first, last));
  1704. }
  1705. return obj;
  1706. };
  1707. };
  1708. exports.locationDataToString = function(obj) {
  1709. var locationData;
  1710. if (("2" in obj) && ("first_line" in obj[2])) {
  1711. locationData = obj[2];
  1712. } else if ("first_line" in obj) {
  1713. locationData = obj;
  1714. }
  1715. if (locationData) {
  1716. return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1));
  1717. } else {
  1718. return "No location data";
  1719. }
  1720. };
  1721. exports.baseFileName = function(file, stripExt, useWinPathSep) {
  1722. var parts, pathSep;
  1723. if (stripExt == null) {
  1724. stripExt = false;
  1725. }
  1726. if (useWinPathSep == null) {
  1727. useWinPathSep = false;
  1728. }
  1729. pathSep = useWinPathSep ? /\\|\// : /\//;
  1730. parts = file.split(pathSep);
  1731. file = parts[parts.length - 1];
  1732. if (!(stripExt && file.indexOf('.') >= 0)) {
  1733. return file;
  1734. }
  1735. parts = file.split('.');
  1736. parts.pop();
  1737. if (parts[parts.length - 1] === 'coffee' && parts.length > 1) {
  1738. parts.pop();
  1739. }
  1740. return parts.join('.');
  1741. };
  1742. exports.isCoffee = function(file) {
  1743. return /\.((lit)?coffee|coffee\.md)$/.test(file);
  1744. };
  1745. exports.isLiterate = function(file) {
  1746. return /\.(litcoffee|coffee\.md)$/.test(file);
  1747. };
  1748. exports.throwSyntaxError = function(message, location) {
  1749. var error;
  1750. if (location.last_line == null) {
  1751. location.last_line = location.first_line;
  1752. }
  1753. if (location.last_column == null) {
  1754. location.last_column = location.first_column;
  1755. }
  1756. error = new SyntaxError(message);
  1757. error.location = location;
  1758. error.toString = syntaxErrorToString;
  1759. error.stack = error.toString();
  1760. throw error;
  1761. };
  1762. exports.updateSyntaxError = function(error, code, filename) {
  1763. if (error.toString === syntaxErrorToString) {
  1764. error.code || (error.code = code);
  1765. error.filename || (error.filename = filename);
  1766. error.stack = error.toString();
  1767. }
  1768. return error;
  1769. };
  1770. syntaxErrorToString = function() {
  1771. var codeLine, colorize, colorsEnabled, end, filename, first_column, first_line, last_column, last_line, marker, start, _ref1, _ref2;
  1772. if (!(this.code && this.location)) {
  1773. return Error.prototype.toString.call(this);
  1774. }
  1775. _ref1 = this.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column;
  1776. if (last_line == null) {
  1777. last_line = first_line;
  1778. }
  1779. if (last_column == null) {
  1780. last_column = first_column;
  1781. }
  1782. filename = this.filename || '[stdin]';
  1783. codeLine = this.code.split('\n')[first_line];
  1784. start = first_column;
  1785. end = first_line === last_line ? last_column + 1 : codeLine.length;
  1786. marker = repeat(' ', start) + repeat('^', end - start);
  1787. if (typeof process !== "undefined" && process !== null) {
  1788. colorsEnabled = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS;
  1789. }
  1790. if ((_ref2 = this.colorful) != null ? _ref2 : colorsEnabled) {
  1791. colorize = function(str) {
  1792. return "\x1B[1;31m" + str + "\x1B[0m";
  1793. };
  1794. codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end);
  1795. marker = colorize(marker);
  1796. }
  1797. return "" + filename + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + this.message + "\n" + codeLine + "\n" + marker;
  1798. };
  1799. });
  1800. ace.define("ace/mode/coffee/lexer",["require","exports","module","ace/mode/coffee/rewriter","ace/mode/coffee/helpers"], function(require, exports, module) {
  1801. var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1,
  1802. __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
  1803. _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES;
  1804. _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError;
  1805. exports.Lexer = Lexer = (function() {
  1806. function Lexer() {}
  1807. Lexer.prototype.tokenize = function(code, opts) {
  1808. var consumed, i, tag, _ref2;
  1809. if (opts == null) {
  1810. opts = {};
  1811. }
  1812. this.literate = opts.literate;
  1813. this.indent = 0;
  1814. this.baseIndent = 0;
  1815. this.indebt = 0;
  1816. this.outdebt = 0;
  1817. this.indents = [];
  1818. this.ends = [];
  1819. this.tokens = [];
  1820. this.chunkLine = opts.line || 0;
  1821. this.chunkColumn = opts.column || 0;
  1822. code = this.clean(code);
  1823. i = 0;
  1824. while (this.chunk = code.slice(i)) {
  1825. consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken();
  1826. _ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = _ref2[0], this.chunkColumn = _ref2[1];
  1827. i += consumed;
  1828. }
  1829. this.closeIndentation();
  1830. if (tag = this.ends.pop()) {
  1831. this.error("missing " + tag);
  1832. }
  1833. if (opts.rewrite === false) {
  1834. return this.tokens;
  1835. }
  1836. return (new Rewriter).rewrite(this.tokens);
  1837. };
  1838. Lexer.prototype.clean = function(code) {
  1839. if (code.charCodeAt(0) === BOM) {
  1840. code = code.slice(1);
  1841. }
  1842. code = code.replace(/\r/g, '').replace(TRAILING_SPACES, '');
  1843. if (WHITESPACE.test(code)) {
  1844. code = "\n" + code;
  1845. this.chunkLine--;
  1846. }
  1847. if (this.literate) {
  1848. code = invertLiterate(code);
  1849. }
  1850. return code;
  1851. };
  1852. Lexer.prototype.identifierToken = function() {
  1853. var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4;
  1854. if (!(match = IDENTIFIER.exec(this.chunk))) {
  1855. return 0;
  1856. }
  1857. input = match[0], id = match[1], colon = match[2];
  1858. idLength = id.length;
  1859. poppedToken = void 0;
  1860. if (id === 'own' && this.tag() === 'FOR') {
  1861. this.token('OWN', id);
  1862. return id.length;
  1863. }
  1864. forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::' || _ref2 === '?::') || !prev.spaced && prev[0] === '@');
  1865. tag = 'IDENTIFIER';
  1866. if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) {
  1867. tag = id.toUpperCase();
  1868. if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) {
  1869. tag = 'LEADING_WHEN';
  1870. } else if (tag === 'FOR') {
  1871. this.seenFor = true;
  1872. } else if (tag === 'UNLESS') {
  1873. tag = 'IF';
  1874. } else if (__indexOf.call(UNARY, tag) >= 0) {
  1875. tag = 'UNARY';
  1876. } else if (__indexOf.call(RELATION, tag) >= 0) {
  1877. if (tag !== 'INSTANCEOF' && this.seenFor) {
  1878. tag = 'FOR' + tag;
  1879. this.seenFor = false;
  1880. } else {
  1881. tag = 'RELATION';
  1882. if (this.value() === '!') {
  1883. poppedToken = this.tokens.pop();
  1884. id = '!' + id;
  1885. }
  1886. }
  1887. }
  1888. }
  1889. if (__indexOf.call(JS_FORBIDDEN, id) >= 0) {
  1890. if (forcedIdentifier) {
  1891. tag = 'IDENTIFIER';
  1892. id = new String(id);
  1893. id.reserved = true;
  1894. } else if (__indexOf.call(RESERVED, id) >= 0) {
  1895. this.error("reserved word \"" + id + "\"");
  1896. }
  1897. }
  1898. if (!forcedIdentifier) {
  1899. if (__indexOf.call(COFFEE_ALIASES, id) >= 0) {
  1900. id = COFFEE_ALIAS_MAP[id];
  1901. }
  1902. tag = (function() {
  1903. switch (id) {
  1904. case '!':
  1905. return 'UNARY';
  1906. case '==':
  1907. case '!=':
  1908. return 'COMPARE';
  1909. case '&&':
  1910. case '||':
  1911. return 'LOGIC';
  1912. case 'true':
  1913. case 'false':
  1914. return 'BOOL';
  1915. case 'break':
  1916. case 'continue':
  1917. return 'STATEMENT';
  1918. default:
  1919. return tag;
  1920. }
  1921. })();
  1922. }
  1923. tagToken = this.token(tag, id, 0, idLength);
  1924. if (poppedToken) {
  1925. _ref4 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = _ref4[0], tagToken[2].first_column = _ref4[1];
  1926. }
  1927. if (colon) {
  1928. colonOffset = input.lastIndexOf(':');
  1929. this.token(':', ':', colonOffset, colon.length);
  1930. }
  1931. return input.length;
  1932. };
  1933. Lexer.prototype.numberToken = function() {
  1934. var binaryLiteral, lexedLength, match, number, octalLiteral;
  1935. if (!(match = NUMBER.exec(this.chunk))) {
  1936. return 0;
  1937. }
  1938. number = match[0];
  1939. if (/^0[BOX]/.test(number)) {
  1940. this.error("radix prefix '" + number + "' must be lowercase");
  1941. } else if (/E/.test(number) && !/^0x/.test(number)) {
  1942. this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'");
  1943. } else if (/^0\d*[89]/.test(number)) {
  1944. this.error("decimal literal '" + number + "' must not be prefixed with '0'");
  1945. } else if (/^0\d+/.test(number)) {
  1946. this.error("octal literal '" + number + "' must be prefixed with '0o'");
  1947. }
  1948. lexedLength = number.length;
  1949. if (octalLiteral = /^0o([0-7]+)/.exec(number)) {
  1950. number = '0x' + parseInt(octalLiteral[1], 8).toString(16);
  1951. }
  1952. if (binaryLiteral = /^0b([01]+)/.exec(number)) {
  1953. number = '0x' + parseInt(binaryLiteral[1], 2).toString(16);
  1954. }
  1955. this.token('NUMBER', number, 0, lexedLength);
  1956. return lexedLength;
  1957. };
  1958. Lexer.prototype.stringToken = function() {
  1959. var octalEsc, quote, string, trimmed;
  1960. switch (quote = this.chunk.charAt(0)) {
  1961. case "'":
  1962. string = SIMPLESTR.exec(this.chunk)[0];
  1963. break;
  1964. case '"':
  1965. string = this.balancedString(this.chunk, '"');
  1966. }
  1967. if (!string) {
  1968. return 0;
  1969. }
  1970. trimmed = this.removeNewlines(string.slice(1, -1));
  1971. if (quote === '"' && 0 < string.indexOf('#{', 1)) {
  1972. this.interpolateString(trimmed, {
  1973. strOffset: 1,
  1974. lexedLength: string.length
  1975. });
  1976. } else {
  1977. this.token('STRING', quote + this.escapeLines(trimmed) + quote, 0, string.length);
  1978. }
  1979. if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) {
  1980. this.error("octal escape sequences " + string + " are not allowed");
  1981. }
  1982. return string.length;
  1983. };
  1984. Lexer.prototype.heredocToken = function() {
  1985. var doc, heredoc, match, quote;
  1986. if (!(match = HEREDOC.exec(this.chunk))) {
  1987. return 0;
  1988. }
  1989. heredoc = match[0];
  1990. quote = heredoc.charAt(0);
  1991. doc = this.sanitizeHeredoc(match[2], {
  1992. quote: quote,
  1993. indent: null
  1994. });
  1995. if (quote === '"' && 0 <= doc.indexOf('#{')) {
  1996. this.interpolateString(doc, {
  1997. heredoc: true,
  1998. strOffset: 3,
  1999. lexedLength: heredoc.length
  2000. });
  2001. } else {
  2002. this.token('STRING', this.makeString(doc, quote, true), 0, heredoc.length);
  2003. }
  2004. return heredoc.length;
  2005. };
  2006. Lexer.prototype.commentToken = function() {
  2007. var comment, here, match;
  2008. if (!(match = this.chunk.match(COMMENT))) {
  2009. return 0;
  2010. }
  2011. comment = match[0], here = match[1];
  2012. if (here) {
  2013. this.token('HERECOMMENT', this.sanitizeHeredoc(here, {
  2014. herecomment: true,
  2015. indent: repeat(' ', this.indent)
  2016. }), 0, comment.length);
  2017. }
  2018. return comment.length;
  2019. };
  2020. Lexer.prototype.jsToken = function() {
  2021. var match, script;
  2022. if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) {
  2023. return 0;
  2024. }
  2025. this.token('JS', (script = match[0]).slice(1, -1), 0, script.length);
  2026. return script.length;
  2027. };
  2028. Lexer.prototype.regexToken = function() {
  2029. var flags, length, match, prev, regex, _ref2, _ref3;
  2030. if (this.chunk.charAt(0) !== '/') {
  2031. return 0;
  2032. }
  2033. if (match = HEREGEX.exec(this.chunk)) {
  2034. length = this.heregexToken(match);
  2035. return length;
  2036. }
  2037. prev = last(this.tokens);
  2038. if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) {
  2039. return 0;
  2040. }
  2041. if (!(match = REGEX.exec(this.chunk))) {
  2042. return 0;
  2043. }
  2044. _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2];
  2045. if (regex.slice(0, 2) === '/*') {
  2046. this.error('regular expressions cannot begin with `*`');
  2047. }
  2048. if (regex === '//') {
  2049. regex = '/(?:)/';
  2050. }
  2051. this.token('REGEX', "" + regex + flags, 0, match.length);
  2052. return match.length;
  2053. };
  2054. Lexer.prototype.heregexToken = function(match) {
  2055. var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4;
  2056. heregex = match[0], body = match[1], flags = match[2];
  2057. if (0 > body.indexOf('#{')) {
  2058. re = this.escapeLines(body.replace(HEREGEX_OMIT, '$1$2').replace(/\//g, '\\/'), true);
  2059. if (re.match(/^\*/)) {
  2060. this.error('regular expressions cannot begin with `*`');
  2061. }
  2062. this.token('REGEX', "/" + (re || '(?:)') + "/" + flags, 0, heregex.length);
  2063. return heregex.length;
  2064. }
  2065. this.token('IDENTIFIER', 'RegExp', 0, 0);
  2066. this.token('CALL_START', '(', 0, 0);
  2067. tokens = [];
  2068. _ref2 = this.interpolateString(body, {
  2069. regex: true
  2070. });
  2071. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  2072. token = _ref2[_i];
  2073. tag = token[0], value = token[1];
  2074. if (tag === 'TOKENS') {
  2075. tokens.push.apply(tokens, value);
  2076. } else if (tag === 'NEOSTRING') {
  2077. if (!(value = value.replace(HEREGEX_OMIT, '$1$2'))) {
  2078. continue;
  2079. }
  2080. value = value.replace(/\\/g, '\\\\');
  2081. token[0] = 'STRING';
  2082. token[1] = this.makeString(value, '"', true);
  2083. tokens.push(token);
  2084. } else {
  2085. this.error("Unexpected " + tag);
  2086. }
  2087. prev = last(this.tokens);
  2088. plusToken = ['+', '+'];
  2089. plusToken[2] = prev[2];
  2090. tokens.push(plusToken);
  2091. }
  2092. tokens.pop();
  2093. if (((_ref3 = tokens[0]) != null ? _ref3[0] : void 0) !== 'STRING') {
  2094. this.token('STRING', '""', 0, 0);
  2095. this.token('+', '+', 0, 0);
  2096. }
  2097. (_ref4 = this.tokens).push.apply(_ref4, tokens);
  2098. if (flags) {
  2099. flagsOffset = heregex.lastIndexOf(flags);
  2100. this.token(',', ',', flagsOffset, 0);
  2101. this.token('STRING', '"' + flags + '"', flagsOffset, flags.length);
  2102. }
  2103. this.token(')', ')', heregex.length - 1, 0);
  2104. return heregex.length;
  2105. };
  2106. Lexer.prototype.lineToken = function() {
  2107. var diff, indent, match, noNewlines, size;
  2108. if (!(match = MULTI_DENT.exec(this.chunk))) {
  2109. return 0;
  2110. }
  2111. indent = match[0];
  2112. this.seenFor = false;
  2113. size = indent.length - 1 - indent.lastIndexOf('\n');
  2114. noNewlines = this.unfinished();
  2115. if (size - this.indebt === this.indent) {
  2116. if (noNewlines) {
  2117. this.suppressNewlines();
  2118. } else {
  2119. this.newlineToken(0);
  2120. }
  2121. return indent.length;
  2122. }
  2123. if (size > this.indent) {
  2124. if (noNewlines) {
  2125. this.indebt = size - this.indent;
  2126. this.suppressNewlines();
  2127. return indent.length;
  2128. }
  2129. if (!this.tokens.length) {
  2130. this.baseIndent = this.indent = size;
  2131. return indent.length;
  2132. }
  2133. diff = size - this.indent + this.outdebt;
  2134. this.token('INDENT', diff, indent.length - size, size);
  2135. this.indents.push(diff);
  2136. this.ends.push('OUTDENT');
  2137. this.outdebt = this.indebt = 0;
  2138. } else if (size < this.baseIndent) {
  2139. this.error('missing indentation', indent.length);
  2140. } else {
  2141. this.indebt = 0;
  2142. this.outdentToken(this.indent - size, noNewlines, indent.length);
  2143. }
  2144. this.indent = size;
  2145. return indent.length;
  2146. };
  2147. Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) {
  2148. var dent, len;
  2149. while (moveOut > 0) {
  2150. len = this.indents.length - 1;
  2151. if (this.indents[len] === void 0) {
  2152. moveOut = 0;
  2153. } else if (this.indents[len] === this.outdebt) {
  2154. moveOut -= this.outdebt;
  2155. this.outdebt = 0;
  2156. } else if (this.indents[len] < this.outdebt) {
  2157. this.outdebt -= this.indents[len];
  2158. moveOut -= this.indents[len];
  2159. } else {
  2160. dent = this.indents.pop() + this.outdebt;
  2161. moveOut -= dent;
  2162. this.outdebt = 0;
  2163. this.pair('OUTDENT');
  2164. this.token('OUTDENT', dent, 0, outdentLength);
  2165. }
  2166. }
  2167. if (dent) {
  2168. this.outdebt -= moveOut;
  2169. }
  2170. while (this.value() === ';') {
  2171. this.tokens.pop();
  2172. }
  2173. if (!(this.tag() === 'TERMINATOR' || noNewlines)) {
  2174. this.token('TERMINATOR', '\n', outdentLength, 0);
  2175. }
  2176. return this;
  2177. };
  2178. Lexer.prototype.whitespaceToken = function() {
  2179. var match, nline, prev;
  2180. if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) {
  2181. return 0;
  2182. }
  2183. prev = last(this.tokens);
  2184. if (prev) {
  2185. prev[match ? 'spaced' : 'newLine'] = true;
  2186. }
  2187. if (match) {
  2188. return match[0].length;
  2189. } else {
  2190. return 0;
  2191. }
  2192. };
  2193. Lexer.prototype.newlineToken = function(offset) {
  2194. while (this.value() === ';') {
  2195. this.tokens.pop();
  2196. }
  2197. if (this.tag() !== 'TERMINATOR') {
  2198. this.token('TERMINATOR', '\n', offset, 0);
  2199. }
  2200. return this;
  2201. };
  2202. Lexer.prototype.suppressNewlines = function() {
  2203. if (this.value() === '\\') {
  2204. this.tokens.pop();
  2205. }
  2206. return this;
  2207. };
  2208. Lexer.prototype.literalToken = function() {
  2209. var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5;
  2210. if (match = OPERATOR.exec(this.chunk)) {
  2211. value = match[0];
  2212. if (CODE.test(value)) {
  2213. this.tagParameters();
  2214. }
  2215. } else {
  2216. value = this.chunk.charAt(0);
  2217. }
  2218. tag = value;
  2219. prev = last(this.tokens);
  2220. if (value === '=' && prev) {
  2221. if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) {
  2222. this.error("reserved word \"" + (this.value()) + "\" can't be assigned");
  2223. }
  2224. if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') {
  2225. prev[0] = 'COMPOUND_ASSIGN';
  2226. prev[1] += '=';
  2227. return value.length;
  2228. }
  2229. }
  2230. if (value === ';') {
  2231. this.seenFor = false;
  2232. tag = 'TERMINATOR';
  2233. } else if (__indexOf.call(MATH, value) >= 0) {
  2234. tag = 'MATH';
  2235. } else if (__indexOf.call(COMPARE, value) >= 0) {
  2236. tag = 'COMPARE';
  2237. } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) {
  2238. tag = 'COMPOUND_ASSIGN';
  2239. } else if (__indexOf.call(UNARY, value) >= 0) {
  2240. tag = 'UNARY';
  2241. } else if (__indexOf.call(SHIFT, value) >= 0) {
  2242. tag = 'SHIFT';
  2243. } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) {
  2244. tag = 'LOGIC';
  2245. } else if (prev && !prev.spaced) {
  2246. if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) {
  2247. if (prev[0] === '?') {
  2248. prev[0] = 'FUNC_EXIST';
  2249. }
  2250. tag = 'CALL_START';
  2251. } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) {
  2252. tag = 'INDEX_START';
  2253. switch (prev[0]) {
  2254. case '?':
  2255. prev[0] = 'INDEX_SOAK';
  2256. }
  2257. }
  2258. }
  2259. switch (value) {
  2260. case '(':
  2261. case '{':
  2262. case '[':
  2263. this.ends.push(INVERSES[value]);
  2264. break;
  2265. case ')':
  2266. case '}':
  2267. case ']':
  2268. this.pair(value);
  2269. }
  2270. this.token(tag, value);
  2271. return value.length;
  2272. };
  2273. Lexer.prototype.sanitizeHeredoc = function(doc, options) {
  2274. var attempt, herecomment, indent, match, _ref2;
  2275. indent = options.indent, herecomment = options.herecomment;
  2276. if (herecomment) {
  2277. if (HEREDOC_ILLEGAL.test(doc)) {
  2278. this.error("block comment cannot contain \"*/\", starting");
  2279. }
  2280. if (doc.indexOf('\n') < 0) {
  2281. return doc;
  2282. }
  2283. } else {
  2284. while (match = HEREDOC_INDENT.exec(doc)) {
  2285. attempt = match[1];
  2286. if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) {
  2287. indent = attempt;
  2288. }
  2289. }
  2290. }
  2291. if (indent) {
  2292. doc = doc.replace(RegExp("\\n" + indent, "g"), '\n');
  2293. }
  2294. if (!herecomment) {
  2295. doc = doc.replace(/^\n/, '');
  2296. }
  2297. return doc;
  2298. };
  2299. Lexer.prototype.tagParameters = function() {
  2300. var i, stack, tok, tokens;
  2301. if (this.tag() !== ')') {
  2302. return this;
  2303. }
  2304. stack = [];
  2305. tokens = this.tokens;
  2306. i = tokens.length;
  2307. tokens[--i][0] = 'PARAM_END';
  2308. while (tok = tokens[--i]) {
  2309. switch (tok[0]) {
  2310. case ')':
  2311. stack.push(tok);
  2312. break;
  2313. case '(':
  2314. case 'CALL_START':
  2315. if (stack.length) {
  2316. stack.pop();
  2317. } else if (tok[0] === '(') {
  2318. tok[0] = 'PARAM_START';
  2319. return this;
  2320. } else {
  2321. return this;
  2322. }
  2323. }
  2324. }
  2325. return this;
  2326. };
  2327. Lexer.prototype.closeIndentation = function() {
  2328. return this.outdentToken(this.indent);
  2329. };
  2330. Lexer.prototype.balancedString = function(str, end) {
  2331. var continueCount, i, letter, match, prev, stack, _i, _ref2;
  2332. continueCount = 0;
  2333. stack = [end];
  2334. for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) {
  2335. if (continueCount) {
  2336. --continueCount;
  2337. continue;
  2338. }
  2339. switch (letter = str.charAt(i)) {
  2340. case '\\':
  2341. ++continueCount;
  2342. continue;
  2343. case end:
  2344. stack.pop();
  2345. if (!stack.length) {
  2346. return str.slice(0, +i + 1 || 9e9);
  2347. }
  2348. end = stack[stack.length - 1];
  2349. continue;
  2350. }
  2351. if (end === '}' && (letter === '"' || letter === "'")) {
  2352. stack.push(end = letter);
  2353. } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) {
  2354. continueCount += match[0].length - 1;
  2355. } else if (end === '}' && letter === '{') {
  2356. stack.push(end = '}');
  2357. } else if (end === '"' && prev === '#' && letter === '{') {
  2358. stack.push(end = '}');
  2359. }
  2360. prev = letter;
  2361. }
  2362. return this.error("missing " + (stack.pop()) + ", starting");
  2363. };
  2364. Lexer.prototype.interpolateString = function(str, options) {
  2365. var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4;
  2366. if (options == null) {
  2367. options = {};
  2368. }
  2369. heredoc = options.heredoc, regex = options.regex, offsetInChunk = options.offsetInChunk, strOffset = options.strOffset, lexedLength = options.lexedLength;
  2370. offsetInChunk = offsetInChunk || 0;
  2371. strOffset = strOffset || 0;
  2372. lexedLength = lexedLength || str.length;
  2373. tokens = [];
  2374. pi = 0;
  2375. i = -1;
  2376. while (letter = str.charAt(i += 1)) {
  2377. if (letter === '\\') {
  2378. i += 1;
  2379. continue;
  2380. }
  2381. if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) {
  2382. continue;
  2383. }
  2384. if (pi < i) {
  2385. tokens.push(this.makeToken('NEOSTRING', str.slice(pi, i), strOffset + pi));
  2386. }
  2387. inner = expr.slice(1, -1);
  2388. if (inner.length) {
  2389. _ref2 = this.getLineAndColumnFromChunk(strOffset + i + 1), line = _ref2[0], column = _ref2[1];
  2390. nested = new Lexer().tokenize(inner, {
  2391. line: line,
  2392. column: column,
  2393. rewrite: false
  2394. });
  2395. popped = nested.pop();
  2396. if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') {
  2397. popped = nested.shift();
  2398. }
  2399. if (len = nested.length) {
  2400. if (len > 1) {
  2401. nested.unshift(this.makeToken('(', '(', strOffset + i + 1, 0));
  2402. nested.push(this.makeToken(')', ')', strOffset + i + 1 + inner.length, 0));
  2403. }
  2404. tokens.push(['TOKENS', nested]);
  2405. }
  2406. }
  2407. i += expr.length;
  2408. pi = i + 1;
  2409. }
  2410. if ((i > pi && pi < str.length)) {
  2411. tokens.push(this.makeToken('NEOSTRING', str.slice(pi), strOffset + pi));
  2412. }
  2413. if (regex) {
  2414. return tokens;
  2415. }
  2416. if (!tokens.length) {
  2417. return this.token('STRING', '""', offsetInChunk, lexedLength);
  2418. }
  2419. if (tokens[0][0] !== 'NEOSTRING') {
  2420. tokens.unshift(this.makeToken('NEOSTRING', '', offsetInChunk));
  2421. }
  2422. if (interpolated = tokens.length > 1) {
  2423. this.token('(', '(', offsetInChunk, 0);
  2424. }
  2425. for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) {
  2426. token = tokens[i];
  2427. tag = token[0], value = token[1];
  2428. if (i) {
  2429. if (i) {
  2430. plusToken = this.token('+', '+');
  2431. }
  2432. locationToken = tag === 'TOKENS' ? value[0] : token;
  2433. plusToken[2] = {
  2434. first_line: locationToken[2].first_line,
  2435. first_column: locationToken[2].first_column,
  2436. last_line: locationToken[2].first_line,
  2437. last_column: locationToken[2].first_column
  2438. };
  2439. }
  2440. if (tag === 'TOKENS') {
  2441. (_ref4 = this.tokens).push.apply(_ref4, value);
  2442. } else if (tag === 'NEOSTRING') {
  2443. token[0] = 'STRING';
  2444. token[1] = this.makeString(value, '"', heredoc);
  2445. this.tokens.push(token);
  2446. } else {
  2447. this.error("Unexpected " + tag);
  2448. }
  2449. }
  2450. if (interpolated) {
  2451. rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0);
  2452. rparen.stringEnd = true;
  2453. this.tokens.push(rparen);
  2454. }
  2455. return tokens;
  2456. };
  2457. Lexer.prototype.pair = function(tag) {
  2458. var size, wanted;
  2459. if (tag !== (wanted = last(this.ends))) {
  2460. if ('OUTDENT' !== wanted) {
  2461. this.error("unmatched " + tag);
  2462. }
  2463. this.indent -= size = last(this.indents);
  2464. this.outdentToken(size, true);
  2465. return this.pair(tag);
  2466. }
  2467. return this.ends.pop();
  2468. };
  2469. Lexer.prototype.getLineAndColumnFromChunk = function(offset) {
  2470. var column, lineCount, lines, string;
  2471. if (offset === 0) {
  2472. return [this.chunkLine, this.chunkColumn];
  2473. }
  2474. if (offset >= this.chunk.length) {
  2475. string = this.chunk;
  2476. } else {
  2477. string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9);
  2478. }
  2479. lineCount = count(string, '\n');
  2480. column = this.chunkColumn;
  2481. if (lineCount > 0) {
  2482. lines = string.split('\n');
  2483. column = last(lines).length;
  2484. } else {
  2485. column += string.length;
  2486. }
  2487. return [this.chunkLine + lineCount, column];
  2488. };
  2489. Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) {
  2490. var lastCharacter, locationData, token, _ref2, _ref3;
  2491. if (offsetInChunk == null) {
  2492. offsetInChunk = 0;
  2493. }
  2494. if (length == null) {
  2495. length = value.length;
  2496. }
  2497. locationData = {};
  2498. _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1];
  2499. lastCharacter = Math.max(0, length - 1);
  2500. _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1];
  2501. token = [tag, value, locationData];
  2502. return token;
  2503. };
  2504. Lexer.prototype.token = function(tag, value, offsetInChunk, length) {
  2505. var token;
  2506. token = this.makeToken(tag, value, offsetInChunk, length);
  2507. this.tokens.push(token);
  2508. return token;
  2509. };
  2510. Lexer.prototype.tag = function(index, tag) {
  2511. var tok;
  2512. return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]);
  2513. };
  2514. Lexer.prototype.value = function(index, val) {
  2515. var tok;
  2516. return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]);
  2517. };
  2518. Lexer.prototype.unfinished = function() {
  2519. var _ref2;
  2520. return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS');
  2521. };
  2522. Lexer.prototype.removeNewlines = function(str) {
  2523. return str.replace(/^\s*\n\s*/, '').replace(/([^\\]|\\\\)\s*\n\s*$/, '$1');
  2524. };
  2525. Lexer.prototype.escapeLines = function(str, heredoc) {
  2526. str = str.replace(/\\[^\S\n]*(\n|\\)\s*/g, function(escaped, character) {
  2527. if (character === '\n') {
  2528. return '';
  2529. } else {
  2530. return escaped;
  2531. }
  2532. });
  2533. if (heredoc) {
  2534. return str.replace(MULTILINER, '\\n');
  2535. } else {
  2536. return str.replace(/\s*\n\s*/g, ' ');
  2537. }
  2538. };
  2539. Lexer.prototype.makeString = function(body, quote, heredoc) {
  2540. if (!body) {
  2541. return quote + quote;
  2542. }
  2543. body = body.replace(RegExp("\\\\(" + quote + "|\\\\)", "g"), function(match, contents) {
  2544. if (contents === quote) {
  2545. return contents;
  2546. } else {
  2547. return match;
  2548. }
  2549. });
  2550. body = body.replace(RegExp("" + quote, "g"), '\\$&');
  2551. return quote + this.escapeLines(body, heredoc) + quote;
  2552. };
  2553. Lexer.prototype.error = function(message, offset) {
  2554. var first_column, first_line, _ref2;
  2555. if (offset == null) {
  2556. offset = 0;
  2557. }
  2558. _ref2 = this.getLineAndColumnFromChunk(offset), first_line = _ref2[0], first_column = _ref2[1];
  2559. return throwSyntaxError(message, {
  2560. first_line: first_line,
  2561. first_column: first_column
  2562. });
  2563. };
  2564. return Lexer;
  2565. })();
  2566. JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super'];
  2567. COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when'];
  2568. COFFEE_ALIAS_MAP = {
  2569. and: '&&',
  2570. or: '||',
  2571. is: '==',
  2572. isnt: '!=',
  2573. not: '!',
  2574. yes: 'true',
  2575. no: 'false',
  2576. on: 'true',
  2577. off: 'false'
  2578. };
  2579. COFFEE_ALIASES = (function() {
  2580. var _results;
  2581. _results = [];
  2582. for (key in COFFEE_ALIAS_MAP) {
  2583. _results.push(key);
  2584. }
  2585. return _results;
  2586. })();
  2587. COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES);
  2588. RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield'];
  2589. STRICT_PROSCRIBED = ['arguments', 'eval'];
  2590. JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED);
  2591. exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED);
  2592. exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED;
  2593. BOM = 65279;
  2594. IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/;
  2595. NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;
  2596. HEREDOC = /^("""|''')((?:\\[\s\S]|[^\\])*?)(?:\n[^\n\S]*)?\1/;
  2597. OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/;
  2598. WHITESPACE = /^[^\n\S]+/;
  2599. COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/;
  2600. CODE = /^[-=]>/;
  2601. MULTI_DENT = /^(?:\n[^\n\S]*)+/;
  2602. SIMPLESTR = /^'[^\\']*(?:\\[\s\S][^\\']*)*'/;
  2603. JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/;
  2604. REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/;
  2605. HEREGEX = /^\/{3}((?:\\?[\s\S])+?)\/{3}([imgy]{0,4})(?!\w)/;
  2606. HEREGEX_OMIT = /((?:\\\\)+)|\\(\s|\/)|\s+(?:#.*)?/g;
  2607. MULTILINER = /\n/g;
  2608. HEREDOC_INDENT = /\n+([^\n\S]*)/g;
  2609. HEREDOC_ILLEGAL = /\*\//;
  2610. LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/;
  2611. TRAILING_SPACES = /\s+$/;
  2612. COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='];
  2613. UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO'];
  2614. LOGIC = ['&&', '||', '&', '|', '^'];
  2615. SHIFT = ['<<', '>>', '>>>'];
  2616. COMPARE = ['==', '!=', '<', '>', '<=', '>='];
  2617. MATH = ['*', '/', '%'];
  2618. RELATION = ['IN', 'OF', 'INSTANCEOF'];
  2619. BOOL = ['TRUE', 'FALSE'];
  2620. NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--'];
  2621. NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']');
  2622. CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER'];
  2623. INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED');
  2624. LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR'];
  2625. });
  2626. ace.define("ace/mode/coffee/parser",["require","exports","module"], function(require, exports, module) {
  2627. var parser = {trace: function trace() { },
  2628. yy: {},
  2629. symbols_: {"error":2,"Root":3,"Body":4,"Line":5,"TERMINATOR":6,"Expression":7,"Statement":8,"Return":9,"Comment":10,"STATEMENT":11,"Value":12,"Invocation":13,"Code":14,"Operation":15,"Assign":16,"If":17,"Try":18,"While":19,"For":20,"Switch":21,"Class":22,"Throw":23,"Block":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1},
  2630. terminals_: {2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"},
  2631. productions_: [0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[16,3],[16,4],[16,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[9,2],[9,1],[10,1],[14,5],[14,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[12,1],[12,1],[12,1],[12,1],[12,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[18,2],[18,3],[18,4],[18,5],[97,3],[97,3],[97,2],[23,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[19,2],[19,2],[19,2],[19,1],[107,2],[107,2],[20,2],[20,2],[20,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[21,5],[21,7],[21,4],[21,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]],
  2632. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
  2633. var $0 = $$.length - 1;
  2634. switch (yystate) {
  2635. case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block);
  2636. break;
  2637. case 2:return this.$ = $$[$0];
  2638. break;
  2639. case 3:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]]));
  2640. break;
  2641. case 4:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0]));
  2642. break;
  2643. case 5:this.$ = $$[$0-1];
  2644. break;
  2645. case 6:this.$ = $$[$0];
  2646. break;
  2647. case 7:this.$ = $$[$0];
  2648. break;
  2649. case 8:this.$ = $$[$0];
  2650. break;
  2651. case 9:this.$ = $$[$0];
  2652. break;
  2653. case 10:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2654. break;
  2655. case 11:this.$ = $$[$0];
  2656. break;
  2657. case 12:this.$ = $$[$0];
  2658. break;
  2659. case 13:this.$ = $$[$0];
  2660. break;
  2661. case 14:this.$ = $$[$0];
  2662. break;
  2663. case 15:this.$ = $$[$0];
  2664. break;
  2665. case 16:this.$ = $$[$0];
  2666. break;
  2667. case 17:this.$ = $$[$0];
  2668. break;
  2669. case 18:this.$ = $$[$0];
  2670. break;
  2671. case 19:this.$ = $$[$0];
  2672. break;
  2673. case 20:this.$ = $$[$0];
  2674. break;
  2675. case 21:this.$ = $$[$0];
  2676. break;
  2677. case 22:this.$ = $$[$0];
  2678. break;
  2679. case 23:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block);
  2680. break;
  2681. case 24:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
  2682. break;
  2683. case 25:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2684. break;
  2685. case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2686. break;
  2687. case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2688. break;
  2689. case 28:this.$ = $$[$0];
  2690. break;
  2691. case 29:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2692. break;
  2693. case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2694. break;
  2695. case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2696. break;
  2697. case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined);
  2698. break;
  2699. case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null);
  2700. break;
  2701. case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0]));
  2702. break;
  2703. case 35:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0]));
  2704. break;
  2705. case 36:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0]));
  2706. break;
  2707. case 37:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1]));
  2708. break;
  2709. case 38:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2710. break;
  2711. case 39:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object'));
  2712. break;
  2713. case 40:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object'));
  2714. break;
  2715. case 41:this.$ = $$[$0];
  2716. break;
  2717. case 42:this.$ = $$[$0];
  2718. break;
  2719. case 43:this.$ = $$[$0];
  2720. break;
  2721. case 44:this.$ = $$[$0];
  2722. break;
  2723. case 45:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0]));
  2724. break;
  2725. case 46:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return);
  2726. break;
  2727. case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0]));
  2728. break;
  2729. case 48:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1]));
  2730. break;
  2731. case 49:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1]));
  2732. break;
  2733. case 50:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func');
  2734. break;
  2735. case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc');
  2736. break;
  2737. case 52:this.$ = $$[$0];
  2738. break;
  2739. case 53:this.$ = $$[$0];
  2740. break;
  2741. case 54:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
  2742. break;
  2743. case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
  2744. break;
  2745. case 56:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
  2746. break;
  2747. case 57:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
  2748. break;
  2749. case 58:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
  2750. break;
  2751. case 59:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0]));
  2752. break;
  2753. case 60:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true));
  2754. break;
  2755. case 61:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0]));
  2756. break;
  2757. case 62:this.$ = $$[$0];
  2758. break;
  2759. case 63:this.$ = $$[$0];
  2760. break;
  2761. case 64:this.$ = $$[$0];
  2762. break;
  2763. case 65:this.$ = $$[$0];
  2764. break;
  2765. case 66:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1]));
  2766. break;
  2767. case 67:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2768. break;
  2769. case 68:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0]));
  2770. break;
  2771. case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0])));
  2772. break;
  2773. case 70:this.$ = $$[$0];
  2774. break;
  2775. case 71:this.$ = $$[$0];
  2776. break;
  2777. case 72:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2778. break;
  2779. case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2780. break;
  2781. case 74:this.$ = $$[$0];
  2782. break;
  2783. case 75:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2784. break;
  2785. case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2786. break;
  2787. case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2788. break;
  2789. case 78:this.$ = $$[$0];
  2790. break;
  2791. case 79:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0]));
  2792. break;
  2793. case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak'));
  2794. break;
  2795. case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
  2796. break;
  2797. case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
  2798. break;
  2799. case 83:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype')));
  2800. break;
  2801. case 84:this.$ = $$[$0];
  2802. break;
  2803. case 85:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
  2804. break;
  2805. case 86:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], {
  2806. soak: true
  2807. }));
  2808. break;
  2809. case 87:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0]));
  2810. break;
  2811. case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0]));
  2812. break;
  2813. case 89:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated));
  2814. break;
  2815. case 90:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
  2816. break;
  2817. case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
  2818. break;
  2819. case 92:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
  2820. break;
  2821. case 93:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
  2822. break;
  2823. case 94:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
  2824. break;
  2825. case 95:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class);
  2826. break;
  2827. case 96:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0]));
  2828. break;
  2829. case 97:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0]));
  2830. break;
  2831. case 98:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0]));
  2832. break;
  2833. case 99:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0]));
  2834. break;
  2835. case 100:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0]));
  2836. break;
  2837. case 101:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0]));
  2838. break;
  2839. case 102:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0]));
  2840. break;
  2841. case 103:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
  2842. break;
  2843. case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
  2844. break;
  2845. case 105:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))]));
  2846. break;
  2847. case 106:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0]));
  2848. break;
  2849. case 107:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false);
  2850. break;
  2851. case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true);
  2852. break;
  2853. case 109:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]);
  2854. break;
  2855. case 110:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
  2856. break;
  2857. case 111:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
  2858. break;
  2859. case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
  2860. break;
  2861. case 113:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this'));
  2862. break;
  2863. case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([]));
  2864. break;
  2865. case 115:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2]));
  2866. break;
  2867. case 116:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive');
  2868. break;
  2869. case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive');
  2870. break;
  2871. case 118:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2]));
  2872. break;
  2873. case 119:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1]));
  2874. break;
  2875. case 120:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0]));
  2876. break;
  2877. case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1]));
  2878. break;
  2879. case 122:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0]));
  2880. break;
  2881. case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
  2882. break;
  2883. case 124:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
  2884. break;
  2885. case 125:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
  2886. break;
  2887. case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
  2888. break;
  2889. case 127:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
  2890. break;
  2891. case 128:this.$ = $$[$0];
  2892. break;
  2893. case 129:this.$ = $$[$0];
  2894. break;
  2895. case 130:this.$ = $$[$0];
  2896. break;
  2897. case 131:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0]));
  2898. break;
  2899. case 132:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0]));
  2900. break;
  2901. case 133:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1]));
  2902. break;
  2903. case 134:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0]));
  2904. break;
  2905. case 135:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]));
  2906. break;
  2907. case 136:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]);
  2908. break;
  2909. case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]);
  2910. break;
  2911. case 138:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]);
  2912. break;
  2913. case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0]));
  2914. break;
  2915. case 140:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1]));
  2916. break;
  2917. case 141:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2]));
  2918. break;
  2919. case 142:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0]));
  2920. break;
  2921. case 143:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
  2922. guard: $$[$0]
  2923. }));
  2924. break;
  2925. case 144:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], {
  2926. invert: true
  2927. }));
  2928. break;
  2929. case 145:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
  2930. invert: true,
  2931. guard: $$[$0]
  2932. }));
  2933. break;
  2934. case 146:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0]));
  2935. break;
  2936. case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
  2937. break;
  2938. case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
  2939. break;
  2940. case 149:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]);
  2941. break;
  2942. case 150:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0]));
  2943. break;
  2944. case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]]))));
  2945. break;
  2946. case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
  2947. break;
  2948. case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
  2949. break;
  2950. case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1]));
  2951. break;
  2952. case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
  2953. source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0]))
  2954. });
  2955. break;
  2956. case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () {
  2957. $$[$0].own = $$[$0-1].own;
  2958. $$[$0].name = $$[$0-1][0];
  2959. $$[$0].index = $$[$0-1][1];
  2960. return $$[$0];
  2961. }()));
  2962. break;
  2963. case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]);
  2964. break;
  2965. case 158:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
  2966. $$[$0].own = true;
  2967. return $$[$0];
  2968. }()));
  2969. break;
  2970. case 159:this.$ = $$[$0];
  2971. break;
  2972. case 160:this.$ = $$[$0];
  2973. break;
  2974. case 161:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2975. break;
  2976. case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2977. break;
  2978. case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
  2979. break;
  2980. case 164:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]);
  2981. break;
  2982. case 165:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
  2983. source: $$[$0]
  2984. });
  2985. break;
  2986. case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
  2987. source: $$[$0],
  2988. object: true
  2989. });
  2990. break;
  2991. case 167:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
  2992. source: $$[$0-2],
  2993. guard: $$[$0]
  2994. });
  2995. break;
  2996. case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
  2997. source: $$[$0-2],
  2998. guard: $$[$0],
  2999. object: true
  3000. });
  3001. break;
  3002. case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
  3003. source: $$[$0-2],
  3004. step: $$[$0]
  3005. });
  3006. break;
  3007. case 170:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
  3008. source: $$[$0-4],
  3009. guard: $$[$0-2],
  3010. step: $$[$0]
  3011. });
  3012. break;
  3013. case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
  3014. source: $$[$0-4],
  3015. step: $$[$0-2],
  3016. guard: $$[$0]
  3017. });
  3018. break;
  3019. case 172:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1]));
  3020. break;
  3021. case 173:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]));
  3022. break;
  3023. case 174:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1]));
  3024. break;
  3025. case 175:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1]));
  3026. break;
  3027. case 176:this.$ = $$[$0];
  3028. break;
  3029. case 177:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0]));
  3030. break;
  3031. case 178:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]);
  3032. break;
  3033. case 179:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]);
  3034. break;
  3035. case 180:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {
  3036. type: $$[$0-2]
  3037. }));
  3038. break;
  3039. case 181:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {
  3040. type: $$[$0-2]
  3041. }))));
  3042. break;
  3043. case 182:this.$ = $$[$0];
  3044. break;
  3045. case 183:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0]));
  3046. break;
  3047. case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
  3048. type: $$[$0-1],
  3049. statement: true
  3050. }));
  3051. break;
  3052. case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
  3053. type: $$[$0-1],
  3054. statement: true
  3055. }));
  3056. break;
  3057. case 186:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0]));
  3058. break;
  3059. case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0]));
  3060. break;
  3061. case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0]));
  3062. break;
  3063. case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0]));
  3064. break;
  3065. case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0]));
  3066. break;
  3067. case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true));
  3068. break;
  3069. case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true));
  3070. break;
  3071. case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1]));
  3072. break;
  3073. case 194:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0]));
  3074. break;
  3075. case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0]));
  3076. break;
  3077. case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
  3078. break;
  3079. case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
  3080. break;
  3081. case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
  3082. break;
  3083. case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
  3084. break;
  3085. case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
  3086. if ($$[$0-1].charAt(0) === '!') {
  3087. return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert();
  3088. } else {
  3089. return new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
  3090. }
  3091. }()));
  3092. break;
  3093. case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1]));
  3094. break;
  3095. case 202:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]));
  3096. break;
  3097. case 203:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2]));
  3098. break;
  3099. case 204:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0]));
  3100. break;
  3101. }
  3102. },
  3103. table: [{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[3]},{1:[2,2],6:[1,72]},{1:[2,3],6:[2,3],26:[2,3],102:[2,3]},{1:[2,6],6:[2,6],26:[2,6],102:[2,6],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,11],6:[2,11],25:[2,11],26:[2,11],49:[2,11],54:[2,11],57:[2,11],62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,11],74:[1,96],78:[2,11],81:87,84:[1,89],85:[2,107],86:[2,11],91:[2,11],93:[2,11],102:[2,11],104:[2,11],105:[2,11],106:[2,11],110:[2,11],118:[2,11],126:[2,11],128:[2,11],129:[2,11],132:[2,11],133:[2,11],134:[2,11],135:[2,11],136:[2,11],137:[2,11]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,12],74:[1,96],78:[2,12],81:97,84:[1,89],85:[2,107],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],73:[2,13],78:[2,13],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],104:[2,8],106:[2,8],110:[2,8],126:[2,8]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[1,99],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],82:100,84:[2,105],85:[1,101],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{6:[2,54],25:[2,54],27:105,28:[1,71],44:106,48:102,49:[2,54],54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{24:111,25:[1,112]},{7:113,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:115,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:116,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:117,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:121,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[1,125],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[1,122],131:[1,123],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[1,124]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,126],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{24:127,25:[1,112]},{24:128,25:[1,112]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{24:129,25:[1,112]},{7:130,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,131],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,95],6:[2,95],12:118,13:119,24:132,25:[1,112],26:[2,95],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,49:[2,95],54:[2,95],57:[2,95],58:45,59:46,61:134,63:23,64:24,65:25,73:[2,95],76:[1,68],78:[2,95],80:[1,133],83:[1,26],86:[2,95],88:[1,56],89:[1,57],90:[1,55],91:[2,95],93:[2,95],101:[1,54],102:[2,95],104:[2,95],105:[2,95],106:[2,95],110:[2,95],118:[2,95],126:[2,95],128:[2,95],129:[2,95],132:[2,95],133:[2,95],134:[2,95],135:[2,95],136:[2,95],137:[2,95]},{7:135,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,46],6:[2,46],7:136,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,46],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,46],103:37,104:[2,46],106:[2,46],107:38,108:[1,65],109:39,110:[2,46],111:67,119:[1,40],124:35,125:[1,62],126:[2,46],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,47],6:[2,47],25:[2,47],26:[2,47],54:[2,47],78:[2,47],102:[2,47],104:[2,47],106:[2,47],110:[2,47],126:[2,47]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{4:137,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,138],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:139,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],27:145,28:[1,71],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{25:[2,50]},{25:[2,51]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],40:[2,67],49:[2,67],54:[2,67],57:[2,67],66:[2,67],67:[2,67],68:[2,67],69:[2,67],71:[2,67],73:[2,67],74:[2,67],78:[2,67],80:[2,67],84:[2,67],85:[2,67],86:[2,67],91:[2,67],93:[2,67],102:[2,67],104:[2,67],105:[2,67],106:[2,67],110:[2,67],118:[2,67],126:[2,67],128:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67],135:[2,67],136:[2,67],137:[2,67],138:[2,67]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{7:146,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:147,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:148,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:150,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:149,25:[1,112],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{27:155,28:[1,71],44:156,58:157,59:158,64:151,76:[1,68],89:[1,109],90:[1,55],113:152,114:[1,153],115:154},{112:159,116:[1,160],117:[1,161]},{6:[2,90],10:165,25:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:162,78:[2,90],89:[1,109]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],40:[2,25],43:[2,25],49:[2,25],54:[2,25],57:[2,25],66:[2,25],67:[2,25],68:[2,25],69:[2,25],71:[2,25],73:[2,25],74:[2,25],78:[2,25],80:[2,25],84:[2,25],85:[2,25],86:[2,25],91:[2,25],93:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],116:[2,25],117:[2,25],118:[2,25],126:[2,25],128:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25],138:[2,25]},{1:[2,5],5:169,6:[2,5],7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,5],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,5],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{7:170,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:171,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:172,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:173,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:174,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:175,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:176,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:177,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{7:178,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:179,85:[1,101]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{85:[2,108]},{27:180,28:[1,71]},{27:181,28:[1,71]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],27:182,28:[1,71],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{27:183,28:[1,71]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{7:185,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],57:[1,189],58:45,59:46,61:34,63:23,64:24,65:25,72:184,75:186,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],92:187,93:[1,188],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{70:190,71:[1,95],74:[1,96]},{82:191,85:[1,101]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{6:[1,193],7:192,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,194],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],84:[2,106],85:[2,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[1,195],87:196,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],49:[1,198],53:200,54:[1,199]},{6:[2,55],25:[2,55],26:[2,55],49:[2,55],54:[2,55]},{6:[2,59],25:[2,59],26:[2,59],40:[1,202],49:[2,59],54:[2,59],57:[1,201]},{6:[2,62],25:[2,62],26:[2,62],40:[2,62],49:[2,62],54:[2,62],57:[2,62]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{27:145,28:[1,71]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{4:204,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,203],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:82,104:[2,186],105:[2,186],106:[2,186],109:83,110:[2,186],111:67,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,73],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:82,104:[2,187],105:[2,187],106:[2,187],109:83,110:[2,187],111:67,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,73],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:82,104:[2,188],105:[2,188],106:[2,188],109:83,110:[2,188],111:67,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,73],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,189],74:[2,71],78:[2,189],84:[2,71],85:[2,71],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:87,84:[1,89],85:[2,107]},{62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:97,84:[1,89],85:[2,107]},{66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],74:[2,74],84:[2,74],85:[2,74]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,190],74:[2,71],78:[2,190],84:[2,71],85:[2,71],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,207],7:205,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,206],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:208,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{24:209,25:[1,112],125:[1,210]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],49:[2,132],54:[2,132],57:[2,132],73:[2,132],78:[2,132],86:[2,132],91:[2,132],93:[2,132],97:211,98:[1,212],99:[1,213],102:[2,132],104:[2,132],105:[2,132],106:[2,132],110:[2,132],118:[2,132],126:[2,132],128:[2,132],129:[2,132],132:[2,132],133:[2,132],134:[2,132],135:[2,132],136:[2,132],137:[2,132]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,214],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{120:215,122:216,123:[1,217]},{1:[2,96],6:[2,96],25:[2,96],26:[2,96],49:[2,96],54:[2,96],57:[2,96],73:[2,96],78:[2,96],86:[2,96],91:[2,96],93:[2,96],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{7:218,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,99],6:[2,99],24:219,25:[1,112],26:[2,99],49:[2,99],54:[2,99],57:[2,99],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,99],74:[2,71],78:[2,99],80:[1,220],84:[2,71],85:[2,71],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:82,104:[2,139],105:[2,139],106:[2,139],109:83,110:[2,139],111:67,118:[2,139],126:[2,139],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,45],6:[2,45],26:[2,45],102:[2,45],103:82,104:[2,45],106:[2,45],109:83,110:[2,45],111:67,126:[2,45],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,72],102:[1,221]},{4:222,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,128],25:[2,128],54:[2,128],57:[1,224],91:[2,128],92:223,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114]},{6:[2,52],25:[2,52],53:225,54:[1,226],91:[2,52]},{6:[2,123],25:[2,123],26:[2,123],54:[2,123],86:[2,123],91:[2,123]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:227,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],86:[2,129],91:[2,129]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],40:[2,113],43:[2,113],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],80:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],116:[2,113],117:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113],138:[2,113]},{24:228,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:82,104:[1,63],105:[1,229],106:[1,64],109:83,110:[1,66],111:67,118:[2,142],126:[2,142],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:82,104:[1,63],105:[1,230],106:[1,64],109:83,110:[1,66],111:67,118:[2,144],126:[2,144],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:82,104:[1,63],105:[2,151],106:[1,64],109:83,110:[1,66],111:67,118:[2,151],126:[2,151],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],113:231,115:154},{54:[1,232],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{7:233,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:234,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],53:235,54:[1,236],78:[2,52]},{6:[2,91],25:[2,91],26:[2,91],54:[2,91],78:[2,91]},{6:[2,38],25:[2,38],26:[2,38],43:[1,237],54:[2,38],78:[2,38]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,42],25:[2,42],26:[2,42],43:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:82,104:[2,194],105:[2,194],106:[2,194],109:83,110:[2,194],111:67,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,73],133:[1,76],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:82,104:[2,195],105:[2,195],106:[2,195],109:83,110:[2,195],111:67,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,73],133:[1,76],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:82,104:[2,196],105:[2,196],106:[2,196],109:83,110:[2,196],111:67,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,73],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:82,104:[2,197],105:[2,197],106:[2,197],109:83,110:[2,197],111:67,118:[2,197],126:[2,197],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:82,104:[2,198],105:[2,198],106:[2,198],109:83,110:[2,198],111:67,118:[2,198],126:[2,198],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,198],136:[2,198],137:[1,80]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:82,104:[2,199],105:[2,199],106:[2,199],109:83,110:[2,199],111:67,118:[2,199],126:[2,199],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[2,199],137:[1,80]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:82,104:[2,200],105:[2,200],106:[2,200],109:83,110:[2,200],111:67,118:[2,200],126:[2,200],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:82,104:[1,63],105:[2,185],106:[1,64],109:83,110:[1,66],111:67,118:[2,185],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:82,104:[1,63],105:[2,184],106:[1,64],109:83,110:[1,66],111:67,118:[2,184],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],66:[2,103],67:[2,103],68:[2,103],69:[2,103],71:[2,103],73:[2,103],74:[2,103],78:[2,103],84:[2,103],85:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],40:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],80:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79],138:[2,79]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{73:[1,238]},{57:[1,189],73:[2,87],92:239,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{73:[2,88]},{7:240,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,122],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{11:[2,116],28:[2,116],30:[2,116],31:[2,116],33:[2,116],34:[2,116],35:[2,116],36:[2,116],37:[2,116],38:[2,116],45:[2,116],46:[2,116],47:[2,116],51:[2,116],52:[2,116],73:[2,116],76:[2,116],79:[2,116],83:[2,116],88:[2,116],89:[2,116],90:[2,116],96:[2,116],100:[2,116],101:[2,116],104:[2,116],106:[2,116],108:[2,116],110:[2,116],119:[2,116],125:[2,116],127:[2,116],128:[2,116],129:[2,116],130:[2,116],131:[2,116]},{11:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],73:[2,35],78:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],103:82,104:[2,35],105:[2,35],106:[2,35],109:83,110:[2,35],111:67,118:[2,35],126:[2,35],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:241,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:242,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],49:[2,109],54:[2,109],57:[2,109],66:[2,109],67:[2,109],68:[2,109],69:[2,109],71:[2,109],73:[2,109],74:[2,109],78:[2,109],84:[2,109],85:[2,109],86:[2,109],91:[2,109],93:[2,109],102:[2,109],104:[2,109],105:[2,109],106:[2,109],110:[2,109],118:[2,109],126:[2,109],128:[2,109],129:[2,109],132:[2,109],133:[2,109],134:[2,109],135:[2,109],136:[2,109],137:[2,109]},{6:[2,52],25:[2,52],53:243,54:[1,226],86:[2,52]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],57:[1,244],86:[2,128],91:[2,128],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{50:245,51:[1,58],52:[1,59]},{6:[2,53],25:[2,53],26:[2,53],27:105,28:[1,71],44:106,55:246,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[1,247],25:[1,248]},{6:[2,60],25:[2,60],26:[2,60],49:[2,60],54:[2,60]},{7:249,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],98:[2,23],99:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],121:[2,23],123:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{6:[1,72],26:[1,250]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:82,104:[2,201],105:[2,201],106:[2,201],109:83,110:[2,201],111:67,118:[2,201],126:[2,201],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:251,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:252,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:82,104:[2,204],105:[2,204],106:[2,204],109:83,110:[2,204],111:67,118:[2,204],126:[2,204],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{7:253,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],98:[1,254],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{24:255,25:[1,112]},{24:258,25:[1,112],27:256,28:[1,71],59:257,76:[1,68]},{120:259,122:216,123:[1,217]},{26:[1,260],121:[1,261],122:262,123:[1,217]},{26:[2,176],121:[2,176],123:[2,176]},{7:264,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],95:263,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,97],6:[2,97],24:265,25:[1,112],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],103:82,104:[1,63],105:[2,97],106:[1,64],109:83,110:[1,66],111:67,118:[2,97],126:[2,97],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],49:[2,100],54:[2,100],57:[2,100],73:[2,100],78:[2,100],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{7:266,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,72],26:[1,267]},{7:268,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,66],11:[2,117],25:[2,66],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],54:[2,66],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],91:[2,66],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{6:[1,270],25:[1,271],91:[1,269]},{6:[2,53],7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[2,53],26:[2,53],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[2,53],88:[1,56],89:[1,57],90:[1,55],91:[2,53],94:272,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],26:[2,52],53:273,54:[1,226]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{7:274,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:275,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{116:[2,158],117:[2,158]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],115:276},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:82,104:[2,165],105:[1,277],106:[2,165],109:83,110:[2,165],111:67,118:[1,278],126:[2,165],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:82,104:[2,166],105:[1,279],106:[2,166],109:83,110:[2,166],111:67,118:[2,166],126:[2,166],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,281],25:[1,282],78:[1,280]},{6:[2,53],10:165,25:[2,53],26:[2,53],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:283,42:164,44:168,46:[1,44],78:[2,53],89:[1,109]},{7:284,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,285],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{7:286,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,120],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,121],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:82,104:[2,36],105:[2,36],106:[2,36],109:83,110:[2,36],111:67,118:[2,36],126:[2,36],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{26:[1,287],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],86:[1,288]},{6:[2,66],25:[2,66],26:[2,66],54:[2,66],86:[2,66],91:[2,66]},{24:289,25:[1,112]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{27:105,28:[1,71],44:106,55:290,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,54],25:[2,54],26:[2,54],27:105,28:[1,71],44:106,48:291,54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{26:[1,292],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:82,104:[2,203],105:[2,203],106:[2,203],109:83,110:[2,203],111:67,118:[2,203],126:[2,203],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:293,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:294,25:[1,112]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{24:295,25:[1,112]},{24:296,25:[1,112]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{26:[1,297],121:[1,298],122:262,123:[1,217]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{24:299,25:[1,112]},{26:[2,177],121:[2,177],123:[2,177]},{24:300,25:[1,112],54:[1,301]},{25:[2,130],54:[2,130],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],104:[2,98],105:[2,98],106:[2,98],110:[2,98],118:[2,98],126:[2,98],128:[2,98],129:[2,98],132:[2,98],133:[2,98],134:[2,98],135:[2,98],136:[2,98],137:[2,98]},{1:[2,101],6:[2,101],24:302,25:[1,112],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],103:82,104:[1,63],105:[2,101],106:[1,64],109:83,110:[1,66],111:67,118:[2,101],126:[2,101],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{102:[1,303]},{91:[1,304],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],94:305,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:306,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{6:[1,270],25:[1,271],26:[1,307]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:82,104:[1,63],105:[2,143],106:[1,64],109:83,110:[1,66],111:67,118:[2,143],126:[2,143],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:82,104:[1,63],105:[2,145],106:[1,64],109:83,110:[1,66],111:67,118:[2,145],126:[2,145],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{116:[2,164],117:[2,164]},{7:308,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:309,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:310,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,89],6:[2,89],25:[2,89],26:[2,89],40:[2,89],49:[2,89],54:[2,89],57:[2,89],66:[2,89],67:[2,89],68:[2,89],69:[2,89],71:[2,89],73:[2,89],74:[2,89],78:[2,89],84:[2,89],85:[2,89],86:[2,89],91:[2,89],93:[2,89],102:[2,89],104:[2,89],105:[2,89],106:[2,89],110:[2,89],116:[2,89],117:[2,89],118:[2,89],126:[2,89],128:[2,89],129:[2,89],132:[2,89],133:[2,89],134:[2,89],135:[2,89],136:[2,89],137:[2,89]},{10:165,27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:311,42:164,44:168,46:[1,44],89:[1,109]},{6:[2,90],10:165,25:[2,90],26:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:312,89:[1,109]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],54:[2,39],78:[2,39],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:313,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,119],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],104:[2,37],105:[2,37],106:[2,37],110:[2,37],118:[2,37],126:[2,37],128:[2,37],129:[2,37],132:[2,37],133:[2,37],134:[2,37],135:[2,37],136:[2,37],137:[2,37]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],49:[2,48],54:[2,48],57:[2,48],73:[2,48],78:[2,48],86:[2,48],91:[2,48],93:[2,48],102:[2,48],104:[2,48],105:[2,48],106:[2,48],110:[2,48],118:[2,48],126:[2,48],128:[2,48],129:[2,48],132:[2,48],133:[2,48],134:[2,48],135:[2,48],136:[2,48],137:[2,48]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{6:[2,52],25:[2,52],26:[2,52],53:314,54:[1,199]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],98:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{24:315,25:[1,112]},{26:[1,316]},{6:[1,317],26:[2,178],121:[2,178],123:[2,178]},{7:318,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,102],6:[2,102],25:[2,102],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],104:[2,102],105:[2,102],106:[2,102],110:[2,102],118:[2,102],126:[2,102],128:[2,102],129:[2,102],132:[2,102],133:[2,102],134:[2,102],135:[2,102],136:[2,102],137:[2,102]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,118],6:[2,118],25:[2,118],26:[2,118],49:[2,118],54:[2,118],57:[2,118],66:[2,118],67:[2,118],68:[2,118],69:[2,118],71:[2,118],73:[2,118],74:[2,118],78:[2,118],84:[2,118],85:[2,118],86:[2,118],91:[2,118],93:[2,118],102:[2,118],104:[2,118],105:[2,118],106:[2,118],110:[2,118],118:[2,118],126:[2,118],128:[2,118],129:[2,118],132:[2,118],133:[2,118],134:[2,118],135:[2,118],136:[2,118],137:[2,118]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[2,52],25:[2,52],26:[2,52],53:319,54:[1,226]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:82,104:[2,167],105:[2,167],106:[2,167],109:83,110:[2,167],111:67,118:[1,320],126:[2,167],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:82,104:[2,169],105:[1,321],106:[2,169],109:83,110:[2,169],111:67,118:[2,169],126:[2,169],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:82,104:[2,168],105:[2,168],106:[2,168],109:83,110:[2,168],111:67,118:[2,168],126:[2,168],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,52],25:[2,52],26:[2,52],53:322,54:[1,236]},{26:[1,323],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,247],25:[1,248],26:[1,324]},{26:[1,325]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,131],54:[2,131],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],26:[1,326]},{7:327,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:328,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[1,281],25:[1,282],26:[1,329]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:82,104:[2,170],105:[2,170],106:[2,170],109:83,110:[2,170],111:67,118:[2,170],126:[2,170],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:82,104:[2,171],105:[2,171],106:[2,171],109:83,110:[2,171],111:67,118:[2,171],126:[2,171],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]}],
  3104. defaultActions: {58:[2,50],59:[2,51],89:[2,108],186:[2,88]},
  3105. parseError: function parseError(str, hash) {
  3106. if (hash.recoverable) {
  3107. this.trace(str);
  3108. } else {
  3109. var e = new Error(str)
  3110. e.location = hash.loc
  3111. throw e;
  3112. }
  3113. },
  3114. parse: function parse(input) {
  3115. var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
  3116. this.lexer.setInput(input);
  3117. this.lexer.yy = this.yy;
  3118. this.yy.lexer = this.lexer;
  3119. this.yy.parser = this;
  3120. if (typeof this.lexer.yylloc == 'undefined') {
  3121. this.lexer.yylloc = {};
  3122. }
  3123. var yyloc = this.lexer.yylloc;
  3124. lstack.push(yyloc);
  3125. var ranges = this.lexer.options && this.lexer.options.ranges;
  3126. if (typeof this.yy.parseError === 'function') {
  3127. this.parseError = this.yy.parseError;
  3128. } else {
  3129. this.parseError = Object.getPrototypeOf(this).parseError;
  3130. }
  3131. function popStack(n) {
  3132. stack.length = stack.length - 2 * n;
  3133. vstack.length = vstack.length - n;
  3134. lstack.length = lstack.length - n;
  3135. }
  3136. function lex() {
  3137. var token;
  3138. token = self.lexer.lex() || EOF;
  3139. if (typeof token !== 'number') {
  3140. token = self.symbols_[token] || token;
  3141. }
  3142. return token;
  3143. }
  3144. var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
  3145. while (true) {
  3146. state = stack[stack.length - 1];
  3147. if (this.defaultActions[state]) {
  3148. action = this.defaultActions[state];
  3149. } else {
  3150. if (symbol === null || typeof symbol == 'undefined') {
  3151. symbol = lex();
  3152. }
  3153. action = table[state] && table[state][symbol];
  3154. }
  3155. if (typeof action === 'undefined' || !action.length || !action[0]) {
  3156. var errStr = '';
  3157. expected = [];
  3158. for (p in table[state]) {
  3159. if (this.terminals_[p] && p > TERROR) {
  3160. expected.push('\'' + this.terminals_[p] + '\'');
  3161. }
  3162. }
  3163. if (this.lexer.showPosition) {
  3164. errStr = 'Expecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
  3165. } else {
  3166. errStr = 'Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
  3167. }
  3168. if (this.lexer.yylloc.first_line !== yyloc.first_line) yyloc = this.lexer.yylloc;
  3169. this.parseError(errStr, {
  3170. text: this.lexer.match,
  3171. token: this.terminals_[symbol] || symbol,
  3172. line: this.lexer.yylineno,
  3173. loc: yyloc,
  3174. expected: expected
  3175. });
  3176. }
  3177. if (action[0] instanceof Array && action.length > 1) {
  3178. throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
  3179. }
  3180. switch (action[0]) {
  3181. case 1:
  3182. stack.push(symbol);
  3183. vstack.push(this.lexer.yytext);
  3184. lstack.push(this.lexer.yylloc);
  3185. stack.push(action[1]);
  3186. symbol = null;
  3187. if (!preErrorSymbol) {
  3188. yyleng = this.lexer.yyleng;
  3189. yytext = this.lexer.yytext;
  3190. yylineno = this.lexer.yylineno;
  3191. yyloc = this.lexer.yylloc;
  3192. if (recovering > 0) {
  3193. recovering--;
  3194. }
  3195. } else {
  3196. symbol = preErrorSymbol;
  3197. preErrorSymbol = null;
  3198. }
  3199. break;
  3200. case 2:
  3201. len = this.productions_[action[1]][1];
  3202. yyval.$ = vstack[vstack.length - len];
  3203. yyval._$ = {
  3204. first_line: lstack[lstack.length - (len || 1)].first_line,
  3205. last_line: lstack[lstack.length - 1].last_line,
  3206. first_column: lstack[lstack.length - (len || 1)].first_column,
  3207. last_column: lstack[lstack.length - 1].last_column
  3208. };
  3209. if (ranges) {
  3210. yyval._$.range = [
  3211. lstack[lstack.length - (len || 1)].range[0],
  3212. lstack[lstack.length - 1].range[1]
  3213. ];
  3214. }
  3215. r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
  3216. if (typeof r !== 'undefined') {
  3217. return r;
  3218. }
  3219. if (len) {
  3220. stack = stack.slice(0, -1 * len * 2);
  3221. vstack = vstack.slice(0, -1 * len);
  3222. lstack = lstack.slice(0, -1 * len);
  3223. }
  3224. stack.push(this.productions_[action[1]][0]);
  3225. vstack.push(yyval.$);
  3226. lstack.push(yyval._$);
  3227. newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
  3228. stack.push(newState);
  3229. break;
  3230. case 3:
  3231. return true;
  3232. }
  3233. }
  3234. return true;
  3235. }};
  3236. undefined
  3237. function Parser () {
  3238. this.yy = {};
  3239. }
  3240. Parser.prototype = parser;parser.Parser = Parser;
  3241. module.exports = new Parser;
  3242. });
  3243. ace.define("ace/mode/coffee/scope",["require","exports","module","ace/mode/coffee/helpers"], function(require, exports, module) {
  3244. var Scope, extend, last, _ref;
  3245. _ref = require('./helpers'), extend = _ref.extend, last = _ref.last;
  3246. exports.Scope = Scope = (function() {
  3247. Scope.root = null;
  3248. function Scope(parent, expressions, method) {
  3249. this.parent = parent;
  3250. this.expressions = expressions;
  3251. this.method = method;
  3252. this.variables = [
  3253. {
  3254. name: 'arguments',
  3255. type: 'arguments'
  3256. }
  3257. ];
  3258. this.positions = {};
  3259. if (!this.parent) {
  3260. Scope.root = this;
  3261. }
  3262. }
  3263. Scope.prototype.add = function(name, type, immediate) {
  3264. if (this.shared && !immediate) {
  3265. return this.parent.add(name, type, immediate);
  3266. }
  3267. if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
  3268. return this.variables[this.positions[name]].type = type;
  3269. } else {
  3270. return this.positions[name] = this.variables.push({
  3271. name: name,
  3272. type: type
  3273. }) - 1;
  3274. }
  3275. };
  3276. Scope.prototype.namedMethod = function() {
  3277. var _ref1;
  3278. if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) {
  3279. return this.method;
  3280. }
  3281. return this.parent.namedMethod();
  3282. };
  3283. Scope.prototype.find = function(name) {
  3284. if (this.check(name)) {
  3285. return true;
  3286. }
  3287. this.add(name, 'var');
  3288. return false;
  3289. };
  3290. Scope.prototype.parameter = function(name) {
  3291. if (this.shared && this.parent.check(name, true)) {
  3292. return;
  3293. }
  3294. return this.add(name, 'param');
  3295. };
  3296. Scope.prototype.check = function(name) {
  3297. var _ref1;
  3298. return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0));
  3299. };
  3300. Scope.prototype.temporary = function(name, index) {
  3301. if (name.length > 1) {
  3302. return '_' + name + (index > 1 ? index - 1 : '');
  3303. } else {
  3304. return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a');
  3305. }
  3306. };
  3307. Scope.prototype.type = function(name) {
  3308. var v, _i, _len, _ref1;
  3309. _ref1 = this.variables;
  3310. for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
  3311. v = _ref1[_i];
  3312. if (v.name === name) {
  3313. return v.type;
  3314. }
  3315. }
  3316. return null;
  3317. };
  3318. Scope.prototype.freeVariable = function(name, reserve) {
  3319. var index, temp;
  3320. if (reserve == null) {
  3321. reserve = true;
  3322. }
  3323. index = 0;
  3324. while (this.check((temp = this.temporary(name, index)))) {
  3325. index++;
  3326. }
  3327. if (reserve) {
  3328. this.add(temp, 'var', true);
  3329. }
  3330. return temp;
  3331. };
  3332. Scope.prototype.assign = function(name, value) {
  3333. this.add(name, {
  3334. value: value,
  3335. assigned: true
  3336. }, true);
  3337. return this.hasAssignments = true;
  3338. };
  3339. Scope.prototype.hasDeclarations = function() {
  3340. return !!this.declaredVariables().length;
  3341. };
  3342. Scope.prototype.declaredVariables = function() {
  3343. var realVars, tempVars, v, _i, _len, _ref1;
  3344. realVars = [];
  3345. tempVars = [];
  3346. _ref1 = this.variables;
  3347. for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
  3348. v = _ref1[_i];
  3349. if (v.type === 'var') {
  3350. (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name);
  3351. }
  3352. }
  3353. return realVars.sort().concat(tempVars.sort());
  3354. };
  3355. Scope.prototype.assignedVariables = function() {
  3356. var v, _i, _len, _ref1, _results;
  3357. _ref1 = this.variables;
  3358. _results = [];
  3359. for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
  3360. v = _ref1[_i];
  3361. if (v.type.assigned) {
  3362. _results.push("" + v.name + " = " + v.type.value);
  3363. }
  3364. }
  3365. return _results;
  3366. };
  3367. return Scope;
  3368. })();
  3369. });
  3370. ace.define("ace/mode/coffee/nodes",["require","exports","module","ace/mode/coffee/scope","ace/mode/coffee/lexer","ace/mode/coffee/helpers"], function(require, exports, module) {
  3371. var Access, Arr, Assign, Base, Block, Call, Class, Code, CodeFragment, Comment, Existence, Extends, For, HEXNUM, IDENTIFIER, IDENTIFIER_STR, IS_REGEX, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, NUMBER, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isLiteralArguments, isLiteralThis, last, locationDataToString, merge, multident, parseNum, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1,
  3372. __hasProp = {}.hasOwnProperty,
  3373. __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  3374. __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
  3375. __slice = [].slice;
  3376. Error.stackTraceLimit = Infinity;
  3377. Scope = require('./scope').Scope;
  3378. _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED;
  3379. _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError;
  3380. exports.extend = extend;
  3381. exports.addLocationDataFn = addLocationDataFn;
  3382. YES = function() {
  3383. return true;
  3384. };
  3385. NO = function() {
  3386. return false;
  3387. };
  3388. THIS = function() {
  3389. return this;
  3390. };
  3391. NEGATE = function() {
  3392. this.negated = !this.negated;
  3393. return this;
  3394. };
  3395. exports.CodeFragment = CodeFragment = (function() {
  3396. function CodeFragment(parent, code) {
  3397. var _ref2;
  3398. this.code = "" + code;
  3399. this.locationData = parent != null ? parent.locationData : void 0;
  3400. this.type = (parent != null ? (_ref2 = parent.constructor) != null ? _ref2.name : void 0 : void 0) || 'unknown';
  3401. }
  3402. CodeFragment.prototype.toString = function() {
  3403. return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : '');
  3404. };
  3405. return CodeFragment;
  3406. })();
  3407. fragmentsToText = function(fragments) {
  3408. var fragment;
  3409. return ((function() {
  3410. var _i, _len, _results;
  3411. _results = [];
  3412. for (_i = 0, _len = fragments.length; _i < _len; _i++) {
  3413. fragment = fragments[_i];
  3414. _results.push(fragment.code);
  3415. }
  3416. return _results;
  3417. })()).join('');
  3418. };
  3419. exports.Base = Base = (function() {
  3420. function Base() {}
  3421. Base.prototype.compile = function(o, lvl) {
  3422. return fragmentsToText(this.compileToFragments(o, lvl));
  3423. };
  3424. Base.prototype.compileToFragments = function(o, lvl) {
  3425. var node;
  3426. o = extend({}, o);
  3427. if (lvl) {
  3428. o.level = lvl;
  3429. }
  3430. node = this.unfoldSoak(o) || this;
  3431. node.tab = o.indent;
  3432. if (o.level === LEVEL_TOP || !node.isStatement(o)) {
  3433. return node.compileNode(o);
  3434. } else {
  3435. return node.compileClosure(o);
  3436. }
  3437. };
  3438. Base.prototype.compileClosure = function(o) {
  3439. var args, argumentsNode, func, jumpNode, meth;
  3440. if (jumpNode = this.jumps()) {
  3441. jumpNode.error('cannot use a pure statement in an expression');
  3442. }
  3443. o.sharedScope = true;
  3444. func = new Code([], Block.wrap([this]));
  3445. args = [];
  3446. if ((argumentsNode = this.contains(isLiteralArguments)) || this.contains(isLiteralThis)) {
  3447. args = [new Literal('this')];
  3448. if (argumentsNode) {
  3449. meth = 'apply';
  3450. args.push(new Literal('arguments'));
  3451. } else {
  3452. meth = 'call';
  3453. }
  3454. func = new Value(func, [new Access(new Literal(meth))]);
  3455. }
  3456. return (new Call(func, args)).compileNode(o);
  3457. };
  3458. Base.prototype.cache = function(o, level, reused) {
  3459. var ref, sub;
  3460. if (!this.isComplex()) {
  3461. ref = level ? this.compileToFragments(o, level) : this;
  3462. return [ref, ref];
  3463. } else {
  3464. ref = new Literal(reused || o.scope.freeVariable('ref'));
  3465. sub = new Assign(ref, this);
  3466. if (level) {
  3467. return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]];
  3468. } else {
  3469. return [sub, ref];
  3470. }
  3471. }
  3472. };
  3473. Base.prototype.cacheToCodeFragments = function(cacheValues) {
  3474. return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])];
  3475. };
  3476. Base.prototype.makeReturn = function(res) {
  3477. var me;
  3478. me = this.unwrapAll();
  3479. if (res) {
  3480. return new Call(new Literal("" + res + ".push"), [me]);
  3481. } else {
  3482. return new Return(me);
  3483. }
  3484. };
  3485. Base.prototype.contains = function(pred) {
  3486. var node;
  3487. node = void 0;
  3488. this.traverseChildren(false, function(n) {
  3489. if (pred(n)) {
  3490. node = n;
  3491. return false;
  3492. }
  3493. });
  3494. return node;
  3495. };
  3496. Base.prototype.lastNonComment = function(list) {
  3497. var i;
  3498. i = list.length;
  3499. while (i--) {
  3500. if (!(list[i] instanceof Comment)) {
  3501. return list[i];
  3502. }
  3503. }
  3504. return null;
  3505. };
  3506. Base.prototype.toString = function(idt, name) {
  3507. var tree;
  3508. if (idt == null) {
  3509. idt = '';
  3510. }
  3511. if (name == null) {
  3512. name = this.constructor.name;
  3513. }
  3514. tree = '\n' + idt + name;
  3515. if (this.soak) {
  3516. tree += '?';
  3517. }
  3518. this.eachChild(function(node) {
  3519. return tree += node.toString(idt + TAB);
  3520. });
  3521. return tree;
  3522. };
  3523. Base.prototype.eachChild = function(func) {
  3524. var attr, child, _i, _j, _len, _len1, _ref2, _ref3;
  3525. if (!this.children) {
  3526. return this;
  3527. }
  3528. _ref2 = this.children;
  3529. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  3530. attr = _ref2[_i];
  3531. if (this[attr]) {
  3532. _ref3 = flatten([this[attr]]);
  3533. for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
  3534. child = _ref3[_j];
  3535. if (func(child) === false) {
  3536. return this;
  3537. }
  3538. }
  3539. }
  3540. }
  3541. return this;
  3542. };
  3543. Base.prototype.traverseChildren = function(crossScope, func) {
  3544. return this.eachChild(function(child) {
  3545. var recur;
  3546. recur = func(child);
  3547. if (recur !== false) {
  3548. return child.traverseChildren(crossScope, func);
  3549. }
  3550. });
  3551. };
  3552. Base.prototype.invert = function() {
  3553. return new Op('!', this);
  3554. };
  3555. Base.prototype.unwrapAll = function() {
  3556. var node;
  3557. node = this;
  3558. while (node !== (node = node.unwrap())) {
  3559. continue;
  3560. }
  3561. return node;
  3562. };
  3563. Base.prototype.children = [];
  3564. Base.prototype.isStatement = NO;
  3565. Base.prototype.jumps = NO;
  3566. Base.prototype.isComplex = YES;
  3567. Base.prototype.isChainable = NO;
  3568. Base.prototype.isAssignable = NO;
  3569. Base.prototype.unwrap = THIS;
  3570. Base.prototype.unfoldSoak = NO;
  3571. Base.prototype.assigns = NO;
  3572. Base.prototype.updateLocationDataIfMissing = function(locationData) {
  3573. if (this.locationData) {
  3574. return this;
  3575. }
  3576. this.locationData = locationData;
  3577. return this.eachChild(function(child) {
  3578. return child.updateLocationDataIfMissing(locationData);
  3579. });
  3580. };
  3581. Base.prototype.error = function(message) {
  3582. return throwSyntaxError(message, this.locationData);
  3583. };
  3584. Base.prototype.makeCode = function(code) {
  3585. return new CodeFragment(this, code);
  3586. };
  3587. Base.prototype.wrapInBraces = function(fragments) {
  3588. return [].concat(this.makeCode('('), fragments, this.makeCode(')'));
  3589. };
  3590. Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) {
  3591. var answer, fragments, i, _i, _len;
  3592. answer = [];
  3593. for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) {
  3594. fragments = fragmentsList[i];
  3595. if (i) {
  3596. answer.push(this.makeCode(joinStr));
  3597. }
  3598. answer = answer.concat(fragments);
  3599. }
  3600. return answer;
  3601. };
  3602. return Base;
  3603. })();
  3604. exports.Block = Block = (function(_super) {
  3605. __extends(Block, _super);
  3606. function Block(nodes) {
  3607. this.expressions = compact(flatten(nodes || []));
  3608. }
  3609. Block.prototype.children = ['expressions'];
  3610. Block.prototype.push = function(node) {
  3611. this.expressions.push(node);
  3612. return this;
  3613. };
  3614. Block.prototype.pop = function() {
  3615. return this.expressions.pop();
  3616. };
  3617. Block.prototype.unshift = function(node) {
  3618. this.expressions.unshift(node);
  3619. return this;
  3620. };
  3621. Block.prototype.unwrap = function() {
  3622. if (this.expressions.length === 1) {
  3623. return this.expressions[0];
  3624. } else {
  3625. return this;
  3626. }
  3627. };
  3628. Block.prototype.isEmpty = function() {
  3629. return !this.expressions.length;
  3630. };
  3631. Block.prototype.isStatement = function(o) {
  3632. var exp, _i, _len, _ref2;
  3633. _ref2 = this.expressions;
  3634. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  3635. exp = _ref2[_i];
  3636. if (exp.isStatement(o)) {
  3637. return true;
  3638. }
  3639. }
  3640. return false;
  3641. };
  3642. Block.prototype.jumps = function(o) {
  3643. var exp, jumpNode, _i, _len, _ref2;
  3644. _ref2 = this.expressions;
  3645. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  3646. exp = _ref2[_i];
  3647. if (jumpNode = exp.jumps(o)) {
  3648. return jumpNode;
  3649. }
  3650. }
  3651. };
  3652. Block.prototype.makeReturn = function(res) {
  3653. var expr, len;
  3654. len = this.expressions.length;
  3655. while (len--) {
  3656. expr = this.expressions[len];
  3657. if (!(expr instanceof Comment)) {
  3658. this.expressions[len] = expr.makeReturn(res);
  3659. if (expr instanceof Return && !expr.expression) {
  3660. this.expressions.splice(len, 1);
  3661. }
  3662. break;
  3663. }
  3664. }
  3665. return this;
  3666. };
  3667. Block.prototype.compileToFragments = function(o, level) {
  3668. if (o == null) {
  3669. o = {};
  3670. }
  3671. if (o.scope) {
  3672. return Block.__super__.compileToFragments.call(this, o, level);
  3673. } else {
  3674. return this.compileRoot(o);
  3675. }
  3676. };
  3677. Block.prototype.compileNode = function(o) {
  3678. var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2;
  3679. this.tab = o.indent;
  3680. top = o.level === LEVEL_TOP;
  3681. compiledNodes = [];
  3682. _ref2 = this.expressions;
  3683. for (index = _i = 0, _len = _ref2.length; _i < _len; index = ++_i) {
  3684. node = _ref2[index];
  3685. node = node.unwrapAll();
  3686. node = node.unfoldSoak(o) || node;
  3687. if (node instanceof Block) {
  3688. compiledNodes.push(node.compileNode(o));
  3689. } else if (top) {
  3690. node.front = true;
  3691. fragments = node.compileToFragments(o);
  3692. if (!node.isStatement(o)) {
  3693. fragments.unshift(this.makeCode("" + this.tab));
  3694. fragments.push(this.makeCode(";"));
  3695. }
  3696. compiledNodes.push(fragments);
  3697. } else {
  3698. compiledNodes.push(node.compileToFragments(o, LEVEL_LIST));
  3699. }
  3700. }
  3701. if (top) {
  3702. if (this.spaced) {
  3703. return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n"));
  3704. } else {
  3705. return this.joinFragmentArrays(compiledNodes, '\n');
  3706. }
  3707. }
  3708. if (compiledNodes.length) {
  3709. answer = this.joinFragmentArrays(compiledNodes, ', ');
  3710. } else {
  3711. answer = [this.makeCode("void 0")];
  3712. }
  3713. if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) {
  3714. return this.wrapInBraces(answer);
  3715. } else {
  3716. return answer;
  3717. }
  3718. };
  3719. Block.prototype.compileRoot = function(o) {
  3720. var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2;
  3721. o.indent = o.bare ? '' : TAB;
  3722. o.level = LEVEL_TOP;
  3723. this.spaced = true;
  3724. o.scope = new Scope(null, this, null);
  3725. _ref2 = o.locals || [];
  3726. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  3727. name = _ref2[_i];
  3728. o.scope.parameter(name);
  3729. }
  3730. prelude = [];
  3731. if (!o.bare) {
  3732. preludeExps = (function() {
  3733. var _j, _len1, _ref3, _results;
  3734. _ref3 = this.expressions;
  3735. _results = [];
  3736. for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) {
  3737. exp = _ref3[i];
  3738. if (!(exp.unwrap() instanceof Comment)) {
  3739. break;
  3740. }
  3741. _results.push(exp);
  3742. }
  3743. return _results;
  3744. }).call(this);
  3745. rest = this.expressions.slice(preludeExps.length);
  3746. this.expressions = preludeExps;
  3747. if (preludeExps.length) {
  3748. prelude = this.compileNode(merge(o, {
  3749. indent: ''
  3750. }));
  3751. prelude.push(this.makeCode("\n"));
  3752. }
  3753. this.expressions = rest;
  3754. }
  3755. fragments = this.compileWithDeclarations(o);
  3756. if (o.bare) {
  3757. return fragments;
  3758. }
  3759. return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n"));
  3760. };
  3761. Block.prototype.compileWithDeclarations = function(o) {
  3762. var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4;
  3763. fragments = [];
  3764. post = [];
  3765. _ref2 = this.expressions;
  3766. for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
  3767. exp = _ref2[i];
  3768. exp = exp.unwrap();
  3769. if (!(exp instanceof Comment || exp instanceof Literal)) {
  3770. break;
  3771. }
  3772. }
  3773. o = merge(o, {
  3774. level: LEVEL_TOP
  3775. });
  3776. if (i) {
  3777. rest = this.expressions.splice(i, 9e9);
  3778. _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1];
  3779. _ref4 = [this.compileNode(o), spaced], fragments = _ref4[0], this.spaced = _ref4[1];
  3780. this.expressions = rest;
  3781. }
  3782. post = this.compileNode(o);
  3783. scope = o.scope;
  3784. if (scope.expressions === this) {
  3785. declars = o.scope.hasDeclarations();
  3786. assigns = scope.hasAssignments;
  3787. if (declars || assigns) {
  3788. if (i) {
  3789. fragments.push(this.makeCode('\n'));
  3790. }
  3791. fragments.push(this.makeCode("" + this.tab + "var "));
  3792. if (declars) {
  3793. fragments.push(this.makeCode(scope.declaredVariables().join(', ')));
  3794. }
  3795. if (assigns) {
  3796. if (declars) {
  3797. fragments.push(this.makeCode(",\n" + (this.tab + TAB)));
  3798. }
  3799. fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB))));
  3800. }
  3801. fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : '')));
  3802. } else if (fragments.length && post.length) {
  3803. fragments.push(this.makeCode("\n"));
  3804. }
  3805. }
  3806. return fragments.concat(post);
  3807. };
  3808. Block.wrap = function(nodes) {
  3809. if (nodes.length === 1 && nodes[0] instanceof Block) {
  3810. return nodes[0];
  3811. }
  3812. return new Block(nodes);
  3813. };
  3814. return Block;
  3815. })(Base);
  3816. exports.Literal = Literal = (function(_super) {
  3817. __extends(Literal, _super);
  3818. function Literal(value) {
  3819. this.value = value;
  3820. }
  3821. Literal.prototype.makeReturn = function() {
  3822. if (this.isStatement()) {
  3823. return this;
  3824. } else {
  3825. return Literal.__super__.makeReturn.apply(this, arguments);
  3826. }
  3827. };
  3828. Literal.prototype.isAssignable = function() {
  3829. return IDENTIFIER.test(this.value);
  3830. };
  3831. Literal.prototype.isStatement = function() {
  3832. var _ref2;
  3833. return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger';
  3834. };
  3835. Literal.prototype.isComplex = NO;
  3836. Literal.prototype.assigns = function(name) {
  3837. return name === this.value;
  3838. };
  3839. Literal.prototype.jumps = function(o) {
  3840. if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) {
  3841. return this;
  3842. }
  3843. if (this.value === 'continue' && !(o != null ? o.loop : void 0)) {
  3844. return this;
  3845. }
  3846. };
  3847. Literal.prototype.compileNode = function(o) {
  3848. var answer, code, _ref2;
  3849. code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value;
  3850. answer = this.isStatement() ? "" + this.tab + code + ";" : code;
  3851. return [this.makeCode(answer)];
  3852. };
  3853. Literal.prototype.toString = function() {
  3854. return ' "' + this.value + '"';
  3855. };
  3856. return Literal;
  3857. })(Base);
  3858. exports.Undefined = (function(_super) {
  3859. __extends(Undefined, _super);
  3860. function Undefined() {
  3861. return Undefined.__super__.constructor.apply(this, arguments);
  3862. }
  3863. Undefined.prototype.isAssignable = NO;
  3864. Undefined.prototype.isComplex = NO;
  3865. Undefined.prototype.compileNode = function(o) {
  3866. return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')];
  3867. };
  3868. return Undefined;
  3869. })(Base);
  3870. exports.Null = (function(_super) {
  3871. __extends(Null, _super);
  3872. function Null() {
  3873. return Null.__super__.constructor.apply(this, arguments);
  3874. }
  3875. Null.prototype.isAssignable = NO;
  3876. Null.prototype.isComplex = NO;
  3877. Null.prototype.compileNode = function() {
  3878. return [this.makeCode("null")];
  3879. };
  3880. return Null;
  3881. })(Base);
  3882. exports.Bool = (function(_super) {
  3883. __extends(Bool, _super);
  3884. Bool.prototype.isAssignable = NO;
  3885. Bool.prototype.isComplex = NO;
  3886. Bool.prototype.compileNode = function() {
  3887. return [this.makeCode(this.val)];
  3888. };
  3889. function Bool(val) {
  3890. this.val = val;
  3891. }
  3892. return Bool;
  3893. })(Base);
  3894. exports.Return = Return = (function(_super) {
  3895. __extends(Return, _super);
  3896. function Return(expr) {
  3897. if (expr && !expr.unwrap().isUndefined) {
  3898. this.expression = expr;
  3899. }
  3900. }
  3901. Return.prototype.children = ['expression'];
  3902. Return.prototype.isStatement = YES;
  3903. Return.prototype.makeReturn = THIS;
  3904. Return.prototype.jumps = THIS;
  3905. Return.prototype.compileToFragments = function(o, level) {
  3906. var expr, _ref2;
  3907. expr = (_ref2 = this.expression) != null ? _ref2.makeReturn() : void 0;
  3908. if (expr && !(expr instanceof Return)) {
  3909. return expr.compileToFragments(o, level);
  3910. } else {
  3911. return Return.__super__.compileToFragments.call(this, o, level);
  3912. }
  3913. };
  3914. Return.prototype.compileNode = function(o) {
  3915. var answer;
  3916. answer = [];
  3917. answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : ""))));
  3918. if (this.expression) {
  3919. answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN));
  3920. }
  3921. answer.push(this.makeCode(";"));
  3922. return answer;
  3923. };
  3924. return Return;
  3925. })(Base);
  3926. exports.Value = Value = (function(_super) {
  3927. __extends(Value, _super);
  3928. function Value(base, props, tag) {
  3929. if (!props && base instanceof Value) {
  3930. return base;
  3931. }
  3932. this.base = base;
  3933. this.properties = props || [];
  3934. if (tag) {
  3935. this[tag] = true;
  3936. }
  3937. return this;
  3938. }
  3939. Value.prototype.children = ['base', 'properties'];
  3940. Value.prototype.add = function(props) {
  3941. this.properties = this.properties.concat(props);
  3942. return this;
  3943. };
  3944. Value.prototype.hasProperties = function() {
  3945. return !!this.properties.length;
  3946. };
  3947. Value.prototype.bareLiteral = function(type) {
  3948. return !this.properties.length && this.base instanceof type;
  3949. };
  3950. Value.prototype.isArray = function() {
  3951. return this.bareLiteral(Arr);
  3952. };
  3953. Value.prototype.isRange = function() {
  3954. return this.bareLiteral(Range);
  3955. };
  3956. Value.prototype.isComplex = function() {
  3957. return this.hasProperties() || this.base.isComplex();
  3958. };
  3959. Value.prototype.isAssignable = function() {
  3960. return this.hasProperties() || this.base.isAssignable();
  3961. };
  3962. Value.prototype.isSimpleNumber = function() {
  3963. return this.bareLiteral(Literal) && SIMPLENUM.test(this.base.value);
  3964. };
  3965. Value.prototype.isString = function() {
  3966. return this.bareLiteral(Literal) && IS_STRING.test(this.base.value);
  3967. };
  3968. Value.prototype.isRegex = function() {
  3969. return this.bareLiteral(Literal) && IS_REGEX.test(this.base.value);
  3970. };
  3971. Value.prototype.isAtomic = function() {
  3972. var node, _i, _len, _ref2;
  3973. _ref2 = this.properties.concat(this.base);
  3974. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  3975. node = _ref2[_i];
  3976. if (node.soak || node instanceof Call) {
  3977. return false;
  3978. }
  3979. }
  3980. return true;
  3981. };
  3982. Value.prototype.isNotCallable = function() {
  3983. return this.isSimpleNumber() || this.isString() || this.isRegex() || this.isArray() || this.isRange() || this.isSplice() || this.isObject();
  3984. };
  3985. Value.prototype.isStatement = function(o) {
  3986. return !this.properties.length && this.base.isStatement(o);
  3987. };
  3988. Value.prototype.assigns = function(name) {
  3989. return !this.properties.length && this.base.assigns(name);
  3990. };
  3991. Value.prototype.jumps = function(o) {
  3992. return !this.properties.length && this.base.jumps(o);
  3993. };
  3994. Value.prototype.isObject = function(onlyGenerated) {
  3995. if (this.properties.length) {
  3996. return false;
  3997. }
  3998. return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated);
  3999. };
  4000. Value.prototype.isSplice = function() {
  4001. return last(this.properties) instanceof Slice;
  4002. };
  4003. Value.prototype.looksStatic = function(className) {
  4004. var _ref2;
  4005. return this.base.value === className && this.properties.length && ((_ref2 = this.properties[0].name) != null ? _ref2.value : void 0) !== 'prototype';
  4006. };
  4007. Value.prototype.unwrap = function() {
  4008. if (this.properties.length) {
  4009. return this;
  4010. } else {
  4011. return this.base;
  4012. }
  4013. };
  4014. Value.prototype.cacheReference = function(o) {
  4015. var base, bref, name, nref;
  4016. name = last(this.properties);
  4017. if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) {
  4018. return [this, this];
  4019. }
  4020. base = new Value(this.base, this.properties.slice(0, -1));
  4021. if (base.isComplex()) {
  4022. bref = new Literal(o.scope.freeVariable('base'));
  4023. base = new Value(new Parens(new Assign(bref, base)));
  4024. }
  4025. if (!name) {
  4026. return [base, bref];
  4027. }
  4028. if (name.isComplex()) {
  4029. nref = new Literal(o.scope.freeVariable('name'));
  4030. name = new Index(new Assign(nref, name.index));
  4031. nref = new Index(nref);
  4032. }
  4033. return [base.add(name), new Value(bref || base.base, [nref || name])];
  4034. };
  4035. Value.prototype.compileNode = function(o) {
  4036. var fragments, prop, props, _i, _len;
  4037. this.base.front = this.front;
  4038. props = this.properties;
  4039. fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null));
  4040. if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(fragmentsToText(fragments))) {
  4041. fragments.push(this.makeCode('.'));
  4042. }
  4043. for (_i = 0, _len = props.length; _i < _len; _i++) {
  4044. prop = props[_i];
  4045. fragments.push.apply(fragments, prop.compileToFragments(o));
  4046. }
  4047. return fragments;
  4048. };
  4049. Value.prototype.unfoldSoak = function(o) {
  4050. return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function(_this) {
  4051. return function() {
  4052. var fst, i, ifn, prop, ref, snd, _i, _len, _ref2, _ref3;
  4053. if (ifn = _this.base.unfoldSoak(o)) {
  4054. (_ref2 = ifn.body.properties).push.apply(_ref2, _this.properties);
  4055. return ifn;
  4056. }
  4057. _ref3 = _this.properties;
  4058. for (i = _i = 0, _len = _ref3.length; _i < _len; i = ++_i) {
  4059. prop = _ref3[i];
  4060. if (!prop.soak) {
  4061. continue;
  4062. }
  4063. prop.soak = false;
  4064. fst = new Value(_this.base, _this.properties.slice(0, i));
  4065. snd = new Value(_this.base, _this.properties.slice(i));
  4066. if (fst.isComplex()) {
  4067. ref = new Literal(o.scope.freeVariable('ref'));
  4068. fst = new Parens(new Assign(ref, fst));
  4069. snd.base = ref;
  4070. }
  4071. return new If(new Existence(fst), snd, {
  4072. soak: true
  4073. });
  4074. }
  4075. return false;
  4076. };
  4077. })(this)();
  4078. };
  4079. return Value;
  4080. })(Base);
  4081. exports.Comment = Comment = (function(_super) {
  4082. __extends(Comment, _super);
  4083. function Comment(comment) {
  4084. this.comment = comment;
  4085. }
  4086. Comment.prototype.isStatement = YES;
  4087. Comment.prototype.makeReturn = THIS;
  4088. Comment.prototype.compileNode = function(o, level) {
  4089. var code, comment;
  4090. comment = this.comment.replace(/^(\s*)#/gm, "$1 *");
  4091. code = "/*" + (multident(comment, this.tab)) + (__indexOf.call(comment, '\n') >= 0 ? "\n" + this.tab : '') + " */";
  4092. if ((level || o.level) === LEVEL_TOP) {
  4093. code = o.indent + code;
  4094. }
  4095. return [this.makeCode("\n"), this.makeCode(code)];
  4096. };
  4097. return Comment;
  4098. })(Base);
  4099. exports.Call = Call = (function(_super) {
  4100. __extends(Call, _super);
  4101. function Call(variable, args, soak) {
  4102. this.args = args != null ? args : [];
  4103. this.soak = soak;
  4104. this.isNew = false;
  4105. this.isSuper = variable === 'super';
  4106. this.variable = this.isSuper ? null : variable;
  4107. if (variable instanceof Value && variable.isNotCallable()) {
  4108. variable.error("literal is not a function");
  4109. }
  4110. }
  4111. Call.prototype.children = ['variable', 'args'];
  4112. Call.prototype.newInstance = function() {
  4113. var base, _ref2;
  4114. base = ((_ref2 = this.variable) != null ? _ref2.base : void 0) || this.variable;
  4115. if (base instanceof Call && !base.isNew) {
  4116. base.newInstance();
  4117. } else {
  4118. this.isNew = true;
  4119. }
  4120. return this;
  4121. };
  4122. Call.prototype.superReference = function(o) {
  4123. var accesses, method;
  4124. method = o.scope.namedMethod();
  4125. if (method != null ? method.klass : void 0) {
  4126. accesses = [new Access(new Literal('__super__'))];
  4127. if (method["static"]) {
  4128. accesses.push(new Access(new Literal('constructor')));
  4129. }
  4130. accesses.push(new Access(new Literal(method.name)));
  4131. return (new Value(new Literal(method.klass), accesses)).compile(o);
  4132. } else if (method != null ? method.ctor : void 0) {
  4133. return "" + method.name + ".__super__.constructor";
  4134. } else {
  4135. return this.error('cannot call super outside of an instance method.');
  4136. }
  4137. };
  4138. Call.prototype.superThis = function(o) {
  4139. var method;
  4140. method = o.scope.method;
  4141. return (method && !method.klass && method.context) || "this";
  4142. };
  4143. Call.prototype.unfoldSoak = function(o) {
  4144. var call, ifn, left, list, rite, _i, _len, _ref2, _ref3;
  4145. if (this.soak) {
  4146. if (this.variable) {
  4147. if (ifn = unfoldSoak(o, this, 'variable')) {
  4148. return ifn;
  4149. }
  4150. _ref2 = new Value(this.variable).cacheReference(o), left = _ref2[0], rite = _ref2[1];
  4151. } else {
  4152. left = new Literal(this.superReference(o));
  4153. rite = new Value(left);
  4154. }
  4155. rite = new Call(rite, this.args);
  4156. rite.isNew = this.isNew;
  4157. left = new Literal("typeof " + (left.compile(o)) + " === \"function\"");
  4158. return new If(left, new Value(rite), {
  4159. soak: true
  4160. });
  4161. }
  4162. call = this;
  4163. list = [];
  4164. while (true) {
  4165. if (call.variable instanceof Call) {
  4166. list.push(call);
  4167. call = call.variable;
  4168. continue;
  4169. }
  4170. if (!(call.variable instanceof Value)) {
  4171. break;
  4172. }
  4173. list.push(call);
  4174. if (!((call = call.variable.base) instanceof Call)) {
  4175. break;
  4176. }
  4177. }
  4178. _ref3 = list.reverse();
  4179. for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
  4180. call = _ref3[_i];
  4181. if (ifn) {
  4182. if (call.variable instanceof Call) {
  4183. call.variable = ifn;
  4184. } else {
  4185. call.variable.base = ifn;
  4186. }
  4187. }
  4188. ifn = unfoldSoak(o, call, 'variable');
  4189. }
  4190. return ifn;
  4191. };
  4192. Call.prototype.compileNode = function(o) {
  4193. var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref2, _ref3;
  4194. if ((_ref2 = this.variable) != null) {
  4195. _ref2.front = this.front;
  4196. }
  4197. compiledArray = Splat.compileSplattedArray(o, this.args, true);
  4198. if (compiledArray.length) {
  4199. return this.compileSplat(o, compiledArray);
  4200. }
  4201. compiledArgs = [];
  4202. _ref3 = this.args;
  4203. for (argIndex = _i = 0, _len = _ref3.length; _i < _len; argIndex = ++_i) {
  4204. arg = _ref3[argIndex];
  4205. if (argIndex) {
  4206. compiledArgs.push(this.makeCode(", "));
  4207. }
  4208. compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST));
  4209. }
  4210. fragments = [];
  4211. if (this.isSuper) {
  4212. preface = this.superReference(o) + (".call(" + (this.superThis(o)));
  4213. if (compiledArgs.length) {
  4214. preface += ", ";
  4215. }
  4216. fragments.push(this.makeCode(preface));
  4217. } else {
  4218. if (this.isNew) {
  4219. fragments.push(this.makeCode('new '));
  4220. }
  4221. fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS));
  4222. fragments.push(this.makeCode("("));
  4223. }
  4224. fragments.push.apply(fragments, compiledArgs);
  4225. fragments.push(this.makeCode(")"));
  4226. return fragments;
  4227. };
  4228. Call.prototype.compileSplat = function(o, splatArgs) {
  4229. var answer, base, fun, idt, name, ref;
  4230. if (this.isSuper) {
  4231. return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")"));
  4232. }
  4233. if (this.isNew) {
  4234. idt = this.tab + TAB;
  4235. return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})"));
  4236. }
  4237. answer = [];
  4238. base = new Value(this.variable);
  4239. if ((name = base.properties.pop()) && base.isComplex()) {
  4240. ref = o.scope.freeVariable('ref');
  4241. answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o));
  4242. } else {
  4243. fun = base.compileToFragments(o, LEVEL_ACCESS);
  4244. if (SIMPLENUM.test(fragmentsToText(fun))) {
  4245. fun = this.wrapInBraces(fun);
  4246. }
  4247. if (name) {
  4248. ref = fragmentsToText(fun);
  4249. fun.push.apply(fun, name.compileToFragments(o));
  4250. } else {
  4251. ref = 'null';
  4252. }
  4253. answer = answer.concat(fun);
  4254. }
  4255. return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")"));
  4256. };
  4257. return Call;
  4258. })(Base);
  4259. exports.Extends = Extends = (function(_super) {
  4260. __extends(Extends, _super);
  4261. function Extends(child, parent) {
  4262. this.child = child;
  4263. this.parent = parent;
  4264. }
  4265. Extends.prototype.children = ['child', 'parent'];
  4266. Extends.prototype.compileToFragments = function(o) {
  4267. return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compileToFragments(o);
  4268. };
  4269. return Extends;
  4270. })(Base);
  4271. exports.Access = Access = (function(_super) {
  4272. __extends(Access, _super);
  4273. function Access(name, tag) {
  4274. this.name = name;
  4275. this.name.asKey = true;
  4276. this.soak = tag === 'soak';
  4277. }
  4278. Access.prototype.children = ['name'];
  4279. Access.prototype.compileToFragments = function(o) {
  4280. var name;
  4281. name = this.name.compileToFragments(o);
  4282. if (IDENTIFIER.test(fragmentsToText(name))) {
  4283. name.unshift(this.makeCode("."));
  4284. } else {
  4285. name.unshift(this.makeCode("["));
  4286. name.push(this.makeCode("]"));
  4287. }
  4288. return name;
  4289. };
  4290. Access.prototype.isComplex = NO;
  4291. return Access;
  4292. })(Base);
  4293. exports.Index = Index = (function(_super) {
  4294. __extends(Index, _super);
  4295. function Index(index) {
  4296. this.index = index;
  4297. }
  4298. Index.prototype.children = ['index'];
  4299. Index.prototype.compileToFragments = function(o) {
  4300. return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]"));
  4301. };
  4302. Index.prototype.isComplex = function() {
  4303. return this.index.isComplex();
  4304. };
  4305. return Index;
  4306. })(Base);
  4307. exports.Range = Range = (function(_super) {
  4308. __extends(Range, _super);
  4309. Range.prototype.children = ['from', 'to'];
  4310. function Range(from, to, tag) {
  4311. this.from = from;
  4312. this.to = to;
  4313. this.exclusive = tag === 'exclusive';
  4314. this.equals = this.exclusive ? '' : '=';
  4315. }
  4316. Range.prototype.compileVariables = function(o) {
  4317. var step, _ref2, _ref3, _ref4, _ref5;
  4318. o = merge(o, {
  4319. top: true
  4320. });
  4321. _ref2 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref2[0], this.fromVar = _ref2[1];
  4322. _ref3 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref3[0], this.toVar = _ref3[1];
  4323. if (step = del(o, 'step')) {
  4324. _ref4 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref4[0], this.stepVar = _ref4[1];
  4325. }
  4326. _ref5 = [this.fromVar.match(NUMBER), this.toVar.match(NUMBER)], this.fromNum = _ref5[0], this.toNum = _ref5[1];
  4327. if (this.stepVar) {
  4328. return this.stepNum = this.stepVar.match(NUMBER);
  4329. }
  4330. };
  4331. Range.prototype.compileNode = function(o) {
  4332. var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref2, _ref3;
  4333. if (!this.fromVar) {
  4334. this.compileVariables(o);
  4335. }
  4336. if (!o.index) {
  4337. return this.compileArray(o);
  4338. }
  4339. known = this.fromNum && this.toNum;
  4340. idx = del(o, 'index');
  4341. idxName = del(o, 'name');
  4342. namedIndex = idxName && idxName !== idx;
  4343. varPart = "" + idx + " = " + this.fromC;
  4344. if (this.toC !== this.toVar) {
  4345. varPart += ", " + this.toC;
  4346. }
  4347. if (this.step !== this.stepVar) {
  4348. varPart += ", " + this.step;
  4349. }
  4350. _ref2 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref2[0], gt = _ref2[1];
  4351. condPart = this.stepNum ? parseNum(this.stepNum[0]) > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [parseNum(this.fromNum[0]), parseNum(this.toNum[0])], from = _ref3[0], to = _ref3[1], _ref3), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar);
  4352. stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--";
  4353. if (namedIndex) {
  4354. varPart = "" + idxName + " = " + varPart;
  4355. }
  4356. if (namedIndex) {
  4357. stepPart = "" + idxName + " = " + stepPart;
  4358. }
  4359. return [this.makeCode("" + varPart + "; " + condPart + "; " + stepPart)];
  4360. };
  4361. Range.prototype.compileArray = function(o) {
  4362. var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results;
  4363. if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) {
  4364. range = (function() {
  4365. _results = [];
  4366. for (var _i = _ref2 = +this.fromNum, _ref3 = +this.toNum; _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); }
  4367. return _results;
  4368. }).apply(this);
  4369. if (this.exclusive) {
  4370. range.pop();
  4371. }
  4372. return [this.makeCode("[" + (range.join(', ')) + "]")];
  4373. }
  4374. idt = this.tab + TAB;
  4375. i = o.scope.freeVariable('i');
  4376. result = o.scope.freeVariable('results');
  4377. pre = "\n" + idt + result + " = [];";
  4378. if (this.fromNum && this.toNum) {
  4379. o.index = i;
  4380. body = fragmentsToText(this.compileNode(o));
  4381. } else {
  4382. vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : '');
  4383. cond = "" + this.fromVar + " <= " + this.toVar;
  4384. body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--";
  4385. }
  4386. post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent;
  4387. hasArgs = function(node) {
  4388. return node != null ? node.contains(isLiteralArguments) : void 0;
  4389. };
  4390. if (hasArgs(this.from) || hasArgs(this.to)) {
  4391. args = ', arguments';
  4392. }
  4393. return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")];
  4394. };
  4395. return Range;
  4396. })(Base);
  4397. exports.Slice = Slice = (function(_super) {
  4398. __extends(Slice, _super);
  4399. Slice.prototype.children = ['range'];
  4400. function Slice(range) {
  4401. this.range = range;
  4402. Slice.__super__.constructor.call(this);
  4403. }
  4404. Slice.prototype.compileNode = function(o) {
  4405. var compiled, compiledText, from, fromCompiled, to, toStr, _ref2;
  4406. _ref2 = this.range, to = _ref2.to, from = _ref2.from;
  4407. fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')];
  4408. if (to) {
  4409. compiled = to.compileToFragments(o, LEVEL_PAREN);
  4410. compiledText = fragmentsToText(compiled);
  4411. if (!(!this.range.exclusive && +compiledText === -1)) {
  4412. toStr = ', ' + (this.range.exclusive ? compiledText : SIMPLENUM.test(compiledText) ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9"));
  4413. }
  4414. }
  4415. return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")];
  4416. };
  4417. return Slice;
  4418. })(Base);
  4419. exports.Obj = Obj = (function(_super) {
  4420. __extends(Obj, _super);
  4421. function Obj(props, generated) {
  4422. this.generated = generated != null ? generated : false;
  4423. this.objects = this.properties = props || [];
  4424. }
  4425. Obj.prototype.children = ['properties'];
  4426. Obj.prototype.compileNode = function(o) {
  4427. var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1;
  4428. props = this.properties;
  4429. if (!props.length) {
  4430. return [this.makeCode(this.front ? '({})' : '{}')];
  4431. }
  4432. if (this.generated) {
  4433. for (_i = 0, _len = props.length; _i < _len; _i++) {
  4434. node = props[_i];
  4435. if (node instanceof Value) {
  4436. node.error('cannot have an implicit value in an implicit object');
  4437. }
  4438. }
  4439. }
  4440. idt = o.indent += TAB;
  4441. lastNoncom = this.lastNonComment(this.properties);
  4442. answer = [];
  4443. for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) {
  4444. prop = props[i];
  4445. join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n';
  4446. indent = prop instanceof Comment ? '' : idt;
  4447. if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) {
  4448. prop.variable.error('Invalid object key');
  4449. }
  4450. if (prop instanceof Value && prop["this"]) {
  4451. prop = new Assign(prop.properties[0].name, prop, 'object');
  4452. }
  4453. if (!(prop instanceof Comment)) {
  4454. if (!(prop instanceof Assign)) {
  4455. prop = new Assign(prop, prop, 'object');
  4456. }
  4457. (prop.variable.base || prop.variable).asKey = true;
  4458. }
  4459. if (indent) {
  4460. answer.push(this.makeCode(indent));
  4461. }
  4462. answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP));
  4463. if (join) {
  4464. answer.push(this.makeCode(join));
  4465. }
  4466. }
  4467. answer.unshift(this.makeCode("{" + (props.length && '\n')));
  4468. answer.push(this.makeCode("" + (props.length && '\n' + this.tab) + "}"));
  4469. if (this.front) {
  4470. return this.wrapInBraces(answer);
  4471. } else {
  4472. return answer;
  4473. }
  4474. };
  4475. Obj.prototype.assigns = function(name) {
  4476. var prop, _i, _len, _ref2;
  4477. _ref2 = this.properties;
  4478. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  4479. prop = _ref2[_i];
  4480. if (prop.assigns(name)) {
  4481. return true;
  4482. }
  4483. }
  4484. return false;
  4485. };
  4486. return Obj;
  4487. })(Base);
  4488. exports.Arr = Arr = (function(_super) {
  4489. __extends(Arr, _super);
  4490. function Arr(objs) {
  4491. this.objects = objs || [];
  4492. }
  4493. Arr.prototype.children = ['objects'];
  4494. Arr.prototype.compileNode = function(o) {
  4495. var answer, compiledObjs, fragments, index, obj, _i, _len;
  4496. if (!this.objects.length) {
  4497. return [this.makeCode('[]')];
  4498. }
  4499. o.indent += TAB;
  4500. answer = Splat.compileSplattedArray(o, this.objects);
  4501. if (answer.length) {
  4502. return answer;
  4503. }
  4504. answer = [];
  4505. compiledObjs = (function() {
  4506. var _i, _len, _ref2, _results;
  4507. _ref2 = this.objects;
  4508. _results = [];
  4509. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  4510. obj = _ref2[_i];
  4511. _results.push(obj.compileToFragments(o, LEVEL_LIST));
  4512. }
  4513. return _results;
  4514. }).call(this);
  4515. for (index = _i = 0, _len = compiledObjs.length; _i < _len; index = ++_i) {
  4516. fragments = compiledObjs[index];
  4517. if (index) {
  4518. answer.push(this.makeCode(", "));
  4519. }
  4520. answer.push.apply(answer, fragments);
  4521. }
  4522. if (fragmentsToText(answer).indexOf('\n') >= 0) {
  4523. answer.unshift(this.makeCode("[\n" + o.indent));
  4524. answer.push(this.makeCode("\n" + this.tab + "]"));
  4525. } else {
  4526. answer.unshift(this.makeCode("["));
  4527. answer.push(this.makeCode("]"));
  4528. }
  4529. return answer;
  4530. };
  4531. Arr.prototype.assigns = function(name) {
  4532. var obj, _i, _len, _ref2;
  4533. _ref2 = this.objects;
  4534. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  4535. obj = _ref2[_i];
  4536. if (obj.assigns(name)) {
  4537. return true;
  4538. }
  4539. }
  4540. return false;
  4541. };
  4542. return Arr;
  4543. })(Base);
  4544. exports.Class = Class = (function(_super) {
  4545. __extends(Class, _super);
  4546. function Class(variable, parent, body) {
  4547. this.variable = variable;
  4548. this.parent = parent;
  4549. this.body = body != null ? body : new Block;
  4550. this.boundFuncs = [];
  4551. this.body.classBody = true;
  4552. }
  4553. Class.prototype.children = ['variable', 'parent', 'body'];
  4554. Class.prototype.determineName = function() {
  4555. var decl, tail;
  4556. if (!this.variable) {
  4557. return null;
  4558. }
  4559. decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value;
  4560. if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) {
  4561. this.variable.error("class variable name may not be " + decl);
  4562. }
  4563. return decl && (decl = IDENTIFIER.test(decl) && decl);
  4564. };
  4565. Class.prototype.setContext = function(name) {
  4566. return this.body.traverseChildren(false, function(node) {
  4567. if (node.classBody) {
  4568. return false;
  4569. }
  4570. if (node instanceof Literal && node.value === 'this') {
  4571. return node.value = name;
  4572. } else if (node instanceof Code) {
  4573. node.klass = name;
  4574. if (node.bound) {
  4575. return node.context = name;
  4576. }
  4577. }
  4578. });
  4579. };
  4580. Class.prototype.addBoundFunctions = function(o) {
  4581. var bvar, lhs, _i, _len, _ref2;
  4582. _ref2 = this.boundFuncs;
  4583. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  4584. bvar = _ref2[_i];
  4585. lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o);
  4586. this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)"));
  4587. }
  4588. };
  4589. Class.prototype.addProperties = function(node, name, o) {
  4590. var assign, base, exprs, func, props;
  4591. props = node.base.properties.slice(0);
  4592. exprs = (function() {
  4593. var _results;
  4594. _results = [];
  4595. while (assign = props.shift()) {
  4596. if (assign instanceof Assign) {
  4597. base = assign.variable.base;
  4598. delete assign.context;
  4599. func = assign.value;
  4600. if (base.value === 'constructor') {
  4601. if (this.ctor) {
  4602. assign.error('cannot define more than one constructor in a class');
  4603. }
  4604. if (func.bound) {
  4605. assign.error('cannot define a constructor as a bound function');
  4606. }
  4607. if (func instanceof Code) {
  4608. assign = this.ctor = func;
  4609. } else {
  4610. this.externalCtor = o.classScope.freeVariable('class');
  4611. assign = new Assign(new Literal(this.externalCtor), func);
  4612. }
  4613. } else {
  4614. if (assign.variable["this"]) {
  4615. func["static"] = true;
  4616. } else {
  4617. assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]);
  4618. if (func instanceof Code && func.bound) {
  4619. this.boundFuncs.push(base);
  4620. func.bound = false;
  4621. }
  4622. }
  4623. }
  4624. }
  4625. _results.push(assign);
  4626. }
  4627. return _results;
  4628. }).call(this);
  4629. return compact(exprs);
  4630. };
  4631. Class.prototype.walkBody = function(name, o) {
  4632. return this.traverseChildren(false, (function(_this) {
  4633. return function(child) {
  4634. var cont, exps, i, node, _i, _len, _ref2;
  4635. cont = true;
  4636. if (child instanceof Class) {
  4637. return false;
  4638. }
  4639. if (child instanceof Block) {
  4640. _ref2 = exps = child.expressions;
  4641. for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
  4642. node = _ref2[i];
  4643. if (node instanceof Assign && node.variable.looksStatic(name)) {
  4644. node.value["static"] = true;
  4645. } else if (node instanceof Value && node.isObject(true)) {
  4646. cont = false;
  4647. exps[i] = _this.addProperties(node, name, o);
  4648. }
  4649. }
  4650. child.expressions = exps = flatten(exps);
  4651. }
  4652. return cont && !(child instanceof Class);
  4653. };
  4654. })(this));
  4655. };
  4656. Class.prototype.hoistDirectivePrologue = function() {
  4657. var expressions, index, node;
  4658. index = 0;
  4659. expressions = this.body.expressions;
  4660. while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) {
  4661. ++index;
  4662. }
  4663. return this.directives = expressions.splice(0, index);
  4664. };
  4665. Class.prototype.ensureConstructor = function(name) {
  4666. if (!this.ctor) {
  4667. this.ctor = new Code;
  4668. if (this.externalCtor) {
  4669. this.ctor.body.push(new Literal("" + this.externalCtor + ".apply(this, arguments)"));
  4670. } else if (this.parent) {
  4671. this.ctor.body.push(new Literal("" + name + ".__super__.constructor.apply(this, arguments)"));
  4672. }
  4673. this.ctor.body.makeReturn();
  4674. this.body.expressions.unshift(this.ctor);
  4675. }
  4676. this.ctor.ctor = this.ctor.name = name;
  4677. this.ctor.klass = null;
  4678. return this.ctor.noReturn = true;
  4679. };
  4680. Class.prototype.compileNode = function(o) {
  4681. var args, argumentsNode, func, jumpNode, klass, lname, name, superClass, _ref2;
  4682. if (jumpNode = this.body.jumps()) {
  4683. jumpNode.error('Class bodies cannot contain pure statements');
  4684. }
  4685. if (argumentsNode = this.body.contains(isLiteralArguments)) {
  4686. argumentsNode.error("Class bodies shouldn't reference arguments");
  4687. }
  4688. name = this.determineName() || '_Class';
  4689. if (name.reserved) {
  4690. name = "_" + name;
  4691. }
  4692. lname = new Literal(name);
  4693. func = new Code([], Block.wrap([this.body]));
  4694. args = [];
  4695. o.classScope = func.makeScope(o.scope);
  4696. this.hoistDirectivePrologue();
  4697. this.setContext(name);
  4698. this.walkBody(name, o);
  4699. this.ensureConstructor(name);
  4700. this.addBoundFunctions(o);
  4701. this.body.spaced = true;
  4702. this.body.expressions.push(lname);
  4703. if (this.parent) {
  4704. superClass = new Literal(o.classScope.freeVariable('super', false));
  4705. this.body.expressions.unshift(new Extends(lname, superClass));
  4706. func.params.push(new Param(superClass));
  4707. args.push(this.parent);
  4708. }
  4709. (_ref2 = this.body.expressions).unshift.apply(_ref2, this.directives);
  4710. klass = new Parens(new Call(func, args));
  4711. if (this.variable) {
  4712. klass = new Assign(this.variable, klass);
  4713. }
  4714. return klass.compileToFragments(o);
  4715. };
  4716. return Class;
  4717. })(Base);
  4718. exports.Assign = Assign = (function(_super) {
  4719. __extends(Assign, _super);
  4720. function Assign(variable, value, context, options) {
  4721. var forbidden, name, _ref2;
  4722. this.variable = variable;
  4723. this.value = value;
  4724. this.context = context;
  4725. this.param = options && options.param;
  4726. this.subpattern = options && options.subpattern;
  4727. forbidden = (_ref2 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0);
  4728. if (forbidden && this.context !== 'object') {
  4729. this.variable.error("variable name may not be \"" + name + "\"");
  4730. }
  4731. }
  4732. Assign.prototype.children = ['variable', 'value'];
  4733. Assign.prototype.isStatement = function(o) {
  4734. return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0;
  4735. };
  4736. Assign.prototype.assigns = function(name) {
  4737. return this[this.context === 'object' ? 'value' : 'variable'].assigns(name);
  4738. };
  4739. Assign.prototype.unfoldSoak = function(o) {
  4740. return unfoldSoak(o, this, 'variable');
  4741. };
  4742. Assign.prototype.compileNode = function(o) {
  4743. var answer, compiledName, isValue, match, name, val, varBase, _ref2, _ref3, _ref4;
  4744. if (isValue = this.variable instanceof Value) {
  4745. if (this.variable.isArray() || this.variable.isObject()) {
  4746. return this.compilePatternMatch(o);
  4747. }
  4748. if (this.variable.isSplice()) {
  4749. return this.compileSplice(o);
  4750. }
  4751. if ((_ref2 = this.context) === '||=' || _ref2 === '&&=' || _ref2 === '?=') {
  4752. return this.compileConditional(o);
  4753. }
  4754. }
  4755. compiledName = this.variable.compileToFragments(o, LEVEL_LIST);
  4756. name = fragmentsToText(compiledName);
  4757. if (!this.context) {
  4758. varBase = this.variable.unwrapAll();
  4759. if (!varBase.isAssignable()) {
  4760. this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned");
  4761. }
  4762. if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) {
  4763. if (this.param) {
  4764. o.scope.add(name, 'var');
  4765. } else {
  4766. o.scope.find(name);
  4767. }
  4768. }
  4769. }
  4770. if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) {
  4771. if (match[2]) {
  4772. this.value.klass = match[1];
  4773. }
  4774. this.value.name = (_ref3 = (_ref4 = match[3]) != null ? _ref4 : match[4]) != null ? _ref3 : match[5];
  4775. }
  4776. val = this.value.compileToFragments(o, LEVEL_LIST);
  4777. if (this.context === 'object') {
  4778. return compiledName.concat(this.makeCode(": "), val);
  4779. }
  4780. answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val);
  4781. if (o.level <= LEVEL_LIST) {
  4782. return answer;
  4783. } else {
  4784. return this.wrapInBraces(answer);
  4785. }
  4786. };
  4787. Assign.prototype.compilePatternMatch = function(o) {
  4788. var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
  4789. top = o.level === LEVEL_TOP;
  4790. value = this.value;
  4791. objects = this.variable.base.objects;
  4792. if (!(olen = objects.length)) {
  4793. code = value.compileToFragments(o);
  4794. if (o.level >= LEVEL_OP) {
  4795. return this.wrapInBraces(code);
  4796. } else {
  4797. return code;
  4798. }
  4799. }
  4800. isObject = this.variable.isObject();
  4801. if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) {
  4802. if (obj instanceof Assign) {
  4803. _ref2 = obj, (_ref3 = _ref2.variable, idx = _ref3.base), obj = _ref2.value;
  4804. } else {
  4805. idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0);
  4806. }
  4807. acc = IDENTIFIER.test(idx.unwrap().value || 0);
  4808. value = new Value(value);
  4809. value.properties.push(new (acc ? Access : Index)(idx));
  4810. if (_ref4 = obj.unwrap().value, __indexOf.call(RESERVED, _ref4) >= 0) {
  4811. obj.error("assignment to a reserved word: " + (obj.compile(o)));
  4812. }
  4813. return new Assign(obj, value, null, {
  4814. param: this.param
  4815. }).compileToFragments(o, LEVEL_TOP);
  4816. }
  4817. vvar = value.compileToFragments(o, LEVEL_LIST);
  4818. vvarText = fragmentsToText(vvar);
  4819. assigns = [];
  4820. splat = false;
  4821. if (!IDENTIFIER.test(vvarText) || this.variable.assigns(vvarText)) {
  4822. assigns.push([this.makeCode("" + (ref = o.scope.freeVariable('ref')) + " = ")].concat(__slice.call(vvar)));
  4823. vvar = [this.makeCode(ref)];
  4824. vvarText = ref;
  4825. }
  4826. for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) {
  4827. obj = objects[i];
  4828. idx = i;
  4829. if (isObject) {
  4830. if (obj instanceof Assign) {
  4831. _ref5 = obj, (_ref6 = _ref5.variable, idx = _ref6.base), obj = _ref5.value;
  4832. } else {
  4833. if (obj.base instanceof Parens) {
  4834. _ref7 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref7[0], idx = _ref7[1];
  4835. } else {
  4836. idx = obj["this"] ? obj.properties[0].name : obj;
  4837. }
  4838. }
  4839. }
  4840. if (!splat && obj instanceof Splat) {
  4841. name = obj.name.unwrap().value;
  4842. obj = obj.unwrap();
  4843. val = "" + olen + " <= " + vvarText + ".length ? " + (utility('slice')) + ".call(" + vvarText + ", " + i;
  4844. if (rest = olen - i - 1) {
  4845. ivar = o.scope.freeVariable('i');
  4846. val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])";
  4847. } else {
  4848. val += ") : []";
  4849. }
  4850. val = new Literal(val);
  4851. splat = "" + ivar + "++";
  4852. } else {
  4853. name = obj.unwrap().value;
  4854. if (obj instanceof Splat) {
  4855. obj.error("multiple splats are disallowed in an assignment");
  4856. }
  4857. if (typeof idx === 'number') {
  4858. idx = new Literal(splat || idx);
  4859. acc = false;
  4860. } else {
  4861. acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0);
  4862. }
  4863. val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]);
  4864. }
  4865. if ((name != null) && __indexOf.call(RESERVED, name) >= 0) {
  4866. obj.error("assignment to a reserved word: " + (obj.compile(o)));
  4867. }
  4868. assigns.push(new Assign(obj, val, null, {
  4869. param: this.param,
  4870. subpattern: true
  4871. }).compileToFragments(o, LEVEL_LIST));
  4872. }
  4873. if (!(top || this.subpattern)) {
  4874. assigns.push(vvar);
  4875. }
  4876. fragments = this.joinFragmentArrays(assigns, ', ');
  4877. if (o.level < LEVEL_LIST) {
  4878. return fragments;
  4879. } else {
  4880. return this.wrapInBraces(fragments);
  4881. }
  4882. };
  4883. Assign.prototype.compileConditional = function(o) {
  4884. var fragments, left, right, _ref2;
  4885. _ref2 = this.variable.cacheReference(o), left = _ref2[0], right = _ref2[1];
  4886. if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) {
  4887. this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before");
  4888. }
  4889. if (__indexOf.call(this.context, "?") >= 0) {
  4890. o.isExistentialEquals = true;
  4891. return new If(new Existence(left), right, {
  4892. type: 'if'
  4893. }).addElse(new Assign(right, this.value, '=')).compileToFragments(o);
  4894. } else {
  4895. fragments = new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o);
  4896. if (o.level <= LEVEL_LIST) {
  4897. return fragments;
  4898. } else {
  4899. return this.wrapInBraces(fragments);
  4900. }
  4901. }
  4902. };
  4903. Assign.prototype.compileSplice = function(o) {
  4904. var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref2, _ref3, _ref4;
  4905. _ref2 = this.variable.properties.pop().range, from = _ref2.from, to = _ref2.to, exclusive = _ref2.exclusive;
  4906. name = this.variable.compile(o);
  4907. if (from) {
  4908. _ref3 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref3[0], fromRef = _ref3[1];
  4909. } else {
  4910. fromDecl = fromRef = '0';
  4911. }
  4912. if (to) {
  4913. if (from instanceof Value && from.isSimpleNumber() && to instanceof Value && to.isSimpleNumber()) {
  4914. to = to.compile(o) - fromRef;
  4915. if (!exclusive) {
  4916. to += 1;
  4917. }
  4918. } else {
  4919. to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef;
  4920. if (!exclusive) {
  4921. to += ' + 1';
  4922. }
  4923. }
  4924. } else {
  4925. to = "9e9";
  4926. }
  4927. _ref4 = this.value.cache(o, LEVEL_LIST), valDef = _ref4[0], valRef = _ref4[1];
  4928. answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef);
  4929. if (o.level > LEVEL_TOP) {
  4930. return this.wrapInBraces(answer);
  4931. } else {
  4932. return answer;
  4933. }
  4934. };
  4935. return Assign;
  4936. })(Base);
  4937. exports.Code = Code = (function(_super) {
  4938. __extends(Code, _super);
  4939. function Code(params, body, tag) {
  4940. this.params = params || [];
  4941. this.body = body || new Block;
  4942. this.bound = tag === 'boundfunc';
  4943. }
  4944. Code.prototype.children = ['params', 'body'];
  4945. Code.prototype.isStatement = function() {
  4946. return !!this.ctor;
  4947. };
  4948. Code.prototype.jumps = NO;
  4949. Code.prototype.makeScope = function(parentScope) {
  4950. return new Scope(parentScope, this.body, this);
  4951. };
  4952. Code.prototype.compileNode = function(o) {
  4953. var answer, boundfunc, code, exprs, i, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, wrapper, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
  4954. if (this.bound && ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0)) {
  4955. this.context = o.scope.method.context;
  4956. }
  4957. if (this.bound && !this.context) {
  4958. this.context = '_this';
  4959. wrapper = new Code([new Param(new Literal(this.context))], new Block([this]));
  4960. boundfunc = new Call(wrapper, [new Literal('this')]);
  4961. boundfunc.updateLocationDataIfMissing(this.locationData);
  4962. return boundfunc.compileNode(o);
  4963. }
  4964. o.scope = del(o, 'classScope') || this.makeScope(o.scope);
  4965. o.scope.shared = del(o, 'sharedScope');
  4966. o.indent += TAB;
  4967. delete o.bare;
  4968. delete o.isExistentialEquals;
  4969. params = [];
  4970. exprs = [];
  4971. _ref3 = this.params;
  4972. for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
  4973. param = _ref3[_i];
  4974. o.scope.parameter(param.asReference(o));
  4975. }
  4976. _ref4 = this.params;
  4977. for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
  4978. param = _ref4[_j];
  4979. if (!param.splat) {
  4980. continue;
  4981. }
  4982. _ref5 = this.params;
  4983. for (_k = 0, _len2 = _ref5.length; _k < _len2; _k++) {
  4984. p = _ref5[_k].name;
  4985. if (p["this"]) {
  4986. p = p.properties[0].name;
  4987. }
  4988. if (p.value) {
  4989. o.scope.add(p.value, 'var', true);
  4990. }
  4991. }
  4992. splats = new Assign(new Value(new Arr((function() {
  4993. var _l, _len3, _ref6, _results;
  4994. _ref6 = this.params;
  4995. _results = [];
  4996. for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) {
  4997. p = _ref6[_l];
  4998. _results.push(p.asReference(o));
  4999. }
  5000. return _results;
  5001. }).call(this))), new Value(new Literal('arguments')));
  5002. break;
  5003. }
  5004. _ref6 = this.params;
  5005. for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) {
  5006. param = _ref6[_l];
  5007. if (param.isComplex()) {
  5008. val = ref = param.asReference(o);
  5009. if (param.value) {
  5010. val = new Op('?', ref, param.value);
  5011. }
  5012. exprs.push(new Assign(new Value(param.name), val, '=', {
  5013. param: true
  5014. }));
  5015. } else {
  5016. ref = param;
  5017. if (param.value) {
  5018. lit = new Literal(ref.name.value + ' == null');
  5019. val = new Assign(new Value(param.name), param.value, '=');
  5020. exprs.push(new If(lit, val));
  5021. }
  5022. }
  5023. if (!splats) {
  5024. params.push(ref);
  5025. }
  5026. }
  5027. wasEmpty = this.body.isEmpty();
  5028. if (splats) {
  5029. exprs.unshift(splats);
  5030. }
  5031. if (exprs.length) {
  5032. (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs);
  5033. }
  5034. for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) {
  5035. p = params[i];
  5036. params[i] = p.compileToFragments(o);
  5037. o.scope.parameter(fragmentsToText(params[i]));
  5038. }
  5039. uniqs = [];
  5040. this.eachParamName(function(name, node) {
  5041. if (__indexOf.call(uniqs, name) >= 0) {
  5042. node.error("multiple parameters named '" + name + "'");
  5043. }
  5044. return uniqs.push(name);
  5045. });
  5046. if (!(wasEmpty || this.noReturn)) {
  5047. this.body.makeReturn();
  5048. }
  5049. code = 'function';
  5050. if (this.ctor) {
  5051. code += ' ' + this.name;
  5052. }
  5053. code += '(';
  5054. answer = [this.makeCode(code)];
  5055. for (i = _n = 0, _len5 = params.length; _n < _len5; i = ++_n) {
  5056. p = params[i];
  5057. if (i) {
  5058. answer.push(this.makeCode(", "));
  5059. }
  5060. answer.push.apply(answer, p);
  5061. }
  5062. answer.push(this.makeCode(') {'));
  5063. if (!this.body.isEmpty()) {
  5064. answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab));
  5065. }
  5066. answer.push(this.makeCode('}'));
  5067. if (this.ctor) {
  5068. return [this.makeCode(this.tab)].concat(__slice.call(answer));
  5069. }
  5070. if (this.front || (o.level >= LEVEL_ACCESS)) {
  5071. return this.wrapInBraces(answer);
  5072. } else {
  5073. return answer;
  5074. }
  5075. };
  5076. Code.prototype.eachParamName = function(iterator) {
  5077. var param, _i, _len, _ref2, _results;
  5078. _ref2 = this.params;
  5079. _results = [];
  5080. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5081. param = _ref2[_i];
  5082. _results.push(param.eachName(iterator));
  5083. }
  5084. return _results;
  5085. };
  5086. Code.prototype.traverseChildren = function(crossScope, func) {
  5087. if (crossScope) {
  5088. return Code.__super__.traverseChildren.call(this, crossScope, func);
  5089. }
  5090. };
  5091. return Code;
  5092. })(Base);
  5093. exports.Param = Param = (function(_super) {
  5094. __extends(Param, _super);
  5095. function Param(name, value, splat) {
  5096. var _ref2;
  5097. this.name = name;
  5098. this.value = value;
  5099. this.splat = splat;
  5100. if (_ref2 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) {
  5101. this.name.error("parameter name \"" + name + "\" is not allowed");
  5102. }
  5103. }
  5104. Param.prototype.children = ['name', 'value'];
  5105. Param.prototype.compileToFragments = function(o) {
  5106. return this.name.compileToFragments(o, LEVEL_LIST);
  5107. };
  5108. Param.prototype.asReference = function(o) {
  5109. var node;
  5110. if (this.reference) {
  5111. return this.reference;
  5112. }
  5113. node = this.name;
  5114. if (node["this"]) {
  5115. node = node.properties[0].name;
  5116. if (node.value.reserved) {
  5117. node = new Literal(o.scope.freeVariable(node.value));
  5118. }
  5119. } else if (node.isComplex()) {
  5120. node = new Literal(o.scope.freeVariable('arg'));
  5121. }
  5122. node = new Value(node);
  5123. if (this.splat) {
  5124. node = new Splat(node);
  5125. }
  5126. node.updateLocationDataIfMissing(this.locationData);
  5127. return this.reference = node;
  5128. };
  5129. Param.prototype.isComplex = function() {
  5130. return this.name.isComplex();
  5131. };
  5132. Param.prototype.eachName = function(iterator, name) {
  5133. var atParam, node, obj, _i, _len, _ref2;
  5134. if (name == null) {
  5135. name = this.name;
  5136. }
  5137. atParam = function(obj) {
  5138. var node;
  5139. node = obj.properties[0].name;
  5140. if (!node.value.reserved) {
  5141. return iterator(node.value, node);
  5142. }
  5143. };
  5144. if (name instanceof Literal) {
  5145. return iterator(name.value, name);
  5146. }
  5147. if (name instanceof Value) {
  5148. return atParam(name);
  5149. }
  5150. _ref2 = name.objects;
  5151. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5152. obj = _ref2[_i];
  5153. if (obj instanceof Assign) {
  5154. this.eachName(iterator, obj.value.unwrap());
  5155. } else if (obj instanceof Splat) {
  5156. node = obj.name.unwrap();
  5157. iterator(node.value, node);
  5158. } else if (obj instanceof Value) {
  5159. if (obj.isArray() || obj.isObject()) {
  5160. this.eachName(iterator, obj.base);
  5161. } else if (obj["this"]) {
  5162. atParam(obj);
  5163. } else {
  5164. iterator(obj.base.value, obj.base);
  5165. }
  5166. } else {
  5167. obj.error("illegal parameter " + (obj.compile()));
  5168. }
  5169. }
  5170. };
  5171. return Param;
  5172. })(Base);
  5173. exports.Splat = Splat = (function(_super) {
  5174. __extends(Splat, _super);
  5175. Splat.prototype.children = ['name'];
  5176. Splat.prototype.isAssignable = YES;
  5177. function Splat(name) {
  5178. this.name = name.compile ? name : new Literal(name);
  5179. }
  5180. Splat.prototype.assigns = function(name) {
  5181. return this.name.assigns(name);
  5182. };
  5183. Splat.prototype.compileToFragments = function(o) {
  5184. return this.name.compileToFragments(o);
  5185. };
  5186. Splat.prototype.unwrap = function() {
  5187. return this.name;
  5188. };
  5189. Splat.compileSplattedArray = function(o, list, apply) {
  5190. var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len;
  5191. index = -1;
  5192. while ((node = list[++index]) && !(node instanceof Splat)) {
  5193. continue;
  5194. }
  5195. if (index >= list.length) {
  5196. return [];
  5197. }
  5198. if (list.length === 1) {
  5199. node = list[0];
  5200. fragments = node.compileToFragments(o, LEVEL_LIST);
  5201. if (apply) {
  5202. return fragments;
  5203. }
  5204. return [].concat(node.makeCode("" + (utility('slice')) + ".call("), fragments, node.makeCode(")"));
  5205. }
  5206. args = list.slice(index);
  5207. for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) {
  5208. node = args[i];
  5209. compiledNode = node.compileToFragments(o, LEVEL_LIST);
  5210. args[i] = node instanceof Splat ? [].concat(node.makeCode("" + (utility('slice')) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]"));
  5211. }
  5212. if (index === 0) {
  5213. node = list[0];
  5214. concatPart = node.joinFragmentArrays(args.slice(1), ', ');
  5215. return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")"));
  5216. }
  5217. base = (function() {
  5218. var _j, _len1, _ref2, _results;
  5219. _ref2 = list.slice(0, index);
  5220. _results = [];
  5221. for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
  5222. node = _ref2[_j];
  5223. _results.push(node.compileToFragments(o, LEVEL_LIST));
  5224. }
  5225. return _results;
  5226. })();
  5227. base = list[0].joinFragmentArrays(base, ', ');
  5228. concatPart = list[index].joinFragmentArrays(args, ', ');
  5229. return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last(list)).makeCode(")"));
  5230. };
  5231. return Splat;
  5232. })(Base);
  5233. exports.While = While = (function(_super) {
  5234. __extends(While, _super);
  5235. function While(condition, options) {
  5236. this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition;
  5237. this.guard = options != null ? options.guard : void 0;
  5238. }
  5239. While.prototype.children = ['condition', 'guard', 'body'];
  5240. While.prototype.isStatement = YES;
  5241. While.prototype.makeReturn = function(res) {
  5242. if (res) {
  5243. return While.__super__.makeReturn.apply(this, arguments);
  5244. } else {
  5245. this.returns = !this.jumps({
  5246. loop: true
  5247. });
  5248. return this;
  5249. }
  5250. };
  5251. While.prototype.addBody = function(body) {
  5252. this.body = body;
  5253. return this;
  5254. };
  5255. While.prototype.jumps = function() {
  5256. var expressions, jumpNode, node, _i, _len;
  5257. expressions = this.body.expressions;
  5258. if (!expressions.length) {
  5259. return false;
  5260. }
  5261. for (_i = 0, _len = expressions.length; _i < _len; _i++) {
  5262. node = expressions[_i];
  5263. if (jumpNode = node.jumps({
  5264. loop: true
  5265. })) {
  5266. return jumpNode;
  5267. }
  5268. }
  5269. return false;
  5270. };
  5271. While.prototype.compileNode = function(o) {
  5272. var answer, body, rvar, set;
  5273. o.indent += TAB;
  5274. set = '';
  5275. body = this.body;
  5276. if (body.isEmpty()) {
  5277. body = this.makeCode('');
  5278. } else {
  5279. if (this.returns) {
  5280. body.makeReturn(rvar = o.scope.freeVariable('results'));
  5281. set = "" + this.tab + rvar + " = [];\n";
  5282. }
  5283. if (this.guard) {
  5284. if (body.expressions.length > 1) {
  5285. body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
  5286. } else {
  5287. if (this.guard) {
  5288. body = Block.wrap([new If(this.guard, body)]);
  5289. }
  5290. }
  5291. }
  5292. body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab));
  5293. }
  5294. answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}"));
  5295. if (this.returns) {
  5296. answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";"));
  5297. }
  5298. return answer;
  5299. };
  5300. return While;
  5301. })(Base);
  5302. exports.Op = Op = (function(_super) {
  5303. var CONVERSIONS, INVERSIONS;
  5304. __extends(Op, _super);
  5305. function Op(op, first, second, flip) {
  5306. if (op === 'in') {
  5307. return new In(first, second);
  5308. }
  5309. if (op === 'do') {
  5310. return this.generateDo(first);
  5311. }
  5312. if (op === 'new') {
  5313. if (first instanceof Call && !first["do"] && !first.isNew) {
  5314. return first.newInstance();
  5315. }
  5316. if (first instanceof Code && first.bound || first["do"]) {
  5317. first = new Parens(first);
  5318. }
  5319. }
  5320. this.operator = CONVERSIONS[op] || op;
  5321. this.first = first;
  5322. this.second = second;
  5323. this.flip = !!flip;
  5324. return this;
  5325. }
  5326. CONVERSIONS = {
  5327. '==': '===',
  5328. '!=': '!==',
  5329. 'of': 'in'
  5330. };
  5331. INVERSIONS = {
  5332. '!==': '===',
  5333. '===': '!=='
  5334. };
  5335. Op.prototype.children = ['first', 'second'];
  5336. Op.prototype.isSimpleNumber = NO;
  5337. Op.prototype.isUnary = function() {
  5338. return !this.second;
  5339. };
  5340. Op.prototype.isComplex = function() {
  5341. var _ref2;
  5342. return !(this.isUnary() && ((_ref2 = this.operator) === '+' || _ref2 === '-')) || this.first.isComplex();
  5343. };
  5344. Op.prototype.isChainable = function() {
  5345. var _ref2;
  5346. return (_ref2 = this.operator) === '<' || _ref2 === '>' || _ref2 === '>=' || _ref2 === '<=' || _ref2 === '===' || _ref2 === '!==';
  5347. };
  5348. Op.prototype.invert = function() {
  5349. var allInvertable, curr, fst, op, _ref2;
  5350. if (this.isChainable() && this.first.isChainable()) {
  5351. allInvertable = true;
  5352. curr = this;
  5353. while (curr && curr.operator) {
  5354. allInvertable && (allInvertable = curr.operator in INVERSIONS);
  5355. curr = curr.first;
  5356. }
  5357. if (!allInvertable) {
  5358. return new Parens(this).invert();
  5359. }
  5360. curr = this;
  5361. while (curr && curr.operator) {
  5362. curr.invert = !curr.invert;
  5363. curr.operator = INVERSIONS[curr.operator];
  5364. curr = curr.first;
  5365. }
  5366. return this;
  5367. } else if (op = INVERSIONS[this.operator]) {
  5368. this.operator = op;
  5369. if (this.first.unwrap() instanceof Op) {
  5370. this.first.invert();
  5371. }
  5372. return this;
  5373. } else if (this.second) {
  5374. return new Parens(this).invert();
  5375. } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref2 = fst.operator) === '!' || _ref2 === 'in' || _ref2 === 'instanceof')) {
  5376. return fst;
  5377. } else {
  5378. return new Op('!', this);
  5379. }
  5380. };
  5381. Op.prototype.unfoldSoak = function(o) {
  5382. var _ref2;
  5383. return ((_ref2 = this.operator) === '++' || _ref2 === '--' || _ref2 === 'delete') && unfoldSoak(o, this, 'first');
  5384. };
  5385. Op.prototype.generateDo = function(exp) {
  5386. var call, func, param, passedParams, ref, _i, _len, _ref2;
  5387. passedParams = [];
  5388. func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp;
  5389. _ref2 = func.params || [];
  5390. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5391. param = _ref2[_i];
  5392. if (param.value) {
  5393. passedParams.push(param.value);
  5394. delete param.value;
  5395. } else {
  5396. passedParams.push(param);
  5397. }
  5398. }
  5399. call = new Call(exp, passedParams);
  5400. call["do"] = true;
  5401. return call;
  5402. };
  5403. Op.prototype.compileNode = function(o) {
  5404. var answer, isChain, _ref2, _ref3;
  5405. isChain = this.isChainable() && this.first.isChainable();
  5406. if (!isChain) {
  5407. this.first.front = this.front;
  5408. }
  5409. if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) {
  5410. this.error('delete operand may not be argument or var');
  5411. }
  5412. if (((_ref2 = this.operator) === '--' || _ref2 === '++') && (_ref3 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0)) {
  5413. this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\"");
  5414. }
  5415. if (this.isUnary()) {
  5416. return this.compileUnary(o);
  5417. }
  5418. if (isChain) {
  5419. return this.compileChain(o);
  5420. }
  5421. if (this.operator === '?') {
  5422. return this.compileExistence(o);
  5423. }
  5424. answer = [].concat(this.first.compileToFragments(o, LEVEL_OP), this.makeCode(' ' + this.operator + ' '), this.second.compileToFragments(o, LEVEL_OP));
  5425. if (o.level <= LEVEL_OP) {
  5426. return answer;
  5427. } else {
  5428. return this.wrapInBraces(answer);
  5429. }
  5430. };
  5431. Op.prototype.compileChain = function(o) {
  5432. var fragments, fst, shared, _ref2;
  5433. _ref2 = this.first.second.cache(o), this.first.second = _ref2[0], shared = _ref2[1];
  5434. fst = this.first.compileToFragments(o, LEVEL_OP);
  5435. fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP));
  5436. return this.wrapInBraces(fragments);
  5437. };
  5438. Op.prototype.compileExistence = function(o) {
  5439. var fst, ref;
  5440. if (this.first.isComplex()) {
  5441. ref = new Literal(o.scope.freeVariable('ref'));
  5442. fst = new Parens(new Assign(ref, this.first));
  5443. } else {
  5444. fst = this.first;
  5445. ref = fst;
  5446. }
  5447. return new If(new Existence(fst), ref, {
  5448. type: 'if'
  5449. }).addElse(this.second).compileToFragments(o);
  5450. };
  5451. Op.prototype.compileUnary = function(o) {
  5452. var op, parts, plusMinus;
  5453. parts = [];
  5454. op = this.operator;
  5455. parts.push([this.makeCode(op)]);
  5456. if (op === '!' && this.first instanceof Existence) {
  5457. this.first.negated = !this.first.negated;
  5458. return this.first.compileToFragments(o);
  5459. }
  5460. if (o.level >= LEVEL_ACCESS) {
  5461. return (new Parens(this)).compileToFragments(o);
  5462. }
  5463. plusMinus = op === '+' || op === '-';
  5464. if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) {
  5465. parts.push([this.makeCode(' ')]);
  5466. }
  5467. if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) {
  5468. this.first = new Parens(this.first);
  5469. }
  5470. parts.push(this.first.compileToFragments(o, LEVEL_OP));
  5471. if (this.flip) {
  5472. parts.reverse();
  5473. }
  5474. return this.joinFragmentArrays(parts, '');
  5475. };
  5476. Op.prototype.toString = function(idt) {
  5477. return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator);
  5478. };
  5479. return Op;
  5480. })(Base);
  5481. exports.In = In = (function(_super) {
  5482. __extends(In, _super);
  5483. function In(object, array) {
  5484. this.object = object;
  5485. this.array = array;
  5486. }
  5487. In.prototype.children = ['object', 'array'];
  5488. In.prototype.invert = NEGATE;
  5489. In.prototype.compileNode = function(o) {
  5490. var hasSplat, obj, _i, _len, _ref2;
  5491. if (this.array instanceof Value && this.array.isArray()) {
  5492. _ref2 = this.array.base.objects;
  5493. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5494. obj = _ref2[_i];
  5495. if (!(obj instanceof Splat)) {
  5496. continue;
  5497. }
  5498. hasSplat = true;
  5499. break;
  5500. }
  5501. if (!hasSplat) {
  5502. return this.compileOrTest(o);
  5503. }
  5504. }
  5505. return this.compileLoopTest(o);
  5506. };
  5507. In.prototype.compileOrTest = function(o) {
  5508. var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref2, _ref3, _ref4;
  5509. if (this.array.base.objects.length === 0) {
  5510. return [this.makeCode("" + (!!this.negated))];
  5511. }
  5512. _ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1];
  5513. _ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1];
  5514. tests = [];
  5515. _ref4 = this.array.base.objects;
  5516. for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) {
  5517. item = _ref4[i];
  5518. if (i) {
  5519. tests.push(this.makeCode(cnj));
  5520. }
  5521. tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS));
  5522. }
  5523. if (o.level < LEVEL_OP) {
  5524. return tests;
  5525. } else {
  5526. return this.wrapInBraces(tests);
  5527. }
  5528. };
  5529. In.prototype.compileLoopTest = function(o) {
  5530. var fragments, ref, sub, _ref2;
  5531. _ref2 = this.object.cache(o, LEVEL_LIST), sub = _ref2[0], ref = _ref2[1];
  5532. fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0')));
  5533. if (fragmentsToText(sub) === fragmentsToText(ref)) {
  5534. return fragments;
  5535. }
  5536. fragments = sub.concat(this.makeCode(', '), fragments);
  5537. if (o.level < LEVEL_LIST) {
  5538. return fragments;
  5539. } else {
  5540. return this.wrapInBraces(fragments);
  5541. }
  5542. };
  5543. In.prototype.toString = function(idt) {
  5544. return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : ''));
  5545. };
  5546. return In;
  5547. })(Base);
  5548. exports.Try = Try = (function(_super) {
  5549. __extends(Try, _super);
  5550. function Try(attempt, errorVariable, recovery, ensure) {
  5551. this.attempt = attempt;
  5552. this.errorVariable = errorVariable;
  5553. this.recovery = recovery;
  5554. this.ensure = ensure;
  5555. }
  5556. Try.prototype.children = ['attempt', 'recovery', 'ensure'];
  5557. Try.prototype.isStatement = YES;
  5558. Try.prototype.jumps = function(o) {
  5559. var _ref2;
  5560. return this.attempt.jumps(o) || ((_ref2 = this.recovery) != null ? _ref2.jumps(o) : void 0);
  5561. };
  5562. Try.prototype.makeReturn = function(res) {
  5563. if (this.attempt) {
  5564. this.attempt = this.attempt.makeReturn(res);
  5565. }
  5566. if (this.recovery) {
  5567. this.recovery = this.recovery.makeReturn(res);
  5568. }
  5569. return this;
  5570. };
  5571. Try.prototype.compileNode = function(o) {
  5572. var catchPart, ensurePart, placeholder, tryPart;
  5573. o.indent += TAB;
  5574. tryPart = this.attempt.compileToFragments(o, LEVEL_TOP);
  5575. catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : [];
  5576. ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : [];
  5577. return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart);
  5578. };
  5579. return Try;
  5580. })(Base);
  5581. exports.Throw = Throw = (function(_super) {
  5582. __extends(Throw, _super);
  5583. function Throw(expression) {
  5584. this.expression = expression;
  5585. }
  5586. Throw.prototype.children = ['expression'];
  5587. Throw.prototype.isStatement = YES;
  5588. Throw.prototype.jumps = NO;
  5589. Throw.prototype.makeReturn = THIS;
  5590. Throw.prototype.compileNode = function(o) {
  5591. return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";"));
  5592. };
  5593. return Throw;
  5594. })(Base);
  5595. exports.Existence = Existence = (function(_super) {
  5596. __extends(Existence, _super);
  5597. function Existence(expression) {
  5598. this.expression = expression;
  5599. }
  5600. Existence.prototype.children = ['expression'];
  5601. Existence.prototype.invert = NEGATE;
  5602. Existence.prototype.compileNode = function(o) {
  5603. var cmp, cnj, code, _ref2;
  5604. this.expression.front = this.front;
  5605. code = this.expression.compile(o, LEVEL_OP);
  5606. if (IDENTIFIER.test(code) && !o.scope.check(code)) {
  5607. _ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1];
  5608. code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null";
  5609. } else {
  5610. code = "" + code + " " + (this.negated ? '==' : '!=') + " null";
  5611. }
  5612. return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")];
  5613. };
  5614. return Existence;
  5615. })(Base);
  5616. exports.Parens = Parens = (function(_super) {
  5617. __extends(Parens, _super);
  5618. function Parens(body) {
  5619. this.body = body;
  5620. }
  5621. Parens.prototype.children = ['body'];
  5622. Parens.prototype.unwrap = function() {
  5623. return this.body;
  5624. };
  5625. Parens.prototype.isComplex = function() {
  5626. return this.body.isComplex();
  5627. };
  5628. Parens.prototype.compileNode = function(o) {
  5629. var bare, expr, fragments;
  5630. expr = this.body.unwrap();
  5631. if (expr instanceof Value && expr.isAtomic()) {
  5632. expr.front = this.front;
  5633. return expr.compileToFragments(o);
  5634. }
  5635. fragments = expr.compileToFragments(o, LEVEL_PAREN);
  5636. bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns));
  5637. if (bare) {
  5638. return fragments;
  5639. } else {
  5640. return this.wrapInBraces(fragments);
  5641. }
  5642. };
  5643. return Parens;
  5644. })(Base);
  5645. exports.For = For = (function(_super) {
  5646. __extends(For, _super);
  5647. function For(body, source) {
  5648. var _ref2;
  5649. this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index;
  5650. this.body = Block.wrap([body]);
  5651. this.own = !!source.own;
  5652. this.object = !!source.object;
  5653. if (this.object) {
  5654. _ref2 = [this.index, this.name], this.name = _ref2[0], this.index = _ref2[1];
  5655. }
  5656. if (this.index instanceof Value) {
  5657. this.index.error('index cannot be a pattern matching expression');
  5658. }
  5659. this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length;
  5660. this.pattern = this.name instanceof Value;
  5661. if (this.range && this.index) {
  5662. this.index.error('indexes do not apply to range loops');
  5663. }
  5664. if (this.range && this.pattern) {
  5665. this.name.error('cannot pattern match over range loops');
  5666. }
  5667. if (this.own && !this.object) {
  5668. this.name.error('cannot use own with for-in');
  5669. }
  5670. this.returns = false;
  5671. }
  5672. For.prototype.children = ['body', 'source', 'guard', 'step'];
  5673. For.prototype.compileNode = function(o) {
  5674. var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref2, _ref3;
  5675. body = Block.wrap([this.body]);
  5676. lastJumps = (_ref2 = last(body.expressions)) != null ? _ref2.jumps() : void 0;
  5677. if (lastJumps && lastJumps instanceof Return) {
  5678. this.returns = false;
  5679. }
  5680. source = this.range ? this.source.base : this.source;
  5681. scope = o.scope;
  5682. name = this.name && (this.name.compile(o, LEVEL_LIST));
  5683. index = this.index && (this.index.compile(o, LEVEL_LIST));
  5684. if (name && !this.pattern) {
  5685. scope.find(name);
  5686. }
  5687. if (index) {
  5688. scope.find(index);
  5689. }
  5690. if (this.returns) {
  5691. rvar = scope.freeVariable('results');
  5692. }
  5693. ivar = (this.object && index) || scope.freeVariable('i');
  5694. kvar = (this.range && name) || index || ivar;
  5695. kvarAssign = kvar !== ivar ? "" + kvar + " = " : "";
  5696. if (this.step && !this.range) {
  5697. _ref3 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref3[0], stepVar = _ref3[1];
  5698. stepNum = stepVar.match(NUMBER);
  5699. }
  5700. if (this.pattern) {
  5701. name = ivar;
  5702. }
  5703. varPart = '';
  5704. guardPart = '';
  5705. defPart = '';
  5706. idt1 = this.tab + TAB;
  5707. if (this.range) {
  5708. forPartFragments = source.compileToFragments(merge(o, {
  5709. index: ivar,
  5710. name: name,
  5711. step: this.step
  5712. }));
  5713. } else {
  5714. svar = this.source.compile(o, LEVEL_LIST);
  5715. if ((name || this.own) && !IDENTIFIER.test(svar)) {
  5716. defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n";
  5717. svar = ref;
  5718. }
  5719. if (name && !this.pattern) {
  5720. namePart = "" + name + " = " + svar + "[" + kvar + "]";
  5721. }
  5722. if (!this.object) {
  5723. if (step !== stepVar) {
  5724. defPart += "" + this.tab + step + ";\n";
  5725. }
  5726. if (!(this.step && stepNum && (down = parseNum(stepNum[0]) < 0))) {
  5727. lvar = scope.freeVariable('len');
  5728. }
  5729. declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length";
  5730. declareDown = "" + kvarAssign + ivar + " = " + svar + ".length - 1";
  5731. compare = "" + ivar + " < " + lvar;
  5732. compareDown = "" + ivar + " >= 0";
  5733. if (this.step) {
  5734. if (stepNum) {
  5735. if (down) {
  5736. compare = compareDown;
  5737. declare = declareDown;
  5738. }
  5739. } else {
  5740. compare = "" + stepVar + " > 0 ? " + compare + " : " + compareDown;
  5741. declare = "(" + stepVar + " > 0 ? (" + declare + ") : " + declareDown + ")";
  5742. }
  5743. increment = "" + ivar + " += " + stepVar;
  5744. } else {
  5745. increment = "" + (kvar !== ivar ? "++" + ivar : "" + ivar + "++");
  5746. }
  5747. forPartFragments = [this.makeCode("" + declare + "; " + compare + "; " + kvarAssign + increment)];
  5748. }
  5749. }
  5750. if (this.returns) {
  5751. resultPart = "" + this.tab + rvar + " = [];\n";
  5752. returnResult = "\n" + this.tab + "return " + rvar + ";";
  5753. body.makeReturn(rvar);
  5754. }
  5755. if (this.guard) {
  5756. if (body.expressions.length > 1) {
  5757. body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
  5758. } else {
  5759. if (this.guard) {
  5760. body = Block.wrap([new If(this.guard, body)]);
  5761. }
  5762. }
  5763. }
  5764. if (this.pattern) {
  5765. body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]")));
  5766. }
  5767. defPartFragments = [].concat(this.makeCode(defPart), this.pluckDirectCall(o, body));
  5768. if (namePart) {
  5769. varPart = "\n" + idt1 + namePart + ";";
  5770. }
  5771. if (this.object) {
  5772. forPartFragments = [this.makeCode("" + kvar + " in " + svar)];
  5773. if (this.own) {
  5774. guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;";
  5775. }
  5776. }
  5777. bodyFragments = body.compileToFragments(merge(o, {
  5778. indent: idt1
  5779. }), LEVEL_TOP);
  5780. if (bodyFragments && (bodyFragments.length > 0)) {
  5781. bodyFragments = [].concat(this.makeCode("\n"), bodyFragments, this.makeCode("\n"));
  5782. }
  5783. return [].concat(defPartFragments, this.makeCode("" + (resultPart || '') + this.tab + "for ("), forPartFragments, this.makeCode(") {" + guardPart + varPart), bodyFragments, this.makeCode("" + this.tab + "}" + (returnResult || '')));
  5784. };
  5785. For.prototype.pluckDirectCall = function(o, body) {
  5786. var base, defs, expr, fn, idx, ref, val, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
  5787. defs = [];
  5788. _ref2 = body.expressions;
  5789. for (idx = _i = 0, _len = _ref2.length; _i < _len; idx = ++_i) {
  5790. expr = _ref2[idx];
  5791. expr = expr.unwrapAll();
  5792. if (!(expr instanceof Call)) {
  5793. continue;
  5794. }
  5795. val = (_ref3 = expr.variable) != null ? _ref3.unwrapAll() : void 0;
  5796. if (!((val instanceof Code) || (val instanceof Value && ((_ref4 = val.base) != null ? _ref4.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref5 = (_ref6 = val.properties[0].name) != null ? _ref6.value : void 0) === 'call' || _ref5 === 'apply')))) {
  5797. continue;
  5798. }
  5799. fn = ((_ref7 = val.base) != null ? _ref7.unwrapAll() : void 0) || val;
  5800. ref = new Literal(o.scope.freeVariable('fn'));
  5801. base = new Value(ref);
  5802. if (val.base) {
  5803. _ref8 = [base, val], val.base = _ref8[0], base = _ref8[1];
  5804. }
  5805. body.expressions[idx] = new Call(base, expr.args);
  5806. defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n'));
  5807. }
  5808. return defs;
  5809. };
  5810. return For;
  5811. })(While);
  5812. exports.Switch = Switch = (function(_super) {
  5813. __extends(Switch, _super);
  5814. function Switch(subject, cases, otherwise) {
  5815. this.subject = subject;
  5816. this.cases = cases;
  5817. this.otherwise = otherwise;
  5818. }
  5819. Switch.prototype.children = ['subject', 'cases', 'otherwise'];
  5820. Switch.prototype.isStatement = YES;
  5821. Switch.prototype.jumps = function(o) {
  5822. var block, conds, jumpNode, _i, _len, _ref2, _ref3, _ref4;
  5823. if (o == null) {
  5824. o = {
  5825. block: true
  5826. };
  5827. }
  5828. _ref2 = this.cases;
  5829. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5830. _ref3 = _ref2[_i], conds = _ref3[0], block = _ref3[1];
  5831. if (jumpNode = block.jumps(o)) {
  5832. return jumpNode;
  5833. }
  5834. }
  5835. return (_ref4 = this.otherwise) != null ? _ref4.jumps(o) : void 0;
  5836. };
  5837. Switch.prototype.makeReturn = function(res) {
  5838. var pair, _i, _len, _ref2, _ref3;
  5839. _ref2 = this.cases;
  5840. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5841. pair = _ref2[_i];
  5842. pair[1].makeReturn(res);
  5843. }
  5844. if (res) {
  5845. this.otherwise || (this.otherwise = new Block([new Literal('void 0')]));
  5846. }
  5847. if ((_ref3 = this.otherwise) != null) {
  5848. _ref3.makeReturn(res);
  5849. }
  5850. return this;
  5851. };
  5852. Switch.prototype.compileNode = function(o) {
  5853. var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref2, _ref3, _ref4;
  5854. idt1 = o.indent + TAB;
  5855. idt2 = o.indent = idt1 + TAB;
  5856. fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n"));
  5857. _ref2 = this.cases;
  5858. for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
  5859. _ref3 = _ref2[i], conditions = _ref3[0], block = _ref3[1];
  5860. _ref4 = flatten([conditions]);
  5861. for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
  5862. cond = _ref4[_j];
  5863. if (!this.subject) {
  5864. cond = cond.invert();
  5865. }
  5866. fragments = fragments.concat(this.makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), this.makeCode(":\n"));
  5867. }
  5868. if ((body = block.compileToFragments(o, LEVEL_TOP)).length > 0) {
  5869. fragments = fragments.concat(body, this.makeCode('\n'));
  5870. }
  5871. if (i === this.cases.length - 1 && !this.otherwise) {
  5872. break;
  5873. }
  5874. expr = this.lastNonComment(block.expressions);
  5875. if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) {
  5876. continue;
  5877. }
  5878. fragments.push(cond.makeCode(idt2 + 'break;\n'));
  5879. }
  5880. if (this.otherwise && this.otherwise.expressions.length) {
  5881. fragments.push.apply(fragments, [this.makeCode(idt1 + "default:\n")].concat(__slice.call(this.otherwise.compileToFragments(o, LEVEL_TOP)), [this.makeCode("\n")]));
  5882. }
  5883. fragments.push(this.makeCode(this.tab + '}'));
  5884. return fragments;
  5885. };
  5886. return Switch;
  5887. })(Base);
  5888. exports.If = If = (function(_super) {
  5889. __extends(If, _super);
  5890. function If(condition, body, options) {
  5891. this.body = body;
  5892. if (options == null) {
  5893. options = {};
  5894. }
  5895. this.condition = options.type === 'unless' ? condition.invert() : condition;
  5896. this.elseBody = null;
  5897. this.isChain = false;
  5898. this.soak = options.soak;
  5899. }
  5900. If.prototype.children = ['condition', 'body', 'elseBody'];
  5901. If.prototype.bodyNode = function() {
  5902. var _ref2;
  5903. return (_ref2 = this.body) != null ? _ref2.unwrap() : void 0;
  5904. };
  5905. If.prototype.elseBodyNode = function() {
  5906. var _ref2;
  5907. return (_ref2 = this.elseBody) != null ? _ref2.unwrap() : void 0;
  5908. };
  5909. If.prototype.addElse = function(elseBody) {
  5910. if (this.isChain) {
  5911. this.elseBodyNode().addElse(elseBody);
  5912. } else {
  5913. this.isChain = elseBody instanceof If;
  5914. this.elseBody = this.ensureBlock(elseBody);
  5915. this.elseBody.updateLocationDataIfMissing(elseBody.locationData);
  5916. }
  5917. return this;
  5918. };
  5919. If.prototype.isStatement = function(o) {
  5920. var _ref2;
  5921. return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref2 = this.elseBodyNode()) != null ? _ref2.isStatement(o) : void 0);
  5922. };
  5923. If.prototype.jumps = function(o) {
  5924. var _ref2;
  5925. return this.body.jumps(o) || ((_ref2 = this.elseBody) != null ? _ref2.jumps(o) : void 0);
  5926. };
  5927. If.prototype.compileNode = function(o) {
  5928. if (this.isStatement(o)) {
  5929. return this.compileStatement(o);
  5930. } else {
  5931. return this.compileExpression(o);
  5932. }
  5933. };
  5934. If.prototype.makeReturn = function(res) {
  5935. if (res) {
  5936. this.elseBody || (this.elseBody = new Block([new Literal('void 0')]));
  5937. }
  5938. this.body && (this.body = new Block([this.body.makeReturn(res)]));
  5939. this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)]));
  5940. return this;
  5941. };
  5942. If.prototype.ensureBlock = function(node) {
  5943. if (node instanceof Block) {
  5944. return node;
  5945. } else {
  5946. return new Block([node]);
  5947. }
  5948. };
  5949. If.prototype.compileStatement = function(o) {
  5950. var answer, body, child, cond, exeq, ifPart, indent;
  5951. child = del(o, 'chainChild');
  5952. exeq = del(o, 'isExistentialEquals');
  5953. if (exeq) {
  5954. return new If(this.condition.invert(), this.elseBodyNode(), {
  5955. type: 'if'
  5956. }).compileToFragments(o);
  5957. }
  5958. indent = o.indent + TAB;
  5959. cond = this.condition.compileToFragments(o, LEVEL_PAREN);
  5960. body = this.ensureBlock(this.body).compileToFragments(merge(o, {
  5961. indent: indent
  5962. }));
  5963. ifPart = [].concat(this.makeCode("if ("), cond, this.makeCode(") {\n"), body, this.makeCode("\n" + this.tab + "}"));
  5964. if (!child) {
  5965. ifPart.unshift(this.makeCode(this.tab));
  5966. }
  5967. if (!this.elseBody) {
  5968. return ifPart;
  5969. }
  5970. answer = ifPart.concat(this.makeCode(' else '));
  5971. if (this.isChain) {
  5972. o.chainChild = true;
  5973. answer = answer.concat(this.elseBody.unwrap().compileToFragments(o, LEVEL_TOP));
  5974. } else {
  5975. answer = answer.concat(this.makeCode("{\n"), this.elseBody.compileToFragments(merge(o, {
  5976. indent: indent
  5977. }), LEVEL_TOP), this.makeCode("\n" + this.tab + "}"));
  5978. }
  5979. return answer;
  5980. };
  5981. If.prototype.compileExpression = function(o) {
  5982. var alt, body, cond, fragments;
  5983. cond = this.condition.compileToFragments(o, LEVEL_COND);
  5984. body = this.bodyNode().compileToFragments(o, LEVEL_LIST);
  5985. alt = this.elseBodyNode() ? this.elseBodyNode().compileToFragments(o, LEVEL_LIST) : [this.makeCode('void 0')];
  5986. fragments = cond.concat(this.makeCode(" ? "), body, this.makeCode(" : "), alt);
  5987. if (o.level >= LEVEL_COND) {
  5988. return this.wrapInBraces(fragments);
  5989. } else {
  5990. return fragments;
  5991. }
  5992. };
  5993. If.prototype.unfoldSoak = function() {
  5994. return this.soak && this;
  5995. };
  5996. return If;
  5997. })(Base);
  5998. UTILITIES = {
  5999. "extends": function() {
  6000. return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }";
  6001. },
  6002. bind: function() {
  6003. return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }';
  6004. },
  6005. indexOf: function() {
  6006. return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }";
  6007. },
  6008. hasProp: function() {
  6009. return '{}.hasOwnProperty';
  6010. },
  6011. slice: function() {
  6012. return '[].slice';
  6013. }
  6014. };
  6015. LEVEL_TOP = 1;
  6016. LEVEL_PAREN = 2;
  6017. LEVEL_LIST = 3;
  6018. LEVEL_COND = 4;
  6019. LEVEL_OP = 5;
  6020. LEVEL_ACCESS = 6;
  6021. TAB = ' ';
  6022. IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
  6023. IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$");
  6024. SIMPLENUM = /^[+-]?\d+$/;
  6025. HEXNUM = /^[+-]?0x[\da-f]+/i;
  6026. NUMBER = /^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i;
  6027. METHOD_DEF = RegExp("^(" + IDENTIFIER_STR + ")(\\.prototype)?(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\])$");
  6028. IS_STRING = /^['"]/;
  6029. IS_REGEX = /^\//;
  6030. utility = function(name) {
  6031. var ref;
  6032. ref = "__" + name;
  6033. Scope.root.assign(ref, UTILITIES[name]());
  6034. return ref;
  6035. };
  6036. multident = function(code, tab) {
  6037. code = code.replace(/\n/g, '$&' + tab);
  6038. return code.replace(/\s+$/, '');
  6039. };
  6040. parseNum = function(x) {
  6041. if (x == null) {
  6042. return 0;
  6043. } else if (x.match(HEXNUM)) {
  6044. return parseInt(x, 16);
  6045. } else {
  6046. return parseFloat(x);
  6047. }
  6048. };
  6049. isLiteralArguments = function(node) {
  6050. return node instanceof Literal && node.value === 'arguments' && !node.asKey;
  6051. };
  6052. isLiteralThis = function(node) {
  6053. return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper);
  6054. };
  6055. unfoldSoak = function(o, parent, name) {
  6056. var ifn;
  6057. if (!(ifn = parent[name].unfoldSoak(o))) {
  6058. return;
  6059. }
  6060. parent[name] = ifn.body;
  6061. ifn.body = new Value(parent);
  6062. return ifn;
  6063. };
  6064. });
  6065. ace.define("ace/mode/coffee/coffee-script",["require","exports","module","ace/mode/coffee/lexer","ace/mode/coffee/parser","ace/mode/coffee/nodes"], function(require, exports, module) {
  6066. var Lexer = require("./lexer").Lexer;
  6067. var parser = require("./parser");
  6068. var lexer = new Lexer();
  6069. parser.lexer = {
  6070. lex: function() {
  6071. var tag, token;
  6072. token = this.tokens[this.pos++];
  6073. if (token) {
  6074. tag = token[0], this.yytext = token[1], this.yylloc = token[2];
  6075. this.yylineno = this.yylloc.first_line;
  6076. } else {
  6077. tag = '';
  6078. }
  6079. return tag;
  6080. },
  6081. setInput: function(tokens) {
  6082. this.tokens = tokens;
  6083. return this.pos = 0;
  6084. },
  6085. upcomingInput: function() {
  6086. return "";
  6087. }
  6088. };
  6089. parser.yy = require('./nodes');
  6090. exports.parse = function(code) {
  6091. return parser.parse(lexer.tokenize(code));
  6092. };
  6093. });
  6094. ace.define("ace/mode/coffee_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/coffee/coffee-script"], function(require, exports, module) {
  6095. "use strict";
  6096. var oop = require("../lib/oop");
  6097. var Mirror = require("../worker/mirror").Mirror;
  6098. var coffee = require("../mode/coffee/coffee-script");
  6099. window.addEventListener = function() {};
  6100. var Worker = exports.Worker = function(sender) {
  6101. Mirror.call(this, sender);
  6102. this.setTimeout(250);
  6103. };
  6104. oop.inherits(Worker, Mirror);
  6105. (function() {
  6106. this.onUpdate = function() {
  6107. var value = this.doc.getValue();
  6108. try {
  6109. coffee.parse(value).compile();
  6110. } catch(e) {
  6111. var loc = e.location;
  6112. if (loc) {
  6113. this.sender.emit("error", {
  6114. row: loc.first_line,
  6115. column: loc.first_column,
  6116. endRow: loc.last_line,
  6117. endColumn: loc.last_column,
  6118. text: e.message,
  6119. type: "error"
  6120. });
  6121. }
  6122. return;
  6123. }
  6124. this.sender.emit("ok");
  6125. };
  6126. }).call(Worker.prototype);
  6127. });
  6128. ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
  6129. function Empty() {}
  6130. if (!Function.prototype.bind) {
  6131. Function.prototype.bind = function bind(that) { // .length is 1
  6132. var target = this;
  6133. if (typeof target != "function") {
  6134. throw new TypeError("Function.prototype.bind called on incompatible " + target);
  6135. }
  6136. var args = slice.call(arguments, 1); // for normal call
  6137. var bound = function () {
  6138. if (this instanceof bound) {
  6139. var result = target.apply(
  6140. this,
  6141. args.concat(slice.call(arguments))
  6142. );
  6143. if (Object(result) === result) {
  6144. return result;
  6145. }
  6146. return this;
  6147. } else {
  6148. return target.apply(
  6149. that,
  6150. args.concat(slice.call(arguments))
  6151. );
  6152. }
  6153. };
  6154. if(target.prototype) {
  6155. Empty.prototype = target.prototype;
  6156. bound.prototype = new Empty();
  6157. Empty.prototype = null;
  6158. }
  6159. return bound;
  6160. };
  6161. }
  6162. var call = Function.prototype.call;
  6163. var prototypeOfArray = Array.prototype;
  6164. var prototypeOfObject = Object.prototype;
  6165. var slice = prototypeOfArray.slice;
  6166. var _toString = call.bind(prototypeOfObject.toString);
  6167. var owns = call.bind(prototypeOfObject.hasOwnProperty);
  6168. var defineGetter;
  6169. var defineSetter;
  6170. var lookupGetter;
  6171. var lookupSetter;
  6172. var supportsAccessors;
  6173. if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
  6174. defineGetter = call.bind(prototypeOfObject.__defineGetter__);
  6175. defineSetter = call.bind(prototypeOfObject.__defineSetter__);
  6176. lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
  6177. lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
  6178. }
  6179. if ([1,2].splice(0).length != 2) {
  6180. if(function() { // test IE < 9 to splice bug - see issue #138
  6181. function makeArray(l) {
  6182. var a = new Array(l+2);
  6183. a[0] = a[1] = 0;
  6184. return a;
  6185. }
  6186. var array = [], lengthBefore;
  6187. array.splice.apply(array, makeArray(20));
  6188. array.splice.apply(array, makeArray(26));
  6189. lengthBefore = array.length; //46
  6190. array.splice(5, 0, "XXX"); // add one element
  6191. lengthBefore + 1 == array.length
  6192. if (lengthBefore + 1 == array.length) {
  6193. return true;// has right splice implementation without bugs
  6194. }
  6195. }()) {//IE 6/7
  6196. var array_splice = Array.prototype.splice;
  6197. Array.prototype.splice = function(start, deleteCount) {
  6198. if (!arguments.length) {
  6199. return [];
  6200. } else {
  6201. return array_splice.apply(this, [
  6202. start === void 0 ? 0 : start,
  6203. deleteCount === void 0 ? (this.length - start) : deleteCount
  6204. ].concat(slice.call(arguments, 2)))
  6205. }
  6206. };
  6207. } else {//IE8
  6208. Array.prototype.splice = function(pos, removeCount){
  6209. var length = this.length;
  6210. if (pos > 0) {
  6211. if (pos > length)
  6212. pos = length;
  6213. } else if (pos == void 0) {
  6214. pos = 0;
  6215. } else if (pos < 0) {
  6216. pos = Math.max(length + pos, 0);
  6217. }
  6218. if (!(pos+removeCount < length))
  6219. removeCount = length - pos;
  6220. var removed = this.slice(pos, pos+removeCount);
  6221. var insert = slice.call(arguments, 2);
  6222. var add = insert.length;
  6223. if (pos === length) {
  6224. if (add) {
  6225. this.push.apply(this, insert);
  6226. }
  6227. } else {
  6228. var remove = Math.min(removeCount, length - pos);
  6229. var tailOldPos = pos + remove;
  6230. var tailNewPos = tailOldPos + add - remove;
  6231. var tailCount = length - tailOldPos;
  6232. var lengthAfterRemove = length - remove;
  6233. if (tailNewPos < tailOldPos) { // case A
  6234. for (var i = 0; i < tailCount; ++i) {
  6235. this[tailNewPos+i] = this[tailOldPos+i];
  6236. }
  6237. } else if (tailNewPos > tailOldPos) { // case B
  6238. for (i = tailCount; i--; ) {
  6239. this[tailNewPos+i] = this[tailOldPos+i];
  6240. }
  6241. } // else, add == remove (nothing to do)
  6242. if (add && pos === lengthAfterRemove) {
  6243. this.length = lengthAfterRemove; // truncate array
  6244. this.push.apply(this, insert);
  6245. } else {
  6246. this.length = lengthAfterRemove + add; // reserves space
  6247. for (i = 0; i < add; ++i) {
  6248. this[pos+i] = insert[i];
  6249. }
  6250. }
  6251. }
  6252. return removed;
  6253. };
  6254. }
  6255. }
  6256. if (!Array.isArray) {
  6257. Array.isArray = function isArray(obj) {
  6258. return _toString(obj) == "[object Array]";
  6259. };
  6260. }
  6261. var boxedString = Object("a"),
  6262. splitString = boxedString[0] != "a" || !(0 in boxedString);
  6263. if (!Array.prototype.forEach) {
  6264. Array.prototype.forEach = function forEach(fun /*, thisp*/) {
  6265. var object = toObject(this),
  6266. self = splitString && _toString(this) == "[object String]" ?
  6267. this.split("") :
  6268. object,
  6269. thisp = arguments[1],
  6270. i = -1,
  6271. length = self.length >>> 0;
  6272. if (_toString(fun) != "[object Function]") {
  6273. throw new TypeError(); // TODO message
  6274. }
  6275. while (++i < length) {
  6276. if (i in self) {
  6277. fun.call(thisp, self[i], i, object);
  6278. }
  6279. }
  6280. };
  6281. }
  6282. if (!Array.prototype.map) {
  6283. Array.prototype.map = function map(fun /*, thisp*/) {
  6284. var object = toObject(this),
  6285. self = splitString && _toString(this) == "[object String]" ?
  6286. this.split("") :
  6287. object,
  6288. length = self.length >>> 0,
  6289. result = Array(length),
  6290. thisp = arguments[1];
  6291. if (_toString(fun) != "[object Function]") {
  6292. throw new TypeError(fun + " is not a function");
  6293. }
  6294. for (var i = 0; i < length; i++) {
  6295. if (i in self)
  6296. result[i] = fun.call(thisp, self[i], i, object);
  6297. }
  6298. return result;
  6299. };
  6300. }
  6301. if (!Array.prototype.filter) {
  6302. Array.prototype.filter = function filter(fun /*, thisp */) {
  6303. var object = toObject(this),
  6304. self = splitString && _toString(this) == "[object String]" ?
  6305. this.split("") :
  6306. object,
  6307. length = self.length >>> 0,
  6308. result = [],
  6309. value,
  6310. thisp = arguments[1];
  6311. if (_toString(fun) != "[object Function]") {
  6312. throw new TypeError(fun + " is not a function");
  6313. }
  6314. for (var i = 0; i < length; i++) {
  6315. if (i in self) {
  6316. value = self[i];
  6317. if (fun.call(thisp, value, i, object)) {
  6318. result.push(value);
  6319. }
  6320. }
  6321. }
  6322. return result;
  6323. };
  6324. }
  6325. if (!Array.prototype.every) {
  6326. Array.prototype.every = function every(fun /*, thisp */) {
  6327. var object = toObject(this),
  6328. self = splitString && _toString(this) == "[object String]" ?
  6329. this.split("") :
  6330. object,
  6331. length = self.length >>> 0,
  6332. thisp = arguments[1];
  6333. if (_toString(fun) != "[object Function]") {
  6334. throw new TypeError(fun + " is not a function");
  6335. }
  6336. for (var i = 0; i < length; i++) {
  6337. if (i in self && !fun.call(thisp, self[i], i, object)) {
  6338. return false;
  6339. }
  6340. }
  6341. return true;
  6342. };
  6343. }
  6344. if (!Array.prototype.some) {
  6345. Array.prototype.some = function some(fun /*, thisp */) {
  6346. var object = toObject(this),
  6347. self = splitString && _toString(this) == "[object String]" ?
  6348. this.split("") :
  6349. object,
  6350. length = self.length >>> 0,
  6351. thisp = arguments[1];
  6352. if (_toString(fun) != "[object Function]") {
  6353. throw new TypeError(fun + " is not a function");
  6354. }
  6355. for (var i = 0; i < length; i++) {
  6356. if (i in self && fun.call(thisp, self[i], i, object)) {
  6357. return true;
  6358. }
  6359. }
  6360. return false;
  6361. };
  6362. }
  6363. if (!Array.prototype.reduce) {
  6364. Array.prototype.reduce = function reduce(fun /*, initial*/) {
  6365. var object = toObject(this),
  6366. self = splitString && _toString(this) == "[object String]" ?
  6367. this.split("") :
  6368. object,
  6369. length = self.length >>> 0;
  6370. if (_toString(fun) != "[object Function]") {
  6371. throw new TypeError(fun + " is not a function");
  6372. }
  6373. if (!length && arguments.length == 1) {
  6374. throw new TypeError("reduce of empty array with no initial value");
  6375. }
  6376. var i = 0;
  6377. var result;
  6378. if (arguments.length >= 2) {
  6379. result = arguments[1];
  6380. } else {
  6381. do {
  6382. if (i in self) {
  6383. result = self[i++];
  6384. break;
  6385. }
  6386. if (++i >= length) {
  6387. throw new TypeError("reduce of empty array with no initial value");
  6388. }
  6389. } while (true);
  6390. }
  6391. for (; i < length; i++) {
  6392. if (i in self) {
  6393. result = fun.call(void 0, result, self[i], i, object);
  6394. }
  6395. }
  6396. return result;
  6397. };
  6398. }
  6399. if (!Array.prototype.reduceRight) {
  6400. Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
  6401. var object = toObject(this),
  6402. self = splitString && _toString(this) == "[object String]" ?
  6403. this.split("") :
  6404. object,
  6405. length = self.length >>> 0;
  6406. if (_toString(fun) != "[object Function]") {
  6407. throw new TypeError(fun + " is not a function");
  6408. }
  6409. if (!length && arguments.length == 1) {
  6410. throw new TypeError("reduceRight of empty array with no initial value");
  6411. }
  6412. var result, i = length - 1;
  6413. if (arguments.length >= 2) {
  6414. result = arguments[1];
  6415. } else {
  6416. do {
  6417. if (i in self) {
  6418. result = self[i--];
  6419. break;
  6420. }
  6421. if (--i < 0) {
  6422. throw new TypeError("reduceRight of empty array with no initial value");
  6423. }
  6424. } while (true);
  6425. }
  6426. do {
  6427. if (i in this) {
  6428. result = fun.call(void 0, result, self[i], i, object);
  6429. }
  6430. } while (i--);
  6431. return result;
  6432. };
  6433. }
  6434. if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
  6435. Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
  6436. var self = splitString && _toString(this) == "[object String]" ?
  6437. this.split("") :
  6438. toObject(this),
  6439. length = self.length >>> 0;
  6440. if (!length) {
  6441. return -1;
  6442. }
  6443. var i = 0;
  6444. if (arguments.length > 1) {
  6445. i = toInteger(arguments[1]);
  6446. }
  6447. i = i >= 0 ? i : Math.max(0, length + i);
  6448. for (; i < length; i++) {
  6449. if (i in self && self[i] === sought) {
  6450. return i;
  6451. }
  6452. }
  6453. return -1;
  6454. };
  6455. }
  6456. if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
  6457. Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
  6458. var self = splitString && _toString(this) == "[object String]" ?
  6459. this.split("") :
  6460. toObject(this),
  6461. length = self.length >>> 0;
  6462. if (!length) {
  6463. return -1;
  6464. }
  6465. var i = length - 1;
  6466. if (arguments.length > 1) {
  6467. i = Math.min(i, toInteger(arguments[1]));
  6468. }
  6469. i = i >= 0 ? i : length - Math.abs(i);
  6470. for (; i >= 0; i--) {
  6471. if (i in self && sought === self[i]) {
  6472. return i;
  6473. }
  6474. }
  6475. return -1;
  6476. };
  6477. }
  6478. if (!Object.getPrototypeOf) {
  6479. Object.getPrototypeOf = function getPrototypeOf(object) {
  6480. return object.__proto__ || (
  6481. object.constructor ?
  6482. object.constructor.prototype :
  6483. prototypeOfObject
  6484. );
  6485. };
  6486. }
  6487. if (!Object.getOwnPropertyDescriptor) {
  6488. var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
  6489. "non-object: ";
  6490. Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
  6491. if ((typeof object != "object" && typeof object != "function") || object === null)
  6492. throw new TypeError(ERR_NON_OBJECT + object);
  6493. if (!owns(object, property))
  6494. return;
  6495. var descriptor, getter, setter;
  6496. descriptor = { enumerable: true, configurable: true };
  6497. if (supportsAccessors) {
  6498. var prototype = object.__proto__;
  6499. object.__proto__ = prototypeOfObject;
  6500. var getter = lookupGetter(object, property);
  6501. var setter = lookupSetter(object, property);
  6502. object.__proto__ = prototype;
  6503. if (getter || setter) {
  6504. if (getter) descriptor.get = getter;
  6505. if (setter) descriptor.set = setter;
  6506. return descriptor;
  6507. }
  6508. }
  6509. descriptor.value = object[property];
  6510. return descriptor;
  6511. };
  6512. }
  6513. if (!Object.getOwnPropertyNames) {
  6514. Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
  6515. return Object.keys(object);
  6516. };
  6517. }
  6518. if (!Object.create) {
  6519. var createEmpty;
  6520. if (Object.prototype.__proto__ === null) {
  6521. createEmpty = function () {
  6522. return { "__proto__": null };
  6523. };
  6524. } else {
  6525. createEmpty = function () {
  6526. var empty = {};
  6527. for (var i in empty)
  6528. empty[i] = null;
  6529. empty.constructor =
  6530. empty.hasOwnProperty =
  6531. empty.propertyIsEnumerable =
  6532. empty.isPrototypeOf =
  6533. empty.toLocaleString =
  6534. empty.toString =
  6535. empty.valueOf =
  6536. empty.__proto__ = null;
  6537. return empty;
  6538. }
  6539. }
  6540. Object.create = function create(prototype, properties) {
  6541. var object;
  6542. if (prototype === null) {
  6543. object = createEmpty();
  6544. } else {
  6545. if (typeof prototype != "object")
  6546. throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
  6547. var Type = function () {};
  6548. Type.prototype = prototype;
  6549. object = new Type();
  6550. object.__proto__ = prototype;
  6551. }
  6552. if (properties !== void 0)
  6553. Object.defineProperties(object, properties);
  6554. return object;
  6555. };
  6556. }
  6557. function doesDefinePropertyWork(object) {
  6558. try {
  6559. Object.defineProperty(object, "sentinel", {});
  6560. return "sentinel" in object;
  6561. } catch (exception) {
  6562. }
  6563. }
  6564. if (Object.defineProperty) {
  6565. var definePropertyWorksOnObject = doesDefinePropertyWork({});
  6566. var definePropertyWorksOnDom = typeof document == "undefined" ||
  6567. doesDefinePropertyWork(document.createElement("div"));
  6568. if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
  6569. var definePropertyFallback = Object.defineProperty;
  6570. }
  6571. }
  6572. if (!Object.defineProperty || definePropertyFallback) {
  6573. var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
  6574. var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
  6575. var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
  6576. "on this javascript engine";
  6577. Object.defineProperty = function defineProperty(object, property, descriptor) {
  6578. if ((typeof object != "object" && typeof object != "function") || object === null)
  6579. throw new TypeError(ERR_NON_OBJECT_TARGET + object);
  6580. if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
  6581. throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
  6582. if (definePropertyFallback) {
  6583. try {
  6584. return definePropertyFallback.call(Object, object, property, descriptor);
  6585. } catch (exception) {
  6586. }
  6587. }
  6588. if (owns(descriptor, "value")) {
  6589. if (supportsAccessors && (lookupGetter(object, property) ||
  6590. lookupSetter(object, property)))
  6591. {
  6592. var prototype = object.__proto__;
  6593. object.__proto__ = prototypeOfObject;
  6594. delete object[property];
  6595. object[property] = descriptor.value;
  6596. object.__proto__ = prototype;
  6597. } else {
  6598. object[property] = descriptor.value;
  6599. }
  6600. } else {
  6601. if (!supportsAccessors)
  6602. throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
  6603. if (owns(descriptor, "get"))
  6604. defineGetter(object, property, descriptor.get);
  6605. if (owns(descriptor, "set"))
  6606. defineSetter(object, property, descriptor.set);
  6607. }
  6608. return object;
  6609. };
  6610. }
  6611. if (!Object.defineProperties) {
  6612. Object.defineProperties = function defineProperties(object, properties) {
  6613. for (var property in properties) {
  6614. if (owns(properties, property))
  6615. Object.defineProperty(object, property, properties[property]);
  6616. }
  6617. return object;
  6618. };
  6619. }
  6620. if (!Object.seal) {
  6621. Object.seal = function seal(object) {
  6622. return object;
  6623. };
  6624. }
  6625. if (!Object.freeze) {
  6626. Object.freeze = function freeze(object) {
  6627. return object;
  6628. };
  6629. }
  6630. try {
  6631. Object.freeze(function () {});
  6632. } catch (exception) {
  6633. Object.freeze = (function freeze(freezeObject) {
  6634. return function freeze(object) {
  6635. if (typeof object == "function") {
  6636. return object;
  6637. } else {
  6638. return freezeObject(object);
  6639. }
  6640. };
  6641. })(Object.freeze);
  6642. }
  6643. if (!Object.preventExtensions) {
  6644. Object.preventExtensions = function preventExtensions(object) {
  6645. return object;
  6646. };
  6647. }
  6648. if (!Object.isSealed) {
  6649. Object.isSealed = function isSealed(object) {
  6650. return false;
  6651. };
  6652. }
  6653. if (!Object.isFrozen) {
  6654. Object.isFrozen = function isFrozen(object) {
  6655. return false;
  6656. };
  6657. }
  6658. if (!Object.isExtensible) {
  6659. Object.isExtensible = function isExtensible(object) {
  6660. if (Object(object) === object) {
  6661. throw new TypeError(); // TODO message
  6662. }
  6663. var name = '';
  6664. while (owns(object, name)) {
  6665. name += '?';
  6666. }
  6667. object[name] = true;
  6668. var returnValue = owns(object, name);
  6669. delete object[name];
  6670. return returnValue;
  6671. };
  6672. }
  6673. if (!Object.keys) {
  6674. var hasDontEnumBug = true,
  6675. dontEnums = [
  6676. "toString",
  6677. "toLocaleString",
  6678. "valueOf",
  6679. "hasOwnProperty",
  6680. "isPrototypeOf",
  6681. "propertyIsEnumerable",
  6682. "constructor"
  6683. ],
  6684. dontEnumsLength = dontEnums.length;
  6685. for (var key in {"toString": null}) {
  6686. hasDontEnumBug = false;
  6687. }
  6688. Object.keys = function keys(object) {
  6689. if (
  6690. (typeof object != "object" && typeof object != "function") ||
  6691. object === null
  6692. ) {
  6693. throw new TypeError("Object.keys called on a non-object");
  6694. }
  6695. var keys = [];
  6696. for (var name in object) {
  6697. if (owns(object, name)) {
  6698. keys.push(name);
  6699. }
  6700. }
  6701. if (hasDontEnumBug) {
  6702. for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
  6703. var dontEnum = dontEnums[i];
  6704. if (owns(object, dontEnum)) {
  6705. keys.push(dontEnum);
  6706. }
  6707. }
  6708. }
  6709. return keys;
  6710. };
  6711. }
  6712. if (!Date.now) {
  6713. Date.now = function now() {
  6714. return new Date().getTime();
  6715. };
  6716. }
  6717. var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
  6718. "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
  6719. "\u2029\uFEFF";
  6720. if (!String.prototype.trim || ws.trim()) {
  6721. ws = "[" + ws + "]";
  6722. var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
  6723. trimEndRegexp = new RegExp(ws + ws + "*$");
  6724. String.prototype.trim = function trim() {
  6725. return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
  6726. };
  6727. }
  6728. function toInteger(n) {
  6729. n = +n;
  6730. if (n !== n) { // isNaN
  6731. n = 0;
  6732. } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
  6733. n = (n > 0 || -1) * Math.floor(Math.abs(n));
  6734. }
  6735. return n;
  6736. }
  6737. function isPrimitive(input) {
  6738. var type = typeof input;
  6739. return (
  6740. input === null ||
  6741. type === "undefined" ||
  6742. type === "boolean" ||
  6743. type === "number" ||
  6744. type === "string"
  6745. );
  6746. }
  6747. function toPrimitive(input) {
  6748. var val, valueOf, toString;
  6749. if (isPrimitive(input)) {
  6750. return input;
  6751. }
  6752. valueOf = input.valueOf;
  6753. if (typeof valueOf === "function") {
  6754. val = valueOf.call(input);
  6755. if (isPrimitive(val)) {
  6756. return val;
  6757. }
  6758. }
  6759. toString = input.toString;
  6760. if (typeof toString === "function") {
  6761. val = toString.call(input);
  6762. if (isPrimitive(val)) {
  6763. return val;
  6764. }
  6765. }
  6766. throw new TypeError();
  6767. }
  6768. var toObject = function (o) {
  6769. if (o == null) { // this matches both null and undefined
  6770. throw new TypeError("can't convert "+o+" to object");
  6771. }
  6772. return Object(o);
  6773. };
  6774. });