123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303 |
- function arrayUnique(a) {
- for (var i = 0; i < a.length; ++i) {
- for (var j = i + 1; j < a.length; ++j) {
- if (a[i] === a[j])
- a.splice(j--, 1);
- }
- }
- return a;
- }
- function arrayUniqueNewArray(a) {
- a = a.slice();
- arrayUnique(a);
- return a;
- }
- function arrayShuffle(a) {
- for (let i = 0; i < a.length; i++) {
- let pos = Math.floor(Math.random() * (a.length - i)) + i;
- let temp = a[i];
- a[i] = a[pos];
- a[pos] = temp;
- }
- }
- function arrayShuffleNewArray(a) {
- let nA = a.slice();
- arrayShuffle(nA);
- return nA;
- }
- class StoredVariable {
- constructor(options) {
- this.id = options.id;
- this.value = options.value;
- this.defValue = this.value;
- StoredVariable.registerVariable(this);
- }
- reset() {
- this.value = this.defValue;
- }
- updateFromObject(obj) {
- this.value = obj;
- }
- exportAsObject() {
- return this.value;
- }
- static registerVariable(variable) {
- if (StoredVariable.storedVariables[variable.id] == undefined) {
- StoredVariable.storedVariables[variable.id] = variable;
- }
- else {
- console.warn("[StoredVariable] " + variable.id + " already defined. Ignoring:", variable);
- }
- }
- static getVariable(id) {
- return StoredVariable.storedVariables[id];
- }
- static getVariables() {
- let list = [];
- for (let key in StoredVariable.storedVariables) {
- list.push(StoredVariable.storedVariables[key]);
- }
- return list;
- }
- static exportAsObject() {
- let list = {};
- for (let key in StoredVariable.storedVariables) {
- list[key] = StoredVariable.storedVariables[key].value;
- }
- return list;
- }
- static updateFromObject(obj) {
- for (let key in StoredVariable.storedVariables) {
- if (obj[key] != undefined) {
- StoredVariable.storedVariables[key].updateFromObject(obj[key]);
- }
- else {
- StoredVariable.storedVariables[key].reset();
- }
- }
- }
- }
- StoredVariable.storedVariables = {};
- class RulebookRunner {
- constructor(rulebook, noun) {
- this.rulesToExecute = [];
- this.ruleRunner = -1;
- this.rulebook = rulebook;
- this.noun = noun;
- }
- addRulebooks(...rulebooks) {
- rulebooks = arrayUniqueNewArray(rulebooks);
- rulebooks.forEach((rulebook) => {
- this.addRules(...rulebook.rules);
- });
- }
- addRules(...rules) {
- if (this.ruleRunner < 0) {
- this.rulesToExecute.push(...rules);
- }
- }
- skipRule(rule) {
- if (this.ruleRunner >= 0) {
- let index = this.rulesToExecute.indexOf(rule);
- if (index > this.ruleRunner) {
- this.rulesToExecute.splice(index, 1);
- console.debug("[Rulebook]" + this.rulebook.name + ", skipping Rule " + rule.name + " due to request.");
- }
- else {
- console.warn("[Rulebook]" + this.rulebook.name + ": uname to skip Rule" + rule.name + " due to it being too late to stop it.");
- }
- }
- }
- async execute() {
- arrayUnique(this.rulesToExecute).sort(function (a, b) {
- return a.compareTo(b);
- });
- for (this.ruleRunner = 0; this.ruleRunner < this.rulesToExecute.length; this.ruleRunner++) {
- this.rule = this.rulesToExecute[this.ruleRunner];
- let result = await this.rule.execute(this);
- if (result != undefined) {
- return result;
- }
- }
- }
- }
- class Rulebook {
- constructor(name) {
- this.rules = [];
- this.name = name;
- }
- static getStack() {
- let stack = [];
- Rulebook.rulebookStack.forEach((rl) => {
- if (rl instanceof Object && rl.name != undefined) {
- stack.push(rl.name);
- }
- else if (typeof rl == "string") {
- stack.push(rl);
- }
- else if (rl instanceof Object && rl.id != undefined) {
- stack.push(rl.id);
- }
- else {
- stack.push("Undefined");
- }
- });
- return stack;
- }
- static getIndentation() {
- return " ".repeat(Rulebook.indentantionSpaces).repeat(Rulebook.rulebookStack.length);
- }
- static increaseIndentation(rulebook) {
- Rulebook.rulebookStack.push(rulebook);
- }
- static decreaseIndentation() {
- Rulebook.rulebookStack.pop();
- }
- static isRunning(r) {
- return Rulebook.rulebookStack.indexOf(r) != -1;
- }
- isRunning() {
- return Rulebook.isRunning(this);
- }
- async execute(options, ...rulebooks) {
- options = options == undefined ? {} : options;
- let runner = new RulebookRunner(this, options.noun);
- runner.addRulebooks(this, ...rulebooks);
- var names = [];
- for (let i = 0; i < rulebooks.length; i++) {
- if (rulebooks[i] === this)
- continue;
- names.push(rulebooks[i].name);
- }
- console.debug(Rulebook.getIndentation() + "[RULEBOOK] " + this.name + (names.length > 0 ? (" merged with " + names.join(", ")) : ""));
- Rulebook.increaseIndentation(this);
- let result = await runner.execute();
- Rulebook.decreaseIndentation();
- return result;
- }
- createAndAddRule(r) {
- let rule = new Rule(r);
- this.addRule(rule);
- return rule;
- }
- addRule(r) {
- this.rules.push(r);
- }
- sortRules() {
- this.rules.sort(function (a, b) {
- return a.compareTo(b);
- });
- }
- }
- Rulebook.indentantionSpaces = 2;
- Rulebook.rulebookStack = [];
- var Settings;
- (function (Settings) {
- var debug = console.debug;
- var debugEmpty = () => { };
- Settings.hardDebug = false;
- Settings.sayTurnTime = true;
- function setDebug(isDebug) {
- if (isDebug) {
- console.debug = debug;
- }
- else {
- console.debug = debugEmpty;
- }
- }
- Settings.setDebug = setDebug;
- function isDebug() {
- return console.debug == debug;
- }
- Settings.isDebug = isDebug;
- function setHardDebug(isHardDebug) {
- Settings.hardDebug = isHardDebug;
- }
- Settings.setHardDebug = setHardDebug;
- })(Settings || (Settings = {}));
- class Rule {
- constructor(options) {
- this._priority = 0;
- this.firstPriority = 0;
- this.priority = options.priority != undefined ? options.priority : Rule.PRIORITY_MEDIUM;
- this.firstPriority = options.firstPriority != undefined ? options.firstPriority : Rule.PRIORITY_MEDIUM;
- this.name = options.name;
- this.code = options.code;
- this.createdWhere = (new Error());
- this.conditions = options.conditions != undefined ? options.conditions : () => { return true; };
- }
- async execute(rulebook) {
- if (!this.conditions(rulebook)) {
- return;
- }
- console.debug(Rulebook.getIndentation() + "[RULE] " + this.name);
- Settings.hardDebug && console.debug(this.name, this.createdWhere);
- Rulebook.increaseIndentation(this);
- rulebook.rule = this;
- let result = this.code(rulebook);
- if (result instanceof Promise) {
- result = await result;
- }
- if (result != undefined) {
- console.debug(Rulebook.getIndentation() + "Result:", result);
- }
- Rulebook.decreaseIndentation();
- return result;
- }
- get priority() {
- return this._priority;
- }
- set priority(value) {
- this._priority = value;
- }
- compareTo(b) {
- var a = this;
- if (b.firstPriority < a.firstPriority)
- return -1;
- if (a.firstPriority < b.firstPriority)
- return 1;
- if (b.priority < a.priority)
- return -1;
- if (a.priority < b.priority)
- return 1;
- return 0;
- }
- }
- Rule.PRIORITY_HIGHEST = 20;
- Rule.PRIORITY_HIGH = 15;
- Rule.PRIORITY_MEDIUM = 10;
- Rule.PRIORITY_LOW = 5;
- Rule.PRIORITY_LOWEST = 0;
- var TurnSequence;
- (function (TurnSequence) {
- TurnSequence.rulebook = new Rulebook("Turn Sequence");
- TurnSequence.playerActions = [];
- TurnSequence.lastTurnTime = 0;
- async function execute(action) {
- if (TurnSequence.playerActions.push(action) == 1) {
- let t0 = performance.now();
- console.debug(Rulebook.getIndentation() + " Player Action: " + (action ? action.getCommandText() : "none"));
- await TurnSequence.rulebook.execute({
- noun: action
- });
- TurnSequence.playerActions = [];
- let t1 = performance.now();
- TurnSequence.lastTurnTime = t1 - t0;
- console.debug("Total: " + (t1 - t0) + " milliseconds.");
- if (Settings.sayTurnTime) {
- Elements.CurrentTurnHandler.printAsContent(new Say(new SayBold("Time taken for turn: "), (t1 - t0), " milliseconds."));
- }
- }
- }
- TurnSequence.execute = execute;
- TurnSequence.PrepareElementsRule = new Rule({
- firstPriority: Rule.PRIORITY_HIGHEST,
- priority: Rule.PRIORITY_MEDIUM,
- name: "Begin Turn (Elements Side)",
- code: function (runner) {
- Elements.CurrentTurnHandler.startTurn(runner.noun);
- }
- });
- TurnSequence.rulebook.addRule(TurnSequence.PrepareElementsRule);
- TurnSequence.PlayerActionRule = new Rule({
- firstPriority: Rule.PRIORITY_HIGH,
- priority: Rule.PRIORITY_MEDIUM,
- name: "Do Player Action",
- code: async (rulebook) => {
- let playerAction = rulebook.noun;
- if (playerAction != undefined) {
- let promise = playerAction.execute();
- await promise;
- Elements.CurrentTurnHandler.printAsContent(playerAction.say);
- if (playerAction.requiresTurn) {
- WorldState.incrementPlayerTurn();
- }
- }
- }
- });
- TurnSequence.rulebook.addRule(TurnSequence.PlayerActionRule);
- TurnSequence.RunEveryTurnRulesRule = new Rule({
- firstPriority: Rule.PRIORITY_MEDIUM,
- priority: Rule.PRIORITY_MEDIUM,
- name: "Run Every Turn Rules",
- code: async function () {
- while (WorldState.isTurnWaiting()) {
- await EveryTurn.EveryTurn.execute({});
- }
- }
- });
- TurnSequence.rulebook.addRule(TurnSequence.RunEveryTurnRulesRule);
- TurnSequence.RemoveTurnFromElementsRule = new Rule({
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_MEDIUM,
- name: "End Turn (Elements/Controls Side)",
- code: async function (rulebook) {
- Elements.CurrentTurnHandler.endTurn();
- Controls.KeyHandler.reset();
- await Elements.HyperlinkHandler.hyperlinkCommonActions();
- await Elements.RoomHandler.updateRoom();
- await Elements.RememberedHandler.updateMap();
- let playerAction = rulebook.noun;
- if (playerAction) {
- await Elements.HyperlinkHandler.hyperlinkObject(playerAction.getNoun(0));
- }
- else {
- await Elements.HyperlinkHandler.hyperlinkObject();
- }
- await Elements.InventoryHandler.updateInventory();
- await Elements.AppearanceHandler.updateAppearance();
- }
- });
- TurnSequence.rulebook.addRule(TurnSequence.RemoveTurnFromElementsRule);
- })(TurnSequence || (TurnSequence = {}));
- var Version;
- (function (Version) {
- Version.currentVersion = [0, 1, 0];
- function compareVersion(v1, v2) {
- if (v1[0] < v2[0])
- return -1;
- else if (v1[0] > v2[0])
- return 1;
- if (v1[1] < v2[1])
- return -1;
- else if (v1[1] > v2[1])
- return 1;
- if (v1[2] < v2[2])
- return -1;
- else if (v1[2] > v2[2])
- return 1;
- return 0;
- }
- Version.compareVersion = compareVersion;
- function getCurrentVersion() {
- let v = Version.currentVersion;
- return v[0] + "." + v[1] + "." + v[2];
- }
- Version.getCurrentVersion = getCurrentVersion;
- document.title = document.title + " [" + getCurrentVersion() + "] ";
- })(Version || (Version = {}));
- var Controls;
- (function (Controls) {
- var Memory;
- (function (Memory) {
- let versionSet = false;
- let settingsVersion = Version.currentVersion;
- let versionId = "Version";
- let memoryPrefix = "obelisk_";
- let memories = {};
- function getValue(id, defValue) {
- let storage = localStorage.getItem(memoryPrefix + id);
- return storage == undefined ? defValue : JSON.parse(storage);
- }
- Memory.getValue = getValue;
- function setValue(id, value) {
- localStorage.setItem(memoryPrefix + id, JSON.stringify(value));
- if (!versionSet) {
- versionSet = true;
- settingsVersion = getValue(versionId, Version.currentVersion);
- setValue(versionId, Version.currentVersion);
- }
- if (settingsVersion == undefined) { }
- }
- Memory.setValue = setValue;
- function registerMemory(mem) {
- if (memories[mem.getId()] != undefined) {
- console.error("[Controls.Memory] Memory already registered on id " + mem.getId(), "Old:", memories[mem.getId()], "New:", mem);
- }
- else {
- memories[mem.getId()] = mem;
- mem.setValueFromLocalStorageDoNotInvoke(getValue(mem.getId(), mem.getValue()));
- let updateF = () => {
- Controls.Memory.setValue(mem.getId(), mem.getValue());
- };
- mem.addListener(updateF);
- updateF();
- }
- }
- Memory.registerMemory = registerMemory;
- })(Memory = Controls.Memory || (Controls.Memory = {}));
- })(Controls || (Controls = {}));
- class StoredMemory {
- constructor(id, value) {
- this.listeners = [];
- this.id = id;
- this.value = value;
- Controls.Memory.registerMemory(this);
- }
- setValueFromLocalStorageDoNotInvoke(value) {
- this.value = value;
- }
- storeValue(value) {
- if (JSON.stringify(value) !== JSON.stringify(this.value)) {
- this.value = value;
- this.triggerListeners();
- }
- }
- getValue() {
- return this.value;
- }
- getId() {
- return this.id;
- }
- addListener(listener) {
- this.listeners.push(listener);
- }
- triggerListeners() {
- for (var i = 0; i < this.listeners.length; i++) {
- this.listeners[i](this);
- }
- }
- }
- var SaveHandler;
- (function (SaveHandler) {
- let saveName = "Obelisk_Save";
- let saveExtension = "obsav";
- let storagePrefix = "save_";
- let saveSlot = 0;
- let errors = [];
- let erasing = false;
- let virgin = new StoredMemory("First time saving", true);
- SaveHandler.AfterLoad = new Rulebook("After loading");
- async function readFile() {
- let element = document.createElement("input");
- element.type = "file";
- element.accept = "." + saveExtension;
- let promise = new Promise((resolve, reject) => {
- element.onchange = () => {
- if (element.files.length == 0) {
- resolve(undefined);
- }
- else {
- var fr = new FileReader();
- fr.onload = (ev) => {
- resolve(ev.target['result']);
- };
- fr.readAsText(element.files[0]);
- }
- };
- });
- element.click();
- return promise;
- }
- SaveHandler.readFile = readFile;
- function download(filename, text) {
- var element = document.createElement('a');
- element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
- element.setAttribute('download', filename);
- element.style.display = 'none';
- document.body.appendChild(element);
- element.click();
- document.body.removeChild(element);
- }
- function loadSave() {
- let input = document.createElement("input");
- input.type = "file";
- input.accept = "." + saveExtension;
- document.body.appendChild(input);
- input.addEventListener("change", () => {
- let reader = new FileReader();
- reader.onload = () => {
- let text = reader.result;
- SaveHandler.loadGame(JSON.parse(text));
- };
- reader.readAsText(input.files[0]);
- });
- input.click();
- document.body.removeChild(input);
- }
- SaveHandler.loadSave = loadSave;
- function getItem(thing) {
- let item;
- if (thing.Unique) {
- item = Thing.getUnique(thing.Name);
- }
- else {
- let items = Thing.getNonUnique(thing.Name);
- if (items.length > 0) {
- item = items[0];
- }
- if (item == undefined) {
- let error = thing.Name + " no longer exists.";
- console.error("[SaveHandler] " + error);
- errors.push(error);
- return undefined;
- }
- else {
- item = item.clone(true);
- }
- }
- item.setChanges(thing.Changes);
- return item;
- }
- function loadGame(saveStruc) {
- let player = WorldState.player;
- StoredVariable.updateFromObject(saveStruc.Variables);
- WorldState.setCurrentTurn(saveStruc.Rounds);
- Thing.WearRelation.getRight(player).forEach((thing) => {
- Thing.WearRelation.unsetRight(thing);
- });
- Thing.WieldRelation.getRight(player).forEach((thing) => {
- Thing.WieldRelation.unsetRight(thing);
- });
- Thing.CarryRelation.getRight(player).forEach((thing) => {
- Thing.CarryRelation.unsetRight(thing);
- });
- saveStruc.Wielded.forEach((thing) => {
- let item = getItem(thing);
- if (item != undefined)
- WorldState.player.setWielded(item);
- });
- saveStruc.Worn.forEach((thing) => {
- let item = getItem(thing);
- if (item != undefined)
- WorldState.player.setWorn(item);
- });
- saveStruc.Carried.forEach((thing) => {
- let item = getItem(thing);
- if (item != undefined)
- WorldState.player.setCarried(item);
- });
- let savedPlayer = saveStruc.Player;
- player.setName(savedPlayer.Name);
- player.setChanges(savedPlayer.PlayerChanges);
- savedPlayer.Parts.forEach((part) => {
- let bpList = player.getPartsByName(part.Name);
- if (bpList != undefined) {
- bpList[0].setChanges(part.Changes);
- }
- });
- saveStruc.UniqueThings.forEach((savedThing) => {
- let thing = Thing.getUnique(savedThing.Name);
- if (thing != undefined) {
- thing.setChanges(savedThing.Changes);
- }
- });
- }
- SaveHandler.loadGame = loadGame;
- function exportPlayer() {
- return {
- Name: WorldState.player.getName(),
- PlayerChanges: WorldState.player.getChanges(),
- Parts: exportThings(WorldState.player.getParts())
- };
- }
- function exportThings(arr, changedOnly) {
- let obj = [];
- for (let i = 0; i < arr.length; i++) {
- let thing = arr[i];
- let savedThing = {
- Unique: thing.isUnique(),
- Name: thing.getName(),
- Changes: thing.getChanges()
- };
- if (!changedOnly || Object.keys(savedThing.Changes).length > 0) {
- obj.push(savedThing);
- }
- }
- return obj;
- }
- SaveHandler.exportThings = exportThings;
- function getSaveStructure() {
- let variables = StoredVariable.getVariables();
- let savedVariables = {};
- for (let i = 0; i < variables.length; i++) {
- savedVariables[variables[i].id] = variables[i].exportAsObject();
- }
- let wielded = Thing.WieldRelation.getRight(WorldState.player);
- let worn = Thing.WearRelation.getRight(WorldState.player);
- let carried = Thing.CarryRelation.getRight(WorldState.player);
- let saveStruc = {
- Variables: savedVariables,
- UniqueThings: exportThings(Thing.getUniques()),
- Wielded: exportThings(wielded),
- Worn: exportThings(worn),
- Carried: exportThings(carried),
- Player: exportPlayer(),
- Rounds: WorldState.getCurrentTurn(),
- Date: new Date().toLocaleString()
- };
- console.debug("[SaveHandler] Created Save Structure", saveStruc);
- return saveStruc;
- }
- SaveHandler.getSaveStructure = getSaveStructure;
- function setSlot(slotN) {
- saveSlot = slotN;
- }
- SaveHandler.setSlot = setSlot;
- function saveToStorage() {
- Controls.Memory.setValue(storagePrefix + saveSlot, getSaveStructure());
- }
- SaveHandler.saveToStorage = saveToStorage;
- async function loadFromStorage() {
- if (!erasing) {
- let saveStruct = (Controls.Memory.getValue(storagePrefix + saveSlot, undefined));
- if (saveStruct != undefined) {
- loadGame(saveStruct);
- return await SaveHandler.AfterLoad.execute({ noun: saveStruct });
- }
- }
- await CharacterCreation.rulebook.execute({});
- }
- SaveHandler.loadFromStorage = loadFromStorage;
- async function loadFromFile() {
- PlayBegins.LOAD_FAILED = false;
- let promise = readFile();
- let finishedAny;
- let realPromise = new Promise((resolve) => {
- finishedAny = resolve;
- });
- let say = new Say("No save file was loaded.", Say.PARAGRAPH_BREAK, Say.CENTERED, new SayBold("Press any key to return."));
- let sayElements = await Elements.CurrentTurnHandler.getSayElementsAsContent(say);
- Elements.CurrentTurnHandler.print(...sayElements);
- let nextKey = Controls.KeyHandler.getNextKey();
- promise.then((file) => {
- Controls.KeyHandler.stopGivingNextKey(nextKey);
- Elements.CurrentTurnHandler.unprint(...sayElements);
- loadGame(getFromFile(file));
- finishedAny();
- });
- nextKey.then((keyCode) => {
- PlayBegins.LOAD_FAILED = true;
- finishedAny();
- });
- await realPromise;
- }
- SaveHandler.loadFromFile = loadFromFile;
- function getSayForSlot(slotNumber) {
- let saveStruct = (Controls.Memory.getValue(storagePrefix + slotNumber, undefined));
- if (saveStruct == undefined) {
- return new Say("New Game");
- }
- else {
- let erasingText = erasing ? "(ERASE) - " : "";
- return new Say(erasingText, saveStruct.Player.Name + " - Turns: " + saveStruct.Rounds + " - Last Played: " + saveStruct.Date);
- }
- }
- SaveHandler.getSayForSlot = getSayForSlot;
- function getFromFile(saveText) {
- return JSON.parse(decodeURIComponent(atob(saveText)));
- }
- SaveHandler.getFromFile = getFromFile;
- function saveToFile() {
- download(saveName + "." + saveExtension, btoa(unescape(encodeURIComponent((JSON.stringify(getSaveStructure()))))));
- }
- SaveHandler.saveToFile = saveToFile;
- function isErasing() {
- return erasing;
- }
- SaveHandler.isErasing = isErasing;
- function toggleErasing() {
- erasing = !erasing;
- }
- SaveHandler.toggleErasing = toggleErasing;
- function isVirgin() {
- let was = virgin.getValue();
- virgin.storeValue(false);
- return was;
- }
- SaveHandler.isVirgin = isVirgin;
- })(SaveHandler || (SaveHandler = {}));
- TurnSequence.rulebook.createAndAddRule({
- name: "Save game to Storage",
- priority: Rule.PRIORITY_LOWEST,
- firstPriority: Rule.PRIORITY_LOWEST,
- code: () => {
- SaveHandler.saveToStorage();
- }
- });
- class CharacterOrigin {
- constructor(id) {
- this.confirmPicked = () => { };
- this.id = id;
- CharacterOrigin.storeOrigin(this);
- }
- static storeOrigin(origin) {
- CharacterOrigin.origins[origin.id] = origin;
- }
- static getOrigin(id) {
- return CharacterOrigin.origins[id];
- }
- static getOrigins() {
- let origins = [];
- for (let id in CharacterOrigin.origins) {
- origins.push(CharacterOrigin.origins[id]);
- }
- origins.sort((a, b) => {
- let na = a.name.toUpperCase();
- let nb = b.name.toUpperCase();
- if (na < nb)
- return -1;
- if (na > nb)
- return 1;
- return 0;
- });
- return origins;
- }
- }
- CharacterOrigin.origins = {};
- var CharacterCreation;
- (function (CharacterCreation) {
- CharacterCreation.ChampionOrigin = new CharacterOrigin("Champion");
- CharacterCreation.ChampionOrigin.name = "Champion";
- CharacterCreation.ChampionOrigin.description = "You were born in the small village of Southwood in the post-Tower world. Chosen by the village elder, you were trained relentlessly as soon as you became able to walk. Your mission: get to the Tower and find a way to destroy it. Unbeknownst to you, this is little more than a sacrifice ritual and you are just it's latest victim. The village doesn't actually expect you to succeed, you are merely a gift to the Tower, so that it will not destroy Southwood.";
- CharacterCreation.ChampionOrigin.bonusStats = "This origin grants a +1 Bonus to every attribute, but you will be stuck with some perks gained through your training.";
- CharacterCreation.ChampionOrigin.confirmPicked = () => {
- let player = WorldState.player;
- function increaseStat(attr) {
- player.setStat(attr, player.getStat(attr) + 1);
- }
- increaseStat(Attributes.Strength);
- increaseStat(Attributes.Charm);
- increaseStat(Attributes.Agility);
- increaseStat(Attributes.Intelligence);
- };
- })(CharacterCreation || (CharacterCreation = {}));
- var CharacterCreation;
- (function (CharacterCreation) {
- CharacterCreation.PlayerOrigin = new StoredVariable({ id: "Player Origin", value: CharacterCreation.ChampionOrigin.id });
- function getOrigin() {
- return CharacterOrigin.getOrigin(CharacterCreation.PlayerOrigin.value);
- }
- CharacterCreation.getOrigin = getOrigin;
- CharacterCreation.rulebook = new Rulebook("Character Creation");
- })(CharacterCreation || (CharacterCreation = {}));
- class Perk extends StoredVariable {
- constructor(id) {
- super({
- id: "Perk_" + id,
- value: false
- });
- this.forcedStatus = () => { return undefined; };
- this.description = "Undefined";
- this.confirmPicked = () => { };
- this.name = id;
- Perk.storePerk(this);
- }
- isEnabled(valueOnly) {
- if (valueOnly != true) {
- let forced = this.forcedStatus(this);
- if (forced != undefined) {
- return forced;
- }
- }
- return this.value;
- }
- isForced() {
- return this.forcedStatus(this) != undefined;
- }
- getDescription() {
- if (typeof this.description == "function") {
- return this.description(this);
- }
- else {
- return this.description;
- }
- }
- static storePerk(perk) {
- Perk.perks[perk.id] = perk;
- }
- static getPerk(id) {
- return Perk.perks[id];
- }
- static getPerks() {
- let perks = [];
- for (let id in Perk.perks) {
- perks.push(Perk.perks[id]);
- }
- perks.sort((a, b) => {
- let na = a.name.toUpperCase();
- let nb = b.name.toUpperCase();
- if (na < nb)
- return -1;
- if (na > nb)
- return 1;
- return 0;
- });
- return perks;
- }
- static updatePerks() {
- for (let id in Perk.perks) {
- let perk = Perk.perks[id];
- if (perk.isForced()) {
- perk.value = perk.forcedStatus(perk);
- }
- }
- }
- }
- Perk.perks = {};
- class OneOf {
- constructor(randomMode, ...poss) {
- this.possibilities = [];
- this.cyclingOrder = 0;
- this.randomMode = randomMode;
- this.possibilities = poss;
- if (this.randomMode == OneOf.ROTATING_RANDOM) {
- this.availablePossibilites = this.possibilities.slice();
- }
- }
- getOne() {
- if (this.randomMode == OneOf.PURELY_AT_RANDOM) {
- return this.possibilities[Math.floor(Math.random() * this.possibilities.length)];
- }
- else if (this.randomMode == OneOf.ROTATING_RANDOM) {
- if (this.availablePossibilites.length < 1) {
- this.availablePossibilites = this.possibilities.slice();
- }
- return this.availablePossibilites.splice(Math.floor(Math.random() * this.availablePossibilites.length), 1)[0];
- }
- else if (this.randomMode == OneOf.CYCLING) {
- var r = this.possibilities[this.cyclingOrder++];
- if (this.cyclingOrder > this.possibilities.length) {
- this.cyclingOrder = 0;
- }
- return r;
- }
- }
- }
- OneOf.PURELY_AT_RANDOM = 0;
- OneOf.ROTATING_RANDOM = 1;
- OneOf.CYCLING = 2;
- var MachineBegins;
- (function (MachineBegins) {
- MachineBegins.rulebook = new Rulebook("Machine Begins");
- function execute() {
- MachineBegins.rulebook.execute({});
- }
- MachineBegins.execute = execute;
- })(MachineBegins || (MachineBegins = {}));
- document.addEventListener("DOMContentLoaded", () => {
- MachineBegins.execute();
- });
- var Elements;
- (function (Elements) {
- Elements.animationTime = 1000;
- Elements.isMobile = /Mobi/i.test(navigator.userAgent);
- Elements.screenWidth = document.body.clientWidth;
- Elements.screenHeight = document.body.clientHeight;
- function getLinkElements(image) {
- if (Elements.CurrentTurnHandler == undefined)
- return [];
- if (Elements.CurrentTurnHandler.isTurn() || image) {
- return [Elements.CurrentTurnHandler.currentTurnTab];
- }
- else {
- return [Elements.HyperlinkHandler.linkedActionsTab, Elements.RoomHandler.currentRoomTab, Elements.HyperlinkHandler.commonActionsTab, Elements.CurrentTurnHandler.currentTurnTab, Elements.RoomHandler.currentRoomExits];
- }
- }
- Elements.getLinkElements = getLinkElements;
- function updateScreenSize() {
- Elements.screenWidth = document.body.clientWidth;
- Elements.screenHeight = document.body.clientHeight;
- }
- Elements.updateScreenSize = updateScreenSize;
- Elements.mainPage = document.getElementById("mainPage");
- function startTurn() {
- Elements.mainPage.classList.add("turn");
- }
- Elements.startTurn = startTurn;
- function endTurn() {
- Elements.mainPage.classList.remove("turn");
- }
- Elements.endTurn = endTurn;
- function isInTurn() {
- return Elements.mainPage.classList.contains("turn");
- }
- Elements.isInTurn = isInTurn;
- let menuOutsideofTurn = false;
- let menus = 0;
- function startMenu() {
- if (!isInTurn()) {
- menuOutsideofTurn = true;
- startTurn();
- }
- Elements.mainPage.classList.add("mainmenu");
- menus++;
- Elements.CurrentTurnHandler.clear();
- Controls.KeyHandler.reset();
- }
- Elements.startMenu = startMenu;
- function endMenu() {
- Elements.CurrentTurnHandler.clear();
- if (--menus == 0) {
- if (menuOutsideofTurn) {
- endTurn();
- }
- resetMenus();
- }
- }
- Elements.endMenu = endMenu;
- function resetMenus() {
- if (menus != 0) {
- console.error("A menu wasn't finished properly. Please correct the dialogue.");
- }
- menus = 0;
- menuOutsideofTurn = false;
- Elements.mainPage.classList.remove("mainmenu");
- }
- Elements.resetMenus = resetMenus;
- function clearMainScreen() {
- Elements.CurrentTurnHandler.clear();
- }
- Elements.clearMainScreen = clearMainScreen;
- let loadingScreen = document.getElementById("loadingScreen");
- function stopLoading() {
- document.body.removeChild(loadingScreen);
- }
- Elements.stopLoading = stopLoading;
- async function waitForAnyKey() {
- let say = new Say(Say.CENTERED, new SayBold("Press any key to continue."));
- let elements = await say.getHTML("p", ["content"]);
- Elements.CurrentTurnHandler.print(...elements);
- await Controls.KeyHandler.getNextKey();
- Elements.CurrentTurnHandler.unprint(...elements);
- }
- Elements.waitForAnyKey = waitForAnyKey;
- async function waitForSpaceKey() {
- let say = new Say(Say.CENTERED, new SayBold("Press Space to continue."));
- let elements = await say.getHTML("p", ["content"]);
- Elements.CurrentTurnHandler.print(...elements);
- let lastKey = "notSpace";
- while (lastKey != "Space" && lastKey != "Click") {
- lastKey = (await Controls.KeyHandler.getNextKey()).evCode;
- }
- Elements.CurrentTurnHandler.unprint(...elements);
- }
- Elements.waitForSpaceKey = waitForSpaceKey;
- function printObeliskLogo() {
- let say = new Say(Say.CENTERED, new SayImage("introLogo"), Say.LINE_BREAK, new SayItalic("The Obelisk is an adult interactive fiction game set in a post-apocalyptic world ravaged by a magical structure."));
- Elements.CurrentTurnHandler.printAsContent(say);
- }
- Elements.printObeliskLogo = printObeliskLogo;
- })(Elements || (Elements = {}));
- if (Elements.isMobile) {
- Elements.mainPage.classList.add("mobile");
- }
- window.addEventListener("resize", function () {
- Elements.updateScreenSize();
- });
- var MachineBegins;
- (function (MachineBegins) {
- MachineBegins.HideLoadingDivRule = MachineBegins.rulebook.createAndAddRule({
- name: "Hide loading div",
- code: runner => {
- Elements.stopLoading();
- }
- });
- })(MachineBegins || (MachineBegins = {}));
- var TurnSequence;
- (function (TurnSequence) {
- TurnSequence.LazilyFixMenus = TurnSequence.rulebook.createAndAddRule({
- name: "Fix menus that were never closed because the dev is stupid",
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_LOWEST,
- code: () => {
- Elements.resetMenus();
- }
- });
- })(TurnSequence || (TurnSequence = {}));
- var Controls;
- (function (Controls) {
- var KeyHandler;
- (function (KeyHandler) {
- let promiseStack = [];
- let promiseOriginalStack = [];
- function rejectPromise(promise) {
- promiseStack.splice(promiseStack.indexOf(promise), 1);
- promiseOriginalStack.splice(promiseStack.indexOf(promise), 1);
- }
- KeyHandler.rejectPromise = rejectPromise;
- function createKeyCode(ev) {
- let name = ev.key.toUpperCase();
- let representation = name;
- let evCode = ev.code;
- if (ev.shiftKey) {
- name = "Shift + " + name;
- evCode = "Sh" + evCode;
- representation = "S" + representation;
- }
- if (ev.altKey) {
- name = "Alt + " + name;
- evCode = "Al" + evCode;
- representation = "A" + representation;
- }
- if (ev.ctrlKey) {
- name = "Control + " + name;
- evCode = "Ct" + evCode;
- representation = "C" + representation;
- }
- let keyCode = {
- evCode: evCode,
- name: name,
- representation: representation
- };
- return keyCode;
- }
- KeyHandler.createKeyCode = createKeyCode;
- window.addEventListener("mousedown", function (event) {
- let keyCode = {
- representation: "Click",
- evCode: "Click",
- name: "Click"
- };
- let promise = promiseStack.shift();
- if (promise != undefined) {
- promise(keyCode);
- promiseOriginalStack.shift();
- return;
- }
- });
- window.addEventListener("keydown", function (event) {
- let keyCode = createKeyCode(event);
- let promise = promiseStack.shift();
- if (promise != undefined) {
- promise(keyCode);
- promiseOriginalStack.shift();
- return;
- }
- if (keyCode.evCode == KeyHandler.scrollKeyCode.getValue().evCode) {
- Elements.CurrentTurnHandler.scrollSpace();
- return;
- }
- else if (keyCode.evCode == KeyHandler.imageKeyCode.getValue().evCode) {
- if (SayImage.imageViewer.style.display == "block") {
- SayImage.imageViewer.style.display = "none";
- }
- else {
- let images = Elements.CurrentTurnHandler.currentTurnTab.getElementsByClassName("contentImage");
- if (images.length > 0) {
- images[images.length - 1].click();
- }
- }
- return;
- }
- let ele;
- Elements.getLinkElements().some((element) => {
- let keyables = element.getElementsByClassName("keyable");
- for (let i = 0; i < keyables.length; i++) {
- if (keyables[i].dataset['shortcutcode'] == keyCode.evCode) {
- ele = keyables[i];
- return true;
- }
- }
- return false;
- });
- if (ele != undefined) {
- ele.click();
- }
- });
- function createKeyCodes(codes, keys, mods) {
- let arr = [];
- for (let mod = 0; mod < 4; mod++) {
- if (mod == 0 || mods[mod] == true) {
- for (let i = 0; i < codes.length; i++) {
- let name = keys[i];
- let representation = keys[i];
- let evCode = codes[i];
- if (mod == 1) {
- name = "Shift + " + name;
- evCode = "Sh" + evCode;
- representation = "S" + representation;
- }
- if (mod == 2) {
- name = "Alt + " + name;
- evCode = "Al" + evCode;
- representation = "A" + representation;
- }
- if (mod == 3) {
- name = "Control + " + name;
- evCode = "Ct" + evCode;
- representation = "C" + representation;
- }
- let keyCode = {
- evCode: evCode,
- representation: representation,
- name: name
- };
- arr.push(keyCode);
- }
- }
- }
- return arr;
- }
- KeyHandler.createKeyCodes = createKeyCodes;
- KeyHandler.scrollKeyCode = new StoredMemory("scrollKeyCode", {
- evCode: "Space",
- representation: "Space"
- });
- KeyHandler.imageKeyCode = new StoredMemory("imageKeyCode", {
- evCode: "KeyI",
- representation: "I"
- });
- KeyHandler.keyCodes1 = new StoredMemory("keyCodesRoom", createKeyCodes(["Digit1", "Digit2", "Digit3", "Digit4", "Digit5"], ["1", "2", "3", "4", "5"], [true, true, true, true]));
- KeyHandler.keyCodes2 = new StoredMemory("keyCodesActions", createKeyCodes(["KeyQ", "KeyW", "KeyE", "KeyR", "KeyT"], ["Q", "W", "E", "R", "T"], [true, true, true, true]));
- KeyHandler.keyCodes3 = new StoredMemory("keyCodesGlobal", createKeyCodes(["KeyF", "KeyV", "KeyG", "KeyB"], ["F", "V", "G", "B"], [true, true, true, true]));
- KeyHandler.keyCodeNorth = new StoredMemory("keyCodeNorth", {
- evCode: "KeyS",
- representation: "S"
- });
- KeyHandler.keyCodeEast = new StoredMemory("keyCodeEast", {
- evCode: "KeyC",
- representation: "C"
- });
- KeyHandler.keyCodeSouth = new StoredMemory("keyCodeSouth", {
- evCode: "KeyX",
- representation: "X"
- });
- KeyHandler.keyCodeWest = new StoredMemory("keyCodeWest", {
- evCode: "KeyZ",
- representation: "Z"
- });
- KeyHandler.keyCodeUp = new StoredMemory("keyCodeUp", {
- evCode: "KeyA",
- representation: "A"
- });
- KeyHandler.keyCodeDown = new StoredMemory("keyCodeDown", {
- evCode: "KeyD",
- representation: "D"
- });
- var directionCodeByIndex = [KeyHandler.keyCodeNorth, undefined, KeyHandler.keyCodeEast, undefined,
- KeyHandler.keyCodeSouth, undefined, KeyHandler.keyCodeWest, undefined, KeyHandler.keyCodeUp, KeyHandler.keyCodeDown];
- function getDirectionCode(direction) {
- return getDirectionCodeByIndex(Room.DIRECTIONS.indexOf(direction));
- }
- KeyHandler.getDirectionCode = getDirectionCode;
- function getDirectionCodeByIndex(index) {
- return directionCodeByIndex[index].getValue();
- }
- KeyHandler.getDirectionCodeByIndex = getDirectionCodeByIndex;
- KeyHandler.available1 = [];
- KeyHandler.available2 = [];
- KeyHandler.available3 = [];
- function reset() {
- KeyHandler.available1 = KeyHandler.keyCodes1.getValue().slice();
- KeyHandler.available2 = KeyHandler.keyCodes2.getValue().slice();
- KeyHandler.available3 = KeyHandler.keyCodes3.getValue().slice();
- }
- KeyHandler.reset = reset;
- let showKeys = new StoredMemory("ShowKeys", !Elements.isMobile);
- function applyCode(element, code) {
- if (code == undefined) {
- delete (element.dataset['shortcut']);
- delete (element.dataset['shortcutcode']);
- element.classList.remove("keyable");
- }
- else {
- element.dataset['shortcutcode'] = code.evCode;
- if (showKeys.getValue()) {
- element.dataset['shortcut'] = code.representation;
- }
- element.classList.add("keyable");
- }
- }
- KeyHandler.applyCode = applyCode;
- function getFirstKeyCode() {
- let chosen = KeyHandler.available1.length > 0 ? KeyHandler.available1 :
- KeyHandler.available2.length > 0 ? KeyHandler.available2 :
- KeyHandler.available3.length > 0 ? KeyHandler.available3 : undefined;
- if (chosen != undefined) {
- return chosen.shift();
- }
- return undefined;
- }
- KeyHandler.getFirstKeyCode = getFirstKeyCode;
- function getSecondKeyCode() {
- let chosen = KeyHandler.available2.length > 0 ? KeyHandler.available2 :
- KeyHandler.available3.length > 0 ? KeyHandler.available3 : undefined;
- if (chosen != undefined) {
- return chosen.splice(0, 1)[0];
- }
- return undefined;
- }
- KeyHandler.getSecondKeyCode = getSecondKeyCode;
- function getThirdKeyCode() {
- let chosen = KeyHandler.available3.length > 0 ? KeyHandler.available3 : undefined;
- if (chosen != undefined) {
- return chosen.splice(0, 1)[0];
- }
- return undefined;
- }
- KeyHandler.getThirdKeyCode = getThirdKeyCode;
- function getNextKey(timeout) {
- let timeoutNumber;
- let promise = (new Promise((resolve, reject) => {
- promiseStack.push(resolve);
- if (timeout != undefined) {
- timeoutNumber = setTimeout(() => {
- KeyHandler.rejectPromise(resolve);
- reject();
- }, timeout * 1000);
- }
- }));
- promise.then(() => {
- clearTimeout(timeoutNumber);
- });
- return promise;
- }
- KeyHandler.getNextKey = getNextKey;
- function stopGivingNextKey(originalPromise) {
- let index = promiseOriginalStack.indexOf(originalPromise);
- if (index != -1) {
- rejectPromise(promiseStack[index]);
- }
- }
- KeyHandler.stopGivingNextKey = stopGivingNextKey;
- })(KeyHandler = Controls.KeyHandler || (Controls.KeyHandler = {}));
- })(Controls || (Controls = {}));
- class SayImage {
- constructor(imgName) {
- this.imgName = imgName;
- if (!SayImage.loadTimeCheck && SayImage.imageNames.indexOf(this) == -1) {
- SayImage.imageNames.push(this);
- }
- }
- isImageDefined() {
- try {
- for (var i = 0; i < document.styleSheets.length; i++) {
- var rules = document.styleSheets[i]['rules'] || document.styleSheets[i]['cssRules'];
- for (var x in rules) {
- if (typeof rules[x].selectorText == 'string' && rules[x].selectorText == "." + this.imgName) {
- return true;
- }
- }
- }
- return false;
- }
- catch (e) {
- console.warn("Can't check for undefined images.");
- return true;
- }
- }
- getImageElement() {
- let img = document.createElement("div");
- if (this.isImageDefined()) {
- img.classList.add(this.imgName);
- img.classList.add("contentImage");
- }
- else {
- img.classList.add("error");
- img.appendChild(document.createTextNode("Image \"" + this.imgName + "\" not found."));
- }
- img.addEventListener("click", () => {
- SayImage.showInViewer(this);
- });
- Controls.KeyHandler.applyCode(img, Controls.KeyHandler.imageKeyCode.getValue());
- return img;
- }
- getPrintedElement() {
- return [this.getImageElement()];
- }
- static doLoadTimeCheck() {
- for (let i = 0; i < SayImage.imageNames.length; i++) {
- let image = SayImage.imageNames[i];
- if (!image.isImageDefined()) {
- if (Settings.hardDebug) {
- Elements.CurrentTurnHandler.printAsError("Image \"" + image.imgName + "\" was not found.");
- }
- console.error("Image \"" + image.imgName + "\" was not found.");
- }
- }
- SayImage.loadTimeCheck = true;
- }
- static showInViewer(image) {
- if (!(SayImage.imageViewer.style.display == 'block')) {
- SayImage.imageViewer.addEventListener("click", () => {
- SayImage.imageViewer.style.display = "none";
- });
- SayImage.imageViewer.className = image.imgName;
- SayImage.imageViewer.style.display = "block";
- }
- else {
- SayImage.imageViewer.style.display = "none";
- }
- }
- }
- SayImage.imageNames = [];
- SayImage.loadTimeCheck = false;
- SayImage.imageViewer = document.getElementById("imageViewer");
- var MachineBegins;
- (function (MachineBegins) {
- MachineBegins.ImageLoadTimeCheck = MachineBegins.rulebook.createAndAddRule({
- firstPriority: Rule.PRIORITY_HIGHEST,
- name: "Check for undefined images",
- code: () => {
- try {
- SayImage.doLoadTimeCheck();
- }
- catch (e) {
- console.warn("Can't check for undefined images.");
- }
- }
- });
- })(MachineBegins || (MachineBegins = {}));
- class SayableObject {
- }
- class Say {
- constructor(...objs) {
- this.sequence = [];
- this.skipbreaks = false;
- this.centered = false;
- this.add(...objs);
- }
- add(...objs) {
- this.sequence.push(...objs);
- }
- remove(...objs) {
- for (let i = 0; i < objs.length; i++) {
- let index = this.sequence.indexOf(objs[i]);
- if (index >= 0) {
- this.sequence.splice(index, 1);
- }
- }
- }
- isEmpty() {
- return this.sequence.length < 1;
- }
- async getTextOf(index, seq) {
- let elements = await this.getElementFor(index, seq);
- let div = document.createElement("div");
- for (let i = 0; i < elements.length; i++) {
- if (typeof elements[i] != "number") {
- div.appendChild(elements[i]);
- }
- }
- return div.innerText;
- }
- doLineBreak() {
- if (this.currentParagraph.length > 0 && !this.skipbreaks) {
- let br = document.createElement("br");
- br.classList.add("linebreak");
- let ti = document.createElement("span");
- ti.classList.add("textIndenter");
- this.currentParagraph.push(br, ti);
- }
- }
- doParagraphBreak() {
- if (this.currentParagraph.length > 0 && !this.skipbreaks) {
- this.paragraphs.push(this.currentParagraph);
- this.currentParagraph = [];
- }
- }
- async getParagraphs() {
- this.paragraphs = [];
- this.currentParagraph = [];
- this.skipbreaks = false;
- for (this.sequenceRunner = 0; this.sequenceRunner < this.sequence.length; this.sequenceRunner++) {
- let seq = this.sequence[this.sequenceRunner];
- if (seq instanceof OneOf) {
- seq = seq.getOne();
- }
- if (seq == Say.CENTERED) {
- this.setCentered(true);
- }
- else if (seq == Say.b) {
- let boldObjects = [];
- for (let i = this.sequenceRunner + 1; i < this.sequence.length; i++) {
- let candidate = this.sequenceRunner[i];
- if (candidate == Say.b) {
- this.sequence.splice(i, 1);
- break;
- }
- else {
- boldObjects.push(this.sequence.splice(i, 1));
- }
- }
- if (boldObjects.length > 0) {
- let bold = new SayBold(...boldObjects);
- this.sequence.splice(this.sequenceRunner + 1, 0, bold);
- }
- }
- else if (seq == Say.COCK) {
- if (HumanoidPenis != undefined) {
- let cock = HumanoidPenis.getSynonym();
- this.currentParagraph.push(document.createTextNode(cock));
- }
- }
- else if (seq == Say.PUSSY) {
- if (HumanoidVagina != undefined) {
- let vagina = HumanoidVagina.getSynonym();
- this.currentParagraph.push(document.createTextNode(vagina));
- }
- }
- else if (seq == Say.LINE_BREAK) {
- this.doLineBreak();
- }
- else if (seq == Say.PARAGRAPH_BREAK) {
- this.doParagraphBreak();
- }
- else if (seq == Say.RUN_PARAGRAPH) {
- this.skipbreaks = true;
- }
- else if (seq == Say.RUN_PARAGRAPH_OFF) {
- this.skipbreaks = false;
- }
- else if (typeof seq == "function") {
- let fObj = seq(this);
- if (Array.isArray(fObj)) {
- for (let k = fObj.length - 1; k >= 0; k--) {
- this.sequence.splice(this.sequenceRunner + 1, 0, fObj[k]);
- }
- }
- else if (fObj != undefined) {
- this.sequence.splice(this.sequenceRunner + 1, 0, fObj);
- }
- this.sequence.splice(this.sequenceRunner, 1);
- this.sequenceRunner--;
- }
- else if (seq.constructor == this.constructor) {
- for (let k = seq.sequence.length - 1; k >= 0; k--) {
- this.sequence.splice(this.sequenceRunner + 1, 0, seq.sequence[k]);
- }
- this.sequence.splice(this.sequenceRunner, 1);
- this.sequenceRunner--;
- }
- else if (seq != undefined) {
- let elements = await this.getElementFor(this.sequenceRunner, seq);
- for (let i = 0; i < elements.length; i++) {
- if (elements[i] === Say.DO_LINE_BREAK) {
- this.doLineBreak();
- }
- else if (elements[i] === Say.DO_PARAGRAPH_BREAK) {
- this.doParagraphBreak();
- }
- else {
- this.currentParagraph.push(elements[i]);
- }
- }
- }
- }
- if (this.currentParagraph.length > 0) {
- this.paragraphs.push(this.currentParagraph);
- }
- return this.paragraphs;
- }
- async getElementFor(index, obj) {
- if (obj instanceof Promise) {
- obj = await obj;
- }
- if (typeof obj == "string" || obj instanceof String) {
- return [document.createTextNode(obj)];
- }
- else if (typeof obj == "number" || obj instanceof Number) {
- return [document.createTextNode((parseFloat(obj.toFixed(2)) / 1).toString())];
- }
- else if (typeof obj == "function") {
- let elements = await this.getElementFor(-1, obj(this));
- return elements;
- }
- else if (obj instanceof SayImage) {
- return [obj.getImageElement()];
- }
- else if (obj instanceof SayLeftRight) {
- return (await obj.getPureElements());
- }
- else if (obj instanceof Say) {
- let elements = await obj.getPureElements(this);
- return elements;
- }
- else if (this.isProperElement(obj)) {
- return [obj];
- }
- else if (obj instanceof Object) {
- let elements = await this.printName(obj);
- return elements;
- }
- }
- async getPureElements(say) {
- let paragraphs = await this.getParagraphs();
- return paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
- }
- setCentered(bool) {
- this.centered = bool;
- }
- async getHTML(tagName, classList, singleParagraph) {
- let paragraphs = await this.getParagraphs();
- if (singleParagraph == true && paragraphs.length > 1) {
- paragraphs = [Array.prototype.concat.apply([], paragraphs)];
- }
- let elements = [];
- for (let i = 0, paragraph = paragraphs[i]; paragraph != undefined; paragraph = paragraphs[++i]) {
- let parent = document.createElement(tagName);
- if (classList.length > 0) {
- parent.classList.add(...classList);
- }
- for (let k = 0, ele = paragraph[k]; ele != undefined; ele = paragraph[++k]) {
- parent.appendChild(ele);
- }
- elements.push(parent);
- if (this.centered) {
- parent.classList.add("centered");
- }
- }
- return elements;
- }
- getHTMLContent() {
- return this.getHTML("p", ["content"]);
- }
- isProperElement(o) {
- return (typeof Node === "object" ? o instanceof Node :
- o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string") || (typeof HTMLElement === "object" ? o instanceof HTMLElement :
- o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string");
- }
- async printName(thing) {
- this.currentNoun = thing;
- this.currentNounElements = [];
- let before = Say.beforePrinting.execute({ noun: this });
- await before;
- let print = Say.printing.execute({ noun: this });
- await print;
- let after = Say.afterPrinting.execute({ noun: this });
- await after;
- return this.currentNounElements;
- }
- static hisHersIts(target, startOfSentence) {
- return new SayHisHersIts(target);
- }
- }
- Say.LINE_BREAK = new SayableObject();
- Say.PARAGRAPH_BREAK = new SayableObject();
- Say.RUN_PARAGRAPH = new SayableObject();
- Say.RUN_PARAGRAPH_OFF = new SayableObject();
- Say.CENTERED = new SayableObject();
- Say.b = new SayableObject();
- Say.DO_PARAGRAPH_BREAK = new SayableObject();
- Say.DO_LINE_BREAK = new SayableObject();
- Say.COCK = new SayableObject();
- Say.PUSSY = new SayableObject();
- Say.beforePrinting = new Rulebook("Before printing the name of something");
- Say.printing = new Rulebook("Printing the name of something");
- Say.afterPrinting = new Rulebook("After printing the name of something");
- Say.printing.addRule(new Rule({
- name: "Printing the name of a Printable Element",
- firstPriority: Rule.PRIORITY_LOW,
- code: (rulebook) => {
- let say = rulebook.noun;
- if (say.currentNoun.getPrintedElement) {
- say.currentNounElements.push(...say.currentNoun.getPrintedElement());
- return true;
- }
- }
- }));
- Say.printing.addRule(new Rule({
- name: "Printing the name of a Printable",
- firstPriority: Rule.PRIORITY_LOW,
- code: (rulebook) => {
- let say = rulebook.noun;
- if (say.currentNoun.getPrintedName) {
- let thingEle = document.createTextNode(say.currentNoun.getPrintedName());
- say.currentNounElements.push(thingEle);
- return true;
- }
- }
- }));
- Say.printing.addRule(new Rule({
- name: "Printing the name of an unknown object",
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_LOWEST,
- code: (rulebook) => {
- let say = rulebook.noun;
- if (say.currentNoun.getPrintedName) {
- say.currentNounElements.push((document.createTextNode(say.currentNoun.toString())));
- return true;
- }
- }
- }));
- var CharacterCreation;
- (function (CharacterCreation) {
- CharacterCreation.FalselyAccused = new CharacterOrigin("Falsely Accused");
- CharacterCreation.FalselyAccused.name = "Falsely Accused";
- CharacterCreation.FalselyAccused.description = new Say("You made some allegations against a powerful man in your village. Whether those were true or not didn't matter, he was most displeased with your actions and did all he could to end your life as you knew it. Just as you were about to be executed for your inexistent crimes, the man asked for mercy. You thought he wasn't willing to go this far with his lies, only to have your hopes crushed when you noticed a smirk in his evil face.\n", Say.PARAGRAPH_BREAK, "The man claimed he wanted to forgive you, but would need proof of your regret. You received an alternative sentence: go to the Tower and find a way to destroy it. Surely an impossible task. Surely just another death sentence... or worse. But it's not like you have a choice in the matter.");
- CharacterCreation.FalselyAccused.bonusStats = "This origin confers no bonuses, but you have complete freedom with your perks.";
- })(CharacterCreation || (CharacterCreation = {}));
- var CharacterCreation;
- (function (CharacterCreation) {
- CharacterCreation.HornyVirgin = new Perk("Horny Virgin");
- CharacterCreation.HornyVirgin.description = new Say("Whichever life you led up to this point never allowed you to explore your sexuality. As a result, you're both virgin AND extremely horny. This perk makes it so that the World Depravity around the Tower is initially higher and rises faster, however you are not as affected by this rising Depravity around you.", Say.PARAGRAPH_BREAK, "This perk is mandatory for Champions and is not compatible with most sex-related perks.");
- CharacterCreation.HornyVirgin.forcedStatus = (hornyVirgin) => {
- if (CharacterCreation.getOrigin() == CharacterCreation.ChampionOrigin) {
- return true;
- }
- else if (CharacterCreation.Slut.isEnabled(true)) {
- return false;
- }
- };
- CharacterCreation.Slut = new Perk("Unredeemable Slut");
- CharacterCreation.Slut.description = new Say("Simply put: you really like sex. Your Depravity starts off higher and rises even faster, also affecting World Depravity. However, you level up sex-related Skills faster.", Say.PARAGRAPH_BREAK, "This perk is not compatible with ", CharacterCreation.HornyVirgin.name, ".");
- CharacterCreation.Slut.forcedStatus = () => {
- if (CharacterCreation.HornyVirgin.isEnabled(true)) {
- return false;
- }
- };
- CharacterCreation.SensitiveHoles = new Perk("Sensitive Holes");
- CharacterCreation.SensitiveHoles.description = "You are very sensitive to any kind of receptive penetration. You have a harder time escaping grapples while being penetrated and an easier time orgasming from it, but getting aroused faster also means you take less damage from it.";
- })(CharacterCreation || (CharacterCreation = {}));
- var ContentHandler;
- (function (ContentHandler) {
- let contentHash = {};
- let contentArray = [];
- function registerContentType(type) {
- if (contentHash[type.getId()] != undefined) {
- console.error("[ContentHandler} Can't register the content.", type, "Old:", contentHash[type.getId()]);
- return;
- }
- else {
- contentHash[type.getId()] = type;
- contentArray.push(type);
- }
- }
- ContentHandler.registerContentType = registerContentType;
- function getContentTypes() {
- return contentArray.slice();
- }
- ContentHandler.getContentTypes = getContentTypes;
- })(ContentHandler || (ContentHandler = {}));
- class ContentType extends StoredMemory {
- constructor(options) {
- super(ContentType.memoryPrefix + options.id, options.defaultValue);
- this.valueDescription = () => { return new Say(JSON.stringify(this.getValue())); };
- this.changeable = true;
- this.description = options.description instanceof Say ? options.description : new Say(options.description);
- this.valueDescription = options.currentValueDescription == undefined ? this.valueDescription : options.currentValueDescription;
- if (options.changeable == false) {
- this.storeValue(options.defaultValue);
- this.changeable = false;
- }
- ContentHandler.registerContentType(this);
- }
- getDescription() {
- return this.description;
- }
- getValueDescription() {
- let desc = this.valueDescription(this);
- if (desc instanceof Say) {
- return desc;
- }
- else {
- return new Say(desc);
- }
- }
- toggle() {
- if (this.changeable) {
- this.storeValue(!this.getValue());
- }
- }
- isAllowed() {
- return this.getValue();
- }
- }
- ContentType.memoryPrefix = "ct_";
- ContentType.MM = new ContentType({
- changeable: false,
- description: "Homosexual (M/M) sexual events",
- id: "MM",
- defaultValue: true
- });
- ContentType.FF = new ContentType({
- changeable: false,
- description: "Homosexual (F/F) sexual events",
- id: "FF",
- defaultValue: true
- });
- ContentType.MF = new ContentType({
- changeable: false,
- description: "Heterosexual (M/F) sexual events",
- id: "MF",
- defaultValue: true
- });
- ContentType.Beast = new ContentType({
- changeable: true,
- description: "Sexual events with either monsters or magical beasts. MM/MF/FF take precedence over this one if blocked. Sufficiently human creatures do not get counted into this.",
- id: "Beast",
- defaultValue: true
- });
- ContentType.Scat = new ContentType({
- changeable: false,
- description: "Scatologic sexual events",
- id: "Scat",
- defaultValue: false
- });
- ContentType.Pee = new ContentType({
- changeable: false,
- description: "Sexual events with urine",
- id: "Urophilia",
- defaultValue: false
- });
- var Elements;
- (function (Elements) {
- var CurrentTurnHandler;
- (function (CurrentTurnHandler) {
- CurrentTurnHandler.currentTurnTab = document.getElementById("currentTurnTab");
- CurrentTurnHandler.currentTurn = document.getElementById("currentTurn");
- CurrentTurnHandler.turnHr = document.createElement("p");
- CurrentTurnHandler.lastReadOffset = CurrentTurnHandler.currentTurnTab.clientHeight / 2;
- CurrentTurnHandler.turnHr.classList.add("turnStart");
- CurrentTurnHandler.turnHr.appendChild(document.createTextNode("Start of Turn"));
- function startTurn(action) {
- let oldContent = CurrentTurnHandler.currentTurnTab.getElementsByClassName("content");
- for (let i = 0; i < oldContent.length; i++) {
- oldContent[i].classList.add("contentOld");
- oldContent[i].classList.remove("content");
- }
- CurrentTurnHandler.currentTurnTab.appendChild(CurrentTurnHandler.turnHr);
- Elements.startTurn();
- scrollToNewTurn();
- }
- CurrentTurnHandler.startTurn = startTurn;
- function isTurn() {
- return Elements.isInTurn();
- }
- CurrentTurnHandler.isTurn = isTurn;
- function endTurn() {
- Elements.endTurn();
- }
- CurrentTurnHandler.endTurn = endTurn;
- function getSayElementsAsContent(say) {
- return say.getHTML("p", ["content"]);
- }
- CurrentTurnHandler.getSayElementsAsContent = getSayElementsAsContent;
- function printAsContent(say) {
- let node = getMarker();
- getSayElementsAsContent(say).then(value => {
- insertBefore(value, node);
- unprint(node);
- });
- }
- CurrentTurnHandler.printAsContent = printAsContent;
- function simplePrint(...sayValues) {
- printAsContent(new Say(...sayValues));
- }
- CurrentTurnHandler.simplePrint = simplePrint;
- function printAsError(msg) {
- if (msg instanceof Say) {
- msg.getHTML("div", ["error"], true).then(value => {
- print(...value);
- });
- }
- else {
- let div = document.createElement("div");
- div.classList.add("error");
- div.appendChild(document.createTextNode(msg));
- print(div);
- }
- }
- CurrentTurnHandler.printAsError = printAsError;
- function clear() {
- while (CurrentTurnHandler.currentTurnTab.firstChild != undefined) {
- CurrentTurnHandler.currentTurnTab.removeChild(CurrentTurnHandler.currentTurnTab.firstChild);
- }
- Controls.KeyHandler.reset();
- }
- CurrentTurnHandler.clear = clear;
- function print(...elements) {
- if (elements.length > 0) {
- elements.forEach((element) => {
- CurrentTurnHandler.currentTurnTab.appendChild(element);
- });
- scrollTo(CurrentTurnHandler.lastReadOffset);
- }
- }
- CurrentTurnHandler.print = print;
- function getMarker() {
- let node = document.createTextNode("");
- CurrentTurnHandler.currentTurnTab.appendChild(node);
- return node;
- }
- CurrentTurnHandler.getMarker = getMarker;
- function insertBefore(newChilds, oldChild) {
- newChilds.forEach((newChild) => {
- CurrentTurnHandler.currentTurnTab.insertBefore(newChild, oldChild);
- });
- scrollTo(CurrentTurnHandler.lastReadOffset);
- }
- CurrentTurnHandler.insertBefore = insertBefore;
- function unprint(...elements) {
- elements.forEach((element) => {
- if (element.parentElement == CurrentTurnHandler.currentTurnTab) {
- CurrentTurnHandler.currentTurnTab.removeChild(element);
- }
- });
- }
- CurrentTurnHandler.unprint = unprint;
- function scrollToNewTurn() {
- let target = CurrentTurnHandler.turnHr.offsetTop + CurrentTurnHandler.turnHr.offsetHeight;
- CurrentTurnHandler.lastReadOffset = target;
- if (target < CurrentTurnHandler.currentTurn.scrollTop) {
- return;
- }
- scrollTo(target);
- }
- CurrentTurnHandler.scrollToNewTurn = scrollToNewTurn;
- function scrollToBottom() {
- scrollTo(CurrentTurnHandler.currentTurn.scrollHeight - CurrentTurnHandler.currentTurn.clientHeight);
- }
- CurrentTurnHandler.scrollToBottom = scrollToBottom;
- function scrollSpace() {
- scrollTo(CurrentTurnHandler.currentTurn.scrollTop + (CurrentTurnHandler.currentTurn.clientHeight / 2));
- }
- CurrentTurnHandler.scrollSpace = scrollSpace;
- CurrentTurnHandler.currentTurn.addEventListener("scroll", () => {
- let currentRead = CurrentTurnHandler.currentTurn.scrollTop + CurrentTurnHandler.currentTurn.clientHeight;
- if (currentRead > CurrentTurnHandler.lastReadOffset) {
- CurrentTurnHandler.lastReadOffset = currentRead;
- }
- });
- var startOffset;
- var targetOffset;
- var startTime;
- var finishTime;
- var totalTime;
- var animationRequest;
- function scrollTo(offset) {
- if (offset <= CurrentTurnHandler.lastReadOffset) {
- startOffset = CurrentTurnHandler.currentTurn.scrollTop;
- targetOffset = offset;
- startTime = new Date().getTime();
- finishTime = startTime + Elements.animationTime;
- totalTime = finishTime - startTime;
- startScrolling();
- }
- }
- CurrentTurnHandler.scrollTo = scrollTo;
- function startScrolling() {
- if (animationRequest == undefined) {
- animationRequest = requestAnimationFrame(CurrentTurnHandler.updateFrame);
- }
- }
- CurrentTurnHandler.startScrolling = startScrolling;
- CurrentTurnHandler.updateFrame = () => {
- animationRequest = undefined;
- let movingOffset = (targetOffset - startOffset);
- let timePassed = new Date().getTime() - startTime;
- let idealOffset = movingOffset * (timePassed / totalTime);
- let maxScroll = CurrentTurnHandler.currentTurn.scrollHeight - CurrentTurnHandler.currentTurn.clientHeight;
- CurrentTurnHandler.currentTurn.scrollTop = startOffset + idealOffset;
- if (CurrentTurnHandler.currentTurn.scrollTop < targetOffset && CurrentTurnHandler.currentTurn.scrollTop < maxScroll) {
- startScrolling();
- }
- };
- })(CurrentTurnHandler = Elements.CurrentTurnHandler || (Elements.CurrentTurnHandler = {}));
- })(Elements || (Elements = {}));
- var Controls;
- (function (Controls) {
- var Links;
- (function (Links) {
- function makeCustomLink(element, options) {
- if (options.mouseover != undefined && options.mouseout != undefined) {
- element.addEventListener("mouseover", options.mouseover);
- element.addEventListener("mouseout", options.mouseout);
- }
- element.addEventListener("click", options.click);
- }
- Links.makeCustomLink = makeCustomLink;
- function makeLink(element, action) {
- makeCustomLink(element, {
- mouseover: () => { Elements.HyperlinkHandler.hoverAction(action); },
- mouseout: () => { Elements.HyperlinkHandler.unhoverAction(); },
- click: (e) => {
- TurnSequence.execute(action);
- Elements.HyperlinkHandler.unhoverAction();
- e.stopPropagation();
- e.preventDefault();
- }
- });
- }
- Links.makeLink = makeLink;
- })(Links = Controls.Links || (Controls.Links = {}));
- })(Controls || (Controls = {}));
- class RoomNode {
- constructor(room) {
- this.mainDiv = document.createElement("div");
- this.room = room;
- this.mainDiv.classList.add("mapRoom");
- if (room != undefined) {
- this.mainDiv.classList.add("linked", room.getBackgroundClass());
- Room.DIRECTIONS.forEach((direction) => {
- if (room.connections[direction] != undefined) {
- let directionDiv = document.createElement("div");
- directionDiv.classList.add("mapRoomConnection" + DirectionNames[Direction[direction]]);
- this.mainDiv.appendChild(directionDiv);
- }
- });
- Controls.Links.makeLink(this.mainDiv, new ActionGo(WorldState.player, room));
- }
- }
- async createRoomNameFloater() {
- if (this.room != undefined) {
- let roomName = document.createElement("div");
- let sayName = new Say(this.room);
- await sayName.getPureElements().then(value => {
- value.forEach(element => {
- roomName.appendChild(element);
- });
- Elements.HoverInfo.makeHoverable(this.mainDiv, value);
- });
- }
- }
- async update() {
- if (this.room != undefined) {
- if (WorldState.player.getRoom() == this.room) {
- this.mainDiv.classList.add("current");
- }
- else {
- this.mainDiv.classList.remove("current");
- }
- let isRemembered = await WorldState.isRoomRemembered(this.room);
- if (!isRemembered) {
- this.mainDiv.classList.add("unknown");
- }
- else {
- this.mainDiv.classList.remove("unknown");
- }
- }
- }
- getElement() {
- return this.mainDiv;
- }
- }
- class SayAn extends Say {
- constructor(autoUppercase) {
- super();
- this.node = document.createTextNode("a ");
- this.uppercase = true;
- if (autoUppercase != undefined) {
- this.uppercase = autoUppercase;
- }
- }
- async getPureElements(say) {
- let next = say.sequence[say.sequenceRunner + 1];
- if (next == undefined || (next instanceof Thing && next.properlyNamed)) {
- this.node.nodeValue = "";
- }
- else {
- let aan = AvsAn.query((await say.getTextOf(say.sequenceRunner + 1, next)).trim());
- if (aan.prefix != "") {
- this.node.nodeValue = aan.article + " ";
- }
- if (this.uppercase && say.currentParagraph.length == 0) {
- this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase()
- + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1);
- }
- this.node.nodeValue = this.node.nodeValue + " ";
- }
- return [this.node];
- }
- }
- var AvsAn = (function () {
- var dict = "p3ezz;4wrlg;2h;#2rg;22;2;a;7;;if;z;;&4h;1c;1;N;6;;*yp;6a;4;a2;q;;e1;q;;i1;h;;o;7;;/op;5n;9;a3;i;;e5;h;;h;;1;o5;;;i;r;;l;;1;/;6;;n;;1;o6;;;o1;a;;r;;1;e7;;;s;;1;/2;j;;09pa;y3;1;8e;10;;17qoq;qmm;2;12hp;7nw;a;0o4;45;1;0n;2w;;15r;1n;2;8;7;;9;5;;28s;x;;34q;z;1;7;5;;45n;n;;598;w;;65k;u;;74j;y;;850;y;;93x;g;;81ux;hgk;a;0zb;el;a;0p;4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;1;i4d;f;1;o;7;;g;;1;n;5;;lsl;17;1;l;i;;m2i;r9;1;o2a;2;;n3y;ssp;;s9j;m;1;s;f;;vhg5;5x;1;oj;17;1;cd;3;;r1cb;bd4;5;aco;r;;e3v;h;;ih7;i;;l7m;1j;;o47;k;;s1szw;1ig;3; h;3f;;h1;9f;;u1bh;iv;1;rda;gs;2;eq;a;;pcd;gg;3;a3b;1y;;e7q;36;;ig;;;t33j;1ai;2;m;r;;ta;16b;;v3c;c;;w3e;d;1;a;7;;x;;b; 23;hw;;';6;;,1;c;;.2;a;;8o;47;;b5;f;;k;13;;l1;8;;md;x;1;a7;;;t;c;;y4y;e;1; ;a;;y6atn;ca;1;l1;c;;{6s;r;1;a;7;;|58;m;1;a1;b;;£6cs;8l;1;82b;6o;;À;9;;Áa;o;;Ä3;c;;Å2;k;;Æ4;k;;Éf;2q;;Ò;c;;Ó1;1d;;Öa;16;;Ü4;v;;à7;v;;á5;l;;æ1;m;;è;6;;é4c;bg;1;t3h;29;3;a4;1n;;o;a;;u1;b;;í;5;;ö2;e;;üd;r;1; 7;;;Ā1;b;;ā3;s;;ī;5;;İ4;o;;Ō3;o;;ō;2m;;œ;8;;Ω2;e;;α1c;c1;;ε5;1s;;ω7;1x;;ϵ;8;;е;5;;–3a;1k;2;e;a;;i;9;;ℓ;d;;";
- var root = {};
- function fill(prefix, node, dict) {
- var a = dict.split(';', 3), n = a.map(function (x) { return parseInt(x, 36) || 0; });
- node.data = {
- aCount: n[0],
- anCount: n[1],
- prefix: prefix,
- article: n[0] >= n[1] ? "a" : "an"
- };
- dict = dict.substr(1 + a.join(';').length);
- for (var i = 0; i < n[2]; i++)
- dict = fill(prefix + dict[0], node[dict[0]] = {}, dict.substr(1));
- return dict;
- }
- fill("", root, dict);
- return {
- raw: root,
- query: function (word) {
- var node = root, sI = 0, result, c;
- do {
- c = word[sI++];
- } while ('"‘’“”$\'-('.indexOf(c) >= 0);
- while (1) {
- result = node.data || result;
- node = node[c];
- if (!node)
- return result;
- c = word[sI++] || " ";
- }
- }
- };
- })();
- class SayBold extends Say {
- async getPureElements() {
- let paragraphs = await this.getParagraphs();
- let elements = paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
- let b = document.createElement("b");
- elements.forEach((element) => {
- b.appendChild(element);
- });
- return [b];
- }
- }
- class SayHeSheIt extends Say {
- constructor(target, autoUppercase) {
- super();
- this.node = document.createTextNode("a ");
- this.uppercase = true;
- this.target = target;
- if (autoUppercase != undefined) {
- this.uppercase = autoUppercase;
- }
- }
- async getPureElements(say) {
- let next = this.target;
- if (next == undefined) {
- this.node.nodeValue = "";
- }
- else {
- if (next instanceof Humanoid) {
- let gender = next.getGenderValue();
- if (gender.genderValueCorrected > 65) {
- this.node.nodeValue = "she ";
- }
- else if (gender.genderValueCorrected < 35) {
- this.node.nodeValue = "he ";
- }
- else {
- if (gender.hasPenisBulge || gender.hasPenis) {
- this.node.nodeValue = "he ";
- }
- else if (gender.hasVagina || gender.hasTits) {
- this.node.nodeValue = "she ";
- }
- else {
- this.node.nodeValue = "they ";
- }
- }
- }
- else {
- this.node.nodeValue = "it ";
- }
- if (this.uppercase && say.currentParagraph.length == 0) {
- this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase()
- + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1);
- }
- }
- return [this.node];
- }
- }
- class SayHimHerIt extends Say {
- constructor(target, autoUppercase) {
- super();
- this.node = document.createTextNode("a ");
- this.uppercase = true;
- this.target = target;
- if (autoUppercase != undefined) {
- this.uppercase = autoUppercase;
- }
- }
- async getPureElements(say) {
- let next = this.target;
- if (next == undefined) {
- this.node.nodeValue = "";
- }
- else {
- if (next instanceof Humanoid) {
- let gender = next.getGenderValue();
- if (gender.genderValueCorrected > 65) {
- this.node.nodeValue = "her ";
- }
- else if (gender.genderValueCorrected < 35) {
- this.node.nodeValue = "him ";
- }
- else {
- if (gender.hasPenisBulge || gender.hasPenis) {
- this.node.nodeValue = "him ";
- }
- else if (gender.hasVagina || gender.hasTits) {
- this.node.nodeValue = "her ";
- }
- else {
- this.node.nodeValue = "them ";
- }
- }
- }
- else {
- this.node.nodeValue = "it ";
- }
- if (this.uppercase && say.currentParagraph.length == 0) {
- this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase()
- + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1);
- }
- }
- return [this.node];
- }
- }
- class SayHisHersIts extends Say {
- constructor(target, autoUppercase) {
- super();
- this.node = document.createTextNode("a ");
- this.uppercase = true;
- this.target = target;
- if (autoUppercase != undefined) {
- this.uppercase = autoUppercase;
- }
- }
- async getPureElements(say) {
- let next = this.target;
- if (next == undefined) {
- this.node.nodeValue = "";
- }
- else {
- if (next instanceof Humanoid) {
- let gender = next.getGenderValue();
- if (gender.genderValueCorrected > 65) {
- this.node.nodeValue = "hers ";
- }
- else if (gender.genderValueCorrected < 35) {
- this.node.nodeValue = "his ";
- }
- else {
- if (gender.hasPenisBulge || gender.hasPenis) {
- this.node.nodeValue = "his ";
- }
- else if (gender.hasVagina || gender.hasTits) {
- this.node.nodeValue = "hers ";
- }
- else {
- this.node.nodeValue = "their ";
- }
- }
- }
- else {
- this.node.nodeValue = "its ";
- }
- if (this.uppercase && say.currentParagraph.length == 0) {
- this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase()
- + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1);
- }
- }
- return [this.node];
- }
- }
- class SayIf extends Say {
- constructor(condition, ...objs) {
- super(...objs);
- this.condition = condition != undefined ? condition : () => { return true; };
- }
- async getPureElements() {
- if (this.condition()) {
- let paragraphs = await this.getParagraphs();
- return paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
- }
- return [];
- }
- }
- class SayItalic extends Say {
- async getPureElements() {
- let paragraphs = await this.getParagraphs();
- let elements = paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
- let b = document.createElement("i");
- elements.forEach((element) => {
- b.appendChild(element);
- });
- return [b];
- }
- }
- class SayLeftRight extends Say {
- constructor() {
- super();
- this.left = new Say();
- this.right = new Say();
- }
- addLeft(...objs) {
- this.left.add(...objs);
- }
- addRight(...objs) {
- this.right.add(...objs);
- }
- async getPureElements() {
- if (this.left.sequence.length == 0) {
- return await this.right.getPureElements();
- }
- else if (this.right.sequence.length == 0) {
- return await this.left.getPureElements();
- }
- let mainDiv = document.createElement("div");
- mainDiv.classList.add("horFlex");
- let left = document.createElement("div");
- left.classList.add("horFlexColumn");
- mainDiv.appendChild(left);
- let right = document.createElement("div");
- right.classList.add("horFlexColumn");
- mainDiv.appendChild(right);
- await this.left.getPureElements().then(value => {
- value.forEach(element => {
- left.appendChild(element);
- });
- });
- await this.right.getPureElements().then(value => {
- value.forEach(element => {
- right.appendChild(element);
- });
- });
- return [mainDiv];
- }
- }
- class SayLink extends Say {
- setAction(action) {
- this.linkedAction = action;
- }
- async getPureElements() {
- let paragraphs = await this.getParagraphs();
- let elements = paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
- let b = document.createElement("b");
- b.classList.add("textLink");
- elements.forEach((element) => {
- b.appendChild(element);
- });
- Controls.Links.makeLink(b, this.linkedAction);
- return [b];
- }
- }
- class SayThe extends Say {
- constructor(autoUppercase, alwaysPrint) {
- super();
- this.node = document.createTextNode("");
- this.uppercase = true;
- this.alwaysPrint = false;
- if (autoUppercase != undefined) {
- this.uppercase = autoUppercase;
- }
- if (alwaysPrint) {
- this.alwaysPrint = alwaysPrint;
- }
- }
- async getPureElements(say) {
- let next = say.sequence[say.sequenceRunner + 1];
- if (this.alwaysPrint) {
- this.node.nodeValue = "the ";
- }
- else if (next == undefined) {
- this.node.nodeValue = "";
- }
- else {
- if (next instanceof Thing) {
- if (!next.properlyNamed) {
- this.node.nodeValue = "the ";
- }
- else {
- this.node.nodeValue = "";
- }
- }
- else {
- this.node.nodeValue = "";
- }
- }
- if (this.node.nodeValue != "") {
- if (this.uppercase && say.currentParagraph.length == 0) {
- this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase()
- + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1);
- }
- }
- return [this.node];
- }
- }
- var Elements;
- (function (Elements) {
- var AppearanceHandler;
- (function (AppearanceHandler) {
- var target = document.getElementById("appearanceTarget");
- function empty() {
- while (target.firstChild) {
- target.removeChild(target.firstChild);
- }
- }
- async function print(say) {
- await say.getHTML("p", ["appearanceDescription"]).then(value => {
- for (let i = 0; i < value.length; i++) {
- target.appendChild(value[i]);
- }
- });
- }
- AppearanceHandler.print = print;
- async function updateAppearance() {
- empty();
- let player = WorldState.player;
- let playerGender = player.getGenderValue();
- let playerSluttiness = player.getSluttiness();
- let you = new SayLink("You");
- you.setAction(new ActionExamine(WorldState.player, WorldState.player));
- let presentation = new Say(you, " are presenting as ", new SayAn(), player.getShortestDescription(), ".");
- if (playerSluttiness.naked) {
- presentation.add(" You are naked.");
- }
- else if (playerSluttiness.halfNaked) {
- presentation.add(" You are almost naked.");
- }
- let tits = Thing.PartRelation.getRightTypeOne(player, HumanoidBreasts);
- let penis = Thing.PartRelation.getRightTypeOne(player, HumanoidPenis);
- let bulges = player.getBulges();
- if (bulges.breasts > 0 || playerGender.genderValueCorrected > 60) {
- let realTits = tits.getSizeText();
- let fakeTits = HumanoidBreasts.getSizeText(bulges.breasts);
- presentation.add(" You have " + realTits + " breasts");
- if (bulges.breasts != tits.getSize() && realTits != fakeTits) {
- presentation.add(", padded to appear as " + fakeTits + " through your clothing.");
- }
- else {
- if (!tits.isUncovered()) {
- presentation.add(", safely covered.");
- }
- else {
- presentation.add(".");
- }
- }
- }
- if (penis == undefined) {
- presentation.add(" You have ", new SayAn(), HumanoidPenis.getSizeText(bulges.crotch) + " crotch bulge visible through your clothing.");
- }
- else {
- let realDick = penis.getSizeText();
- let fakeDick = HumanoidPenis.getSizeText(bulges.crotch);
- presentation.add(" You have ", new SayAn(), realDick + " dick");
- if (penis.getActualSize() != bulges.crotch && realDick != fakeDick) {
- presentation.add(", which looks like it is " + fakeDick + " due to your clothing.");
- }
- else {
- if (!penis.isUncovered()) {
- presentation.add(", which is covered.");
- }
- else {
- presentation.add(".");
- }
- }
- }
- await print(presentation);
- }
- AppearanceHandler.updateAppearance = updateAppearance;
- })(AppearanceHandler = Elements.AppearanceHandler || (Elements.AppearanceHandler = {}));
- })(Elements || (Elements = {}));
- function updateFontSize() {
- var minWidth = Elements.isMobile ? 800 : 1280;
- var proportion = Elements.isMobile ? 17 : 14.5;
- var width = document.body.clientWidth < minWidth ? minWidth : document.body.clientWidth;
- document.documentElement.style["font-size"] = (width * proportion / 1280) + "px";
- }
- updateFontSize();
- window.addEventListener("resize", updateFontSize);
- function toggleFullScreen() {
- var doc = window.document;
- var docEl = doc.documentElement;
- var requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen || docEl.webkitRequestFullScreen || docEl.msRequestFullscreen;
- var cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen;
- if (!doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {
- requestFullScreen.call(docEl);
- }
- else {
- cancelFullScreen.call(doc);
- }
- }
- var Elements;
- (function (Elements) {
- var HoverInfo;
- (function (HoverInfo) {
- var hoverbox = document.getElementById("hoverInfo");
- var contentTarget = document.getElementById("hoverContent");
- var width = 0;
- var height = 0;
- function empty() {
- while (contentTarget.firstChild != undefined) {
- contentTarget.removeChild(contentTarget.firstChild);
- }
- }
- function makeHoverable(element, contents) {
- element.addEventListener("mouseenter", (e) => {
- Elements.HoverInfo.hoverStart(e, contents);
- });
- element.addEventListener("mousemove", (e) => {
- Elements.HoverInfo.hoverMove(e);
- });
- element.addEventListener("mouseout", (e) => {
- Elements.HoverInfo.hoverEnd();
- });
- }
- HoverInfo.makeHoverable = makeHoverable;
- function hoverStart(e, contents) {
- empty();
- for (let i = 0; i < contents.length; i++) {
- contentTarget.appendChild(contents[i]);
- }
- hoverbox.style.display = "block";
- hoverbox.style.left = "0px";
- hoverbox.style.top = "0px";
- width = hoverbox.offsetWidth;
- height = hoverbox.offsetHeight;
- hoverMove(e);
- }
- HoverInfo.hoverStart = hoverStart;
- function hoverMove(e) {
- let left = e.clientX - (width / 2);
- let top = e.clientY - (height) - 6;
- if (top < 0) {
- top = e.clientY + 6;
- }
- if (left < width) {
- left = width;
- }
- if (left + width > Elements.screenWidth) {
- left = Elements.screenWidth - width;
- }
- hoverbox.style.left = Math.round(left) + "px";
- hoverbox.style.top = Math.round(top) + "px";
- }
- HoverInfo.hoverMove = hoverMove;
- function hoverEnd() {
- hoverbox.style.display = "none";
- }
- HoverInfo.hoverEnd = hoverEnd;
- })(HoverInfo = Elements.HoverInfo || (Elements.HoverInfo = {}));
- })(Elements || (Elements = {}));
- var Elements;
- (function (Elements) {
- var HyperlinkHandler;
- (function (HyperlinkHandler) {
- HyperlinkHandler.linkedActionsTab = document.getElementById("linkActions");
- HyperlinkHandler.commonActionsTab = document.getElementById("commonActionsTab");
- var currentCommand = document.createTextNode("");
- document.getElementById("currentCommand").appendChild(currentCommand);
- var currentActionTarget = document.createTextNode("");
- document.getElementById("linkTarget").appendChild(currentActionTarget);
- var commonActions = [];
- var availableActions = [];
- function resetCommonActions() {
- commonActions.splice(0, commonActions.length);
- while (HyperlinkHandler.commonActionsTab.firstChild) {
- HyperlinkHandler.commonActionsTab.removeChild(HyperlinkHandler.commonActionsTab.firstChild);
- }
- }
- HyperlinkHandler.resetCommonActions = resetCommonActions;
- function addCommonAction(name, action) {
- commonActions.push([name, action]);
- }
- HyperlinkHandler.addCommonAction = addCommonAction;
- function resetAvailableActions() {
- availableActions = [];
- currentActionTarget.nodeValue = "";
- while (HyperlinkHandler.linkedActionsTab.firstChild) {
- HyperlinkHandler.linkedActionsTab.removeChild(HyperlinkHandler.linkedActionsTab.firstChild);
- }
- }
- function addAvailableAction(name, action) {
- availableActions.push([name, action]);
- }
- HyperlinkHandler.addAvailableAction = addAvailableAction;
- function hoverAction(action) {
- currentCommand.nodeValue = action.getCommandText().toLowerCase();
- }
- HyperlinkHandler.hoverAction = hoverAction;
- function unhoverAction() {
- currentCommand.nodeValue = "";
- }
- HyperlinkHandler.unhoverAction = unhoverAction;
- async function hyperlinkObject(thing) {
- resetAvailableActions();
- if (thing instanceof Thing && thing != WorldState.player && thing.isVisibleTo(WorldState.player)) {
- await HyperlinkHandler.HyperlinkingRulebook.execute({ noun: thing });
- currentActionTarget.nodeValue = thing.getPrintedName() + ": ";
- for (let i = 0, value = availableActions[i]; value != undefined; value = availableActions[++i]) {
- let link = createLink(value);
- link.classList.add("columnLink");
- Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getSecondKeyCode());
- HyperlinkHandler.linkedActionsTab.appendChild(link);
- }
- }
- }
- HyperlinkHandler.hyperlinkObject = hyperlinkObject;
- function createLink(value) {
- let link = document.createElement("a");
- link.appendChild(document.createTextNode(value[0]));
- Controls.Links.makeLink(link, value[1]);
- return link;
- }
- async function hyperlinkCommonActions() {
- resetCommonActions();
- await HyperlinkHandler.CommonActionsRulebook.execute({});
- for (let i = 0, value = commonActions[i]; value != undefined; value = commonActions[++i]) {
- let link = createLink(value);
- link.classList.add("lineLink");
- Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getThirdKeyCode());
- HyperlinkHandler.commonActionsTab.appendChild(link);
- }
- }
- HyperlinkHandler.hyperlinkCommonActions = hyperlinkCommonActions;
- HyperlinkHandler.HyperlinkingRulebook = new Rulebook("Hyperlinking something");
- HyperlinkHandler.CommonActionsRulebook = new Rulebook("Common Actions Rulebook");
- })(HyperlinkHandler = Elements.HyperlinkHandler || (Elements.HyperlinkHandler = {}));
- })(Elements || (Elements = {}));
- class Action {
- constructor(actor, ...nouns) {
- this.extraChecks = [];
- this.extraCarries = [];
- this.nouns = [];
- this.say = new Say();
- this.actingAgressively = false;
- this.actingSubmissively = false;
- this.requiresTurn = true;
- this.requiresNoun = true;
- this.requiresVisibility = true;
- this.actor = actor;
- nouns.forEach((value, index, array) => {
- this.setNoun(index, value);
- });
- }
- async execute() {
- this.say = new Say();
- let checkRulebooks = [];
- let carryRulebooks = [];
- let cClass = this.constructor;
- while (cClass != Action) {
- if (cClass.check != undefined) {
- checkRulebooks.push(cClass.check);
- }
- if (cClass.carry != undefined) {
- carryRulebooks.push(cClass.carry);
- }
- cClass = Object.getPrototypeOf(cClass);
- }
- let result = await Action.check.execute({
- noun: this
- }, ...checkRulebooks);
- if (result == false) {
- return;
- }
- else if (result instanceof Action) {
- console.debug(Rulebook.getIndentation() + "[ACTION] Instead of...");
- await result.execute();
- this.say.add(result.say);
- this.nouns = result.nouns;
- return;
- }
- await Action.carry.execute({
- noun: this
- }, ...carryRulebooks);
- return this.say;
- }
- get actor() {
- return this._actor;
- }
- set actor(value) {
- this._actor = value;
- }
- getNoun(n) {
- if (this.nouns.length > n) {
- return this.nouns[n];
- }
- return undefined;
- }
- setNoun(n, noun) {
- while (this.nouns.length < n) {
- this.nouns.push(undefined);
- }
- this.nouns[n] = noun;
- }
- getCommandText() {
- return "do";
- }
- stop() {
- this.requiresTurn = false;
- }
- }
- Action.check = new Rulebook("Check any Action");
- Action.carry = new Rulebook("Carry out any Action");
- Action.check.addRule(new Rule({
- name: "Check any Action - Requires Noun",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: (rulebook) => {
- let action = rulebook.noun;
- if (action.getNoun(0) == undefined) {
- return false;
- }
- },
- conditions: runner => {
- return runner.noun.requiresNoun;
- }
- }));
- Action.check.addRule(new Rule({
- name: "Check any Action - Requires Visibility",
- code: (rulebook) => {
- let action = rulebook.noun;
- let actor = action.actor;
- if (!action.getNoun(0).isVisibleTo(actor)) {
- return false;
- }
- },
- conditions: runner => {
- return runner.noun.requiresVisibility;
- }
- }));
- class ActionExamine extends Action {
- constructor() {
- super(...arguments);
- this.requiresTurn = false;
- }
- getCommandText() {
- if (this.getNoun(0) == WorldState.player) {
- return "examine myself";
- }
- return "examine " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
- }
- }
- ActionExamine.check = new Rulebook("Check Examining");
- ActionExamine.carry = new Rulebook("Carry out Examining");
- ActionExamine.PrintDescriptionOfExaminedThingRule = ActionExamine.carry.createAndAddRule({
- name: "Examine - Print Description of Examined Thing",
- code: (rulebook) => {
- let action = rulebook.noun;
- let noun = action.getNoun(0);
- if (noun instanceof Thing && noun.image != undefined) {
- action.say.add(noun.image, Say.PARAGRAPH_BREAK);
- }
- action.say.add(action.getNoun(0).getPrintedDescription());
- }
- });
- Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
- name: "Look at me!",
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_HIGH,
- code: (rulebook) => {
- Elements.HyperlinkHandler.addCommonAction("Inspect", new ActionExamine(WorldState.player, WorldState.player));
- }
- }));
- class RelationHandler {
- constructor(...relations) {
- relations.forEach(relation => {
- relation.setHandler(this);
- });
- this.relations = relations;
- }
- addRelation(relation) {
- this.relations.push(relation);
- relation.setHandler(this);
- }
- }
- class Relation {
- setHandler(handler) {
- this.handler = handler;
- }
- hasHandler() {
- return this.handler != undefined;
- }
- static createString(obj1, obj2) {
- if (obj1 instanceof Object && obj2 instanceof Object) {
- let id1 = Relation.getId(obj1);
- let id2 = Relation.getId(obj2);
- return id1 < id2 ?
- (id1 + ";" + id2) :
- (id2 + ";" + id1);
- }
- }
- static getId(obj) {
- if (obj[Relation.objectIdField] == undefined) {
- obj[Relation.objectIdField] = Relation.objectCount++;
- }
- return obj[Relation.objectIdField];
- }
- }
- Relation.objectCount = 0;
- Relation.objectIdField = "_RELATIONINTERNALID";
- class RelationHandlerStrictOneToMany extends RelationHandler {
- setRelation(relation, left, right, value) {
- let parents = this.getAllLeft(left);
- if (parents.indexOf(right) != -1) {
- console.warn("[Relation] Attempt to create a circular relation:", this, left, right);
- return false;
- }
- this.unsetRight(right);
- return true;
- }
- unset(thing) {
- this.unsetLeft(thing);
- this.unsetRight(thing);
- }
- unsetLeft(left) {
- this.relations.forEach(relation => {
- relation.unsetLeft(left);
- });
- }
- unsetRight(right) {
- this.relations.forEach(relation => {
- relation.unsetRight(right);
- });
- }
- getLeft(right) {
- let result;
- for (let i = 0; i < this.relations.length; i++) {
- result = this.relations[i].getLeft(right);
- if (result != undefined) {
- return result;
- }
- }
- }
- getAllLeft(right) {
- let newParent = this.getLeft(right);
- let parents = [];
- while (newParent != undefined) {
- parents.push(newParent);
- newParent = this.getLeft(newParent);
- }
- return parents;
- }
- getAllLeftType(right, type) {
- return this.getAllLeft(right).filter(left => {
- return left instanceof type;
- });
- }
- getLastLeft(right) {
- let parent = this.getLeft(right);
- let newParent = this.getLeft(parent);
- while (newParent != undefined) {
- parent = newParent;
- newParent = this.getLeft(parent);
- }
- return parent;
- }
- getAllRight(left) {
- let rights = [];
- this.relations.forEach(relation => {
- rights.push(...relation.getRight(left));
- });
- arrayUnique(rights);
- return rights;
- }
- getAllRightTypes(left, rightType) {
- return this.getAllRight(left).filter(right => {
- return right instanceof rightType;
- });
- }
- }
- class RelationOneToMany extends Relation {
- constructor() {
- super(...arguments);
- this.valuesHash = {};
- this.oneMap = new Map();
- this.manyMap = new Map();
- }
- getValue(left, right) {
- return this.valuesHash[Relation.createString(left, right)];
- }
- setValue(left, right, value) {
- if (this.manyMap.get(right) == left) {
- let string = Relation.createString(left, right);
- if (string != undefined) {
- this.valuesHash[string] = value;
- }
- }
- }
- setRelation(left, right, value) {
- let proceed;
- if (this.handler != undefined) {
- proceed = this.handler.setRelation(this, left, right, value);
- }
- if (proceed) {
- this.unsetRight(left);
- this.unsetLeft(right);
- this.unsetRight(right);
- let string = Relation.createString(left, right);
- if (string != undefined) {
- this.valuesHash[string] = value;
- }
- this.manyMap.set(right, left);
- if (this.oneMap.get(left) == undefined) {
- this.oneMap.set(left, [right]);
- }
- else {
- this.oneMap.get(left).push(right);
- }
- }
- }
- getLeft(right) {
- return this.manyMap.get(right);
- }
- getAnyLeft() {
- let left = [];
- this.oneMap.forEach((value, key) => {
- left.push(key);
- });
- arrayUnique(left);
- return left;
- }
- getAnyRight() {
- let rights = [];
- this.oneMap.forEach((value) => {
- rights.push(...value);
- });
- arrayUnique(rights);
- return rights;
- }
- getAnyRightType(type) {
- return this.getAnyRight().filter(value => {
- return value instanceof type;
- });
- }
- isRight(left, needle) {
- let right = this.oneMap.get(left);
- if (right != undefined) {
- return right.indexOf(needle) != -1;
- }
- return false;
- }
- getRight(left) {
- let right = this.oneMap.get(left);
- if (right != undefined) {
- return [].concat(...right);
- }
- return [];
- }
- getRightType(left, type) {
- return this.getRight(left).filter(right => {
- return right instanceof type;
- });
- }
- getRightTypeOne(left, type) {
- let rights = this.getRightType(left, type);
- if (rights.length > 0) {
- return rights[0];
- }
- }
- getRelationValue(left, right) {
- return this.valuesHash[Relation.createString(left, right)];
- }
- unsetRight(right) {
- let left = this.manyMap.get(right);
- if (left != undefined) {
- let allRight = this.oneMap.get(left);
- allRight.splice(allRight.indexOf(right), 1);
- this.manyMap.delete(right);
- if (allRight.length == 0) {
- this.oneMap.delete(left);
- }
- let string = Relation.createString(left, right);
- if (string != undefined) {
- delete (this.valuesHash[string]);
- }
- }
- }
- unsetLeft(left) {
- let allRight = this.oneMap.get(left);
- if (allRight != undefined) {
- allRight.forEach((right) => {
- this.manyMap.delete(right);
- let string = Relation.createString(left, right);
- if (string != undefined) {
- delete (this.valuesHash[string]);
- }
- });
- this.oneMap.delete(left);
- }
- }
- }
- class Thing {
- constructor(options) {
- this.properlyNamed = false;
- this.scenery = false;
- this.fixedInPlace = false;
- this.animated = false;
- this.visible = true;
- this.unique = false;
- this.shiny = false;
- this.setAlterations = [];
- this.getAlterations = [];
- this.clone = function () {
- throw new Error("Non-unique Objects can't be cloned.");
- };
- options = options == undefined ? {} : options;
- if (options.properName != undefined) {
- this.name = options.properName;
- this.properlyNamed = true;
- }
- else if (options.name != undefined) {
- this.name = options.name;
- }
- else {
- this.name = this.constructor.name;
- }
- if (options.description != undefined) {
- if (options.description instanceof Say) {
- this.description = options.description;
- }
- else {
- this.description = new Say(options.description);
- }
- }
- if (options.unique) {
- Thing.storeUnique(this);
- this.unique = true;
- }
- else {
- Thing.storeNonUnique(this);
- this.cloneOptions = options;
- this.clone = (includeChanges) => {
- let cons = eval(this.constructor.name);
- let newThing = new cons(this.cloneOptions);
- if (includeChanges == undefined || includeChanges) {
- newThing.setChanges(this.getChanges());
- }
- return newThing;
- };
- }
- if (options.image != undefined) {
- if (options.image instanceof SayImage) {
- this.image = options.image;
- }
- else {
- this.image = new SayImage(options.image);
- }
- }
- this.shiny = options.shiny == true;
- this.addGetAlterations((thing) => {
- function getClosestRoom(currentRoom, rooms) {
- if (currentRoom instanceof RoomRandom && rooms.length > 0) {
- rooms.sort((a, b) => {
- if (!(a instanceof RoomRandom))
- return -1;
- if (!(b instanceof RoomRandom))
- return 1;
- let da = a.getDistanceTo(currentRoom);
- let db = b.getDistanceTo(currentRoom);
- return da - db;
- });
- return {
- Location: rooms[0].getName()
- };
- }
- }
- if (Thing.EnclosedRelation.getLeft(thing) == thing.getRoom() && thing.getRoom() != undefined) {
- if (thing.getRoom().fodder) {
- if (thing.isPlayer()) {
- let rooms = WorldState.getRememberedRoomsAsRooms();
- let currentRoom = thing.getRoom();
- return getClosestRoom(currentRoom, rooms);
- }
- else {
- let rooms = thing.getRoom().getConnectedRooms();
- let currentRoom = thing.getRoom();
- let foundRoom = getClosestRoom(currentRoom, rooms);
- if (foundRoom != undefined) {
- return foundRoom;
- }
- else {
- rooms = Region.InRelation.getLeft(thing.getRoom()).getRooms();
- return getClosestRoom(currentRoom, rooms);
- }
- }
- }
- else {
- return {
- Location: thing.getRoom().getName()
- };
- }
- }
- });
- this.addSetAlterations((thing, changes) => {
- if (changes.Location != undefined) {
- let room = Room.getRoom(changes.Location);
- if (room != undefined) {
- room.place(thing);
- }
- else {
- console.error("Unable to place ", thing, " at room ", changes.Location);
- }
- }
- });
- }
- addGetAlterations(newGet) {
- this.getAlterations.push(newGet);
- }
- addSetAlterations(newSet) {
- this.setAlterations.push(newSet);
- }
- getChanges() {
- let changes = {};
- for (let i = 0; i < this.getAlterations.length; i++) {
- let change = this.getAlterations[i](this);
- for (let key in change) {
- changes[key] = change[key];
- }
- }
- return changes;
- }
- setChanges(simpleAlterationObject) {
- for (let i = 0; i < this.setAlterations.length; i++) {
- this.setAlterations[i](this, simpleAlterationObject);
- }
- }
- getShiny() {
- return this.shiny;
- }
- setName(name) {
- this.name = name;
- }
- getName() {
- return this.name;
- }
- static storeNonUnique(thing) {
- if (Thing.things[thing.name] == undefined) {
- Thing.things[thing.name] = [thing];
- }
- else {
- Thing.things[thing.name].push(thing);
- }
- }
- static getNonUnique(name) {
- return Thing.things[name] == undefined ? [] : Thing.things[name];
- }
- static getOneThing(name) {
- let thing = Thing.getUnique(name);
- if (thing == undefined) {
- let things = Thing.getNonUnique(name);
- if (things.length > 0) {
- thing = things[0];
- }
- }
- return thing;
- }
- static storeUnique(unique) {
- if (Thing.uniqueThings[unique.name] != undefined) {
- console.warn(unique.name, Thing.uniqueThings[unique.name], new Error("Unique Thing Already Exists"));
- }
- else {
- Thing.uniqueThings[unique.name] = unique;
- }
- }
- static getUnique(name) {
- return Thing.uniqueThings[name];
- }
- static getUniques() {
- let things = [];
- for (let name in Thing.uniqueThings) {
- things.push(Thing.uniqueThings[name]);
- }
- return things;
- }
- getPrintedName() {
- return this.name;
- }
- getPrintedDescription() {
- if (this.description == undefined) {
- return new Say("You see nothing special about ", new SayThe(), this, ".");
- }
- else {
- return this.description;
- }
- }
- getPartOne() {
- return Thing.PartRelation.getLeft(this);
- }
- getCarryOne() {
- return Thing.CarryRelation.getLeft(this);
- }
- getWieldOne() {
- return Thing.WieldRelation.getLeft(this);
- }
- getWearOne() {
- return Thing.WearRelation.getLeft(this);
- }
- getEnclosedOne() {
- return Thing.EnclosedRelation.getLeft(this);
- }
- removeParts(partType) {
- let parts = this.getParts(partType);
- for (let i = 0; i < parts.length; i++) {
- Thing.PartRelation.unsetRight(parts[i]);
- }
- }
- getParts(partType) {
- if (partType != undefined) {
- return Thing.PartRelation.getRightType(this, partType);
- }
- return Thing.PartRelation.getRight(this);
- }
- getPartsByName(name) {
- let parts = this.getParts();
- return parts.filter((part) => {
- return (part.getName() == name);
- });
- }
- getPart(partType) {
- if (partType != undefined) {
- return Thing.PartRelation.getRightTypeOne(this, partType);
- }
- return Thing.PartRelation.getRight(this);
- }
- getHighestEnclosedOne() {
- return Thing.EnclosedRelation.getLastLeft(this);
- }
- getHighestEnclosedOneNotRoom() {
- let parent = Thing.EnclosedRelation.getLeft(this);
- if (parent != undefined) {
- let newParent = Thing.EnclosedRelation.getLeft(parent);
- while (newParent != undefined) {
- parent = newParent;
- newParent = Thing.EnclosedRelation.getLeft(parent);
- }
- return parent;
- }
- return this;
- }
- getRoom() {
- var partOf = Thing.EnclosedRelation.getLeft(this);
- if (partOf instanceof Room) {
- return partOf;
- }
- else if (partOf instanceof Thing) {
- return partOf.getRoom();
- }
- }
- removeFromRoom() {
- this.getRoom().remove(this);
- }
- isVisibleTo(thing) {
- return (this.getRoom() == thing.getRoom() && this.visible);
- }
- isPlayer() {
- return false;
- }
- addParts(...parts) {
- parts.forEach(part => {
- Thing.PartRelation.setRelation(this, part);
- });
- }
- isUnique() {
- return this.unique;
- }
- setCarried(thing) {
- Thing.CarryRelation.setRelation(this, thing);
- }
- setWorn(thing) {
- Thing.WearRelation.setRelation(this, thing);
- }
- setWielded(thing) {
- Thing.WieldRelation.setRelation(this, thing);
- }
- unsetCarried(thing) {
- if (Thing.EnclosedRelation.getAllRight(this).indexOf(thing) != -1) {
- Thing.EnclosedRelation.unsetRight(thing);
- this.getRoom().place(thing);
- }
- }
- destroy() {
- let relatedRight = Thing.EnclosedRelation.getAllRight(this);
- relatedRight.push(this);
- relatedRight.forEach(related => {
- Thing.EnclosedRelation.unset(related);
- });
- }
- }
- Thing.uniqueThings = {};
- Thing.things = {};
- Thing.InsideRoomRelation = new RelationOneToMany();
- Thing.PartRelation = new RelationOneToMany();
- Thing.CarryRelation = new RelationOneToMany();
- Thing.WieldRelation = new RelationOneToMany();
- Thing.WearRelation = new RelationOneToMany();
- Thing.EnclosedRelation = new RelationHandlerStrictOneToMany(Thing.InsideRoomRelation, Thing.PartRelation, Thing.CarryRelation, Thing.WieldRelation, Thing.WearRelation);
- class ActionTake extends Action {
- getCommandText() {
- return "take " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
- }
- }
- ActionTake.check = new Rulebook("Check Taking");
- ActionTake.carry = new Rulebook("Carry out Taking");
- ActionTake.defaultCarryTakingRule = new Rule({
- name: "Taking - Add the thing to your inventory",
- code: (rulebook) => {
- let action = rulebook.noun;
- let actor = action.actor;
- let thing = action.getNoun(0);
- if (thing.getEnclosedOne() != undefined) {
- Thing.EnclosedRelation.unsetRight(thing);
- }
- else {
- thing.removeFromRoom();
- }
- Thing.CarryRelation.setRelation(actor, action.getNoun(0));
- if (actor == WorldState.player) {
- action.say.add(new SayBold(action.getNoun(0).getPrintedName() + ": "), "Taken.");
- }
- else {
- action.say.add(new SayThe(), actor, " takes ", new SayThe(undefined, true), action.getNoun(0), ".");
- }
- }
- });
- ActionTake.check.addRule(new Rule({
- name: "Check Taking - Who has it, really?",
- priority: Rule.PRIORITY_HIGHEST,
- code: (rulebook) => {
- let action = rulebook.noun;
- let actor = action.actor;
- let thing = action.getNoun(0);
- let owner = thing.getEnclosedOne();
- if (owner == actor) {
- if (owner == WorldState.player) {
- action.say.add("You already have it.");
- }
- return false;
- }
- }
- }));
- ActionTake.check.addRule(new Rule({
- name: "Check Taking - Donut steal",
- code: (rulebook) => {
- let action = rulebook.noun;
- let actor = action.actor;
- let thing = action.getNoun(0);
- let owner = thing.getEnclosedOne();
- if (owner != undefined && owner.animated) {
- if (actor == WorldState.player) {
- action.say.add(owner.getPrintedName() + " wouldn't like that.");
- }
- return false;
- }
- }
- }));
- ActionTake.check.addRule(new Rule({
- name: "Check Taking - Can't take fixed in place",
- code: (rulebook) => {
- let action = rulebook.noun;
- let actor = action.actor;
- let thing = action.getNoun(0);
- if (thing.fixedInPlace) {
- if (actor == WorldState.player) {
- action.say.add("You can't take that.");
- }
- return false;
- }
- }
- }));
- ActionTake.carry.addRule(ActionTake.defaultCarryTakingRule);
- Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
- name: "Hyperlink - Take",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: (rulebook) => {
- let thing = rulebook.noun;
- if (!thing.animated && !thing.fixedInPlace && thing.getRoom() == WorldState.player.getRoom() && thing.getEnclosedOne() instanceof Room) {
- Elements.HyperlinkHandler.addAvailableAction("Take", new ActionTake(WorldState.player, thing));
- }
- }
- }));
- class ActionGo extends Action {
- constructor(actor, ...nouns) {
- super(actor, ...nouns);
- this.originalTarget = nouns[0];
- this.requiresNoun = false;
- this.requiresVisibility = false;
- }
- getCommandText() {
- let name;
- if (typeof this.originalTarget == "number") {
- name = DirectionNames[Direction[this.originalTarget]];
- }
- else if (this.originalTarget instanceof Room) {
- name = "to " + this.originalTarget.getPrintedName();
- }
- return "go " + name;
- }
- }
- ActionGo.check = new Rulebook("Check Going");
- ActionGo.carry = new Rulebook("Carry out Going");
- ActionGo.ruleCheckRestoreOriginalNoun = ActionGo.check.createAndAddRule({
- firstPriority: Rule.PRIORITY_HIGHEST,
- priority: Rule.PRIORITY_HIGHEST,
- name: "Check Going - Restore original noun",
- code: (rulebook) => {
- let action = rulebook.noun;
- action.setNoun(0, action.originalTarget);
- }
- });
- ActionGo.ruleCheckIsthereactor = ActionGo.check.createAndAddRule({
- firstPriority: Rule.PRIORITY_HIGHEST,
- priority: Rule.PRIORITY_HIGHEST,
- name: "Check Going - Is there an actor?",
- code: (rulebook) => {
- let action = rulebook.noun;
- if (action.actor == undefined) {
- return false;
- }
- }
- });
- ActionGo.ruleCheckConvertRoomToDirection = ActionGo.check.createAndAddRule({
- firstPriority: Rule.PRIORITY_HIGHEST,
- priority: Rule.PRIORITY_HIGH,
- name: "Change Room to Direction",
- code: (rulebook) => {
- let action = rulebook.noun;
- if (action.getNoun(0) instanceof RoomRandom) {
- let actor = action.actor;
- let cRoom = actor.getRoom();
- if (cRoom instanceof RoomRandom) {
- let dRoom = action.getNoun(0);
- if (cRoom == dRoom) {
- if (actor.isPlayer()) {
- action.say.add("You are already there!");
- }
- action.stop();
- return false;
- }
- let code;
- if (actor == WorldState.player) {
- code = (room) => {
- return WorldState.isRoomRemembered(room);
- };
- }
- let direction = cRoom.getAStarBestDirectionTo(dRoom, code);
- if (direction == undefined) {
- if (actor.isPlayer()) {
- action.say.add("You don't remember how to get there.");
- }
- return false;
- }
- else {
- action.setNoun(0, direction);
- }
- }
- }
- }
- });
- ActionGo.ruleCheckIstheredirectionandroom = ActionGo.check.createAndAddRule({
- name: "Check Going - is there a direction? Does it lead anywhere?",
- code: (rulebook) => {
- let action = rulebook.noun;
- let cRoom = action.actor.getRoom();
- if (cRoom == undefined) {
- return false;
- }
- let direction = action.getNoun(0);
- if (direction == undefined) {
- return false;
- }
- let nextRoom = cRoom.connections[direction];
- if (nextRoom == undefined) {
- return false;
- }
- action.roomGoneFrom = action.actor.getRoom();
- action.roomGoneTo = nextRoom;
- }
- });
- ActionGo.ruleCarryMove = ActionGo.carry.createAndAddRule({
- name: "Going - Move Actor to Next Room",
- code: (rulebook) => {
- let action = rulebook.noun;
- let roomGoneFrom = action.actor.getRoom();
- let direction = action.getNoun(0);
- let roomGoneInto = roomGoneFrom.connections[direction];
- roomGoneInto.place(action.actor);
- let actor = action.actor;
- if (actor == WorldState.player) {
- action.say.add("You go " + DirectionNames[Direction[direction]].toLowerCase() + ".");
- }
- else {
- if (roomGoneFrom == WorldState.player.getRoom()) {
- action.say.add(new SayThe(), actor, " goes " + DirectionNames[Direction[direction]].toLowerCase() + ".");
- }
- else {
- let oppositeName = DirectionNames[OppositeDirection[direction]];
- action.say.add(new SayThe(), actor, " arrives from the " + oppositeName.toLowerCase() + ".");
- }
- }
- }
- });
- ActionGo.ruleCarryRememberRooms = ActionGo.carry.createAndAddRule({
- name: "Going - Remember the involved rooms",
- code: (rulebook) => {
- let action = rulebook.noun;
- let actor = action.actor;
- let roomGoneInto = action.actor.getRoom();
- let direction = action.getNoun(0);
- let roomGoneFrom = roomGoneInto.connections[OppositeDirection[Direction[direction]]];
- if (actor.isPlayer()) {
- WorldState.rememberRoom(roomGoneFrom, roomGoneInto);
- }
- }
- });
- var Elements;
- (function (Elements) {
- var RoomHandler;
- (function (RoomHandler) {
- RoomHandler.currentRoomTab = document.getElementById("currentRoomTab");
- RoomHandler.currentRoomDescription = document.getElementById("roomDescription");
- RoomHandler.currentRoomExits = document.getElementById("roomExits");
- RoomHandler.currentRoomName = document.createTextNode("");
- document.getElementById("roomName").appendChild(RoomHandler.currentRoomName);
- function linkObjects() {
- let objs = RoomHandler.currentRoomTab.getElementsByClassName("roomObject");
- for (let i = 0; i < objs.length; i++) {
- let linkKeyCode = Controls.KeyHandler.getFirstKeyCode();
- Controls.KeyHandler.applyCode(objs[i], linkKeyCode);
- }
- }
- RoomHandler.linkObjects = linkObjects;
- function emptyRoom() {
- while (RoomHandler.currentRoomDescription.firstChild) {
- RoomHandler.currentRoomDescription.removeChild(RoomHandler.currentRoomDescription.firstChild);
- }
- while (RoomHandler.currentRoomExits.firstChild) {
- RoomHandler.currentRoomExits.removeChild(RoomHandler.currentRoomExits.firstChild);
- }
- RoomHandler.currentRoomName.nodeValue = "";
- }
- RoomHandler.emptyRoom = emptyRoom;
- async function updateRoom() {
- emptyRoom();
- let room = WorldState.player.getRoom();
- if (room != undefined) {
- RoomHandler.currentRoomName.nodeValue = room.getPrintedName();
- let description = room.description.getHTML("p", ["roomDescription"]);
- await description.then(value => {
- for (let i = 0, p = value[i]; p != undefined; p = value[++i]) {
- RoomHandler.currentRoomDescription.appendChild(p);
- }
- });
- let things = room.getContainedAndVisible();
- if (things.length > 0) {
- let thingList = document.createElement("p");
- thingList.classList.add("roomDescription");
- await RoomHandler.PrintingVisibleThingsRulebook.execute({
- noun: {
- things: things,
- container: thingList
- }
- });
- RoomHandler.currentRoomDescription.appendChild(thingList);
- }
- for (let index = 0, value = room.connections[index]; index < room.connections.length; value = room.connections[++index]) {
- if (value != undefined) {
- let p = document.createElement("p");
- p.classList.add("roomExit");
- let link = document.createElement("a");
- link.classList.add("roomDirection");
- link.appendChild(document.createTextNode(DirectionNames[Direction[index]]));
- Controls.Links.makeLink(link, new ActionGo(WorldState.player, index));
- Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getDirectionCodeByIndex(index));
- p.appendChild(link);
- let directionResult = ": ";
- if (WorldState.isRoomRemembered(value)) {
- directionResult += value.getPrintedName();
- }
- else {
- directionResult += "A new place";
- }
- p.appendChild(document.createTextNode(directionResult));
- RoomHandler.currentRoomExits.appendChild(p);
- }
- }
- }
- }
- RoomHandler.updateRoom = updateRoom;
- RoomHandler.PrintingVisibleThingsRulebook = new Rulebook("Printing the name of visible things in a room");
- RoomHandler.PrintIntroToVisibleThingsRule = new Rule({
- name: "Print \"You can see\" text",
- firstPriority: Rule.PRIORITY_HIGH,
- code: (rulebook) => {
- let noun = rulebook.noun;
- noun.container.appendChild(document.createTextNode("You can see "));
- }
- });
- RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintIntroToVisibleThingsRule);
- RoomHandler.PrintVisibleThingsRule = new Rule({
- name: "Print all visible things",
- code: async (rulebook) => {
- let noun = rulebook.noun;
- for (let i = 0; i < noun.things.length; i++) {
- let value = noun.things[i];
- let link = document.createElement("a");
- link.classList.add("roomObject");
- let say;
- if (value instanceof Thing && value.unique) {
- say = new Say(new SayThe(false), value);
- }
- else {
- say = new Say(new SayAn(false), value);
- }
- await say.getPureElements().then(value2 => {
- for (let i = 0, element = value2[i]; element != undefined; element = value2[++i]) {
- link.appendChild(element);
- }
- });
- Controls.Links.makeLink(link, new ActionExamine(WorldState.player, value));
- Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getFirstKeyCode());
- noun.container.appendChild(link);
- if ((i + 1) < noun.things.length) {
- noun.container.appendChild(document.createTextNode(", "));
- }
- }
- }
- });
- RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintVisibleThingsRule);
- RoomHandler.PrintOutroToVisibleThingsRule = new Rule({
- name: "Print \"... here\" text",
- firstPriority: Rule.PRIORITY_LOW,
- code: (rulebook) => {
- let noun = rulebook.noun;
- noun.container.appendChild(document.createTextNode(" here."));
- }
- });
- RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintOutroToVisibleThingsRule);
- })(RoomHandler = Elements.RoomHandler || (Elements.RoomHandler = {}));
- })(Elements || (Elements = {}));
- class CoinPouch extends Thing {
- constructor(options) {
- super(options);
- this.coins = 0;
- this.addGetAlterations((purse) => {
- return {
- coins: purse.getCoins()
- };
- });
- this.addSetAlterations((purse, changeObj) => {
- purse.coins = (changeObj.coins);
- });
- }
- addCoins(coins) {
- this.coins += coins;
- }
- removeCoins(coins) {
- this.coins -= coins;
- }
- getCoins() {
- return this.coins;
- }
- getShiny() {
- return this.coins > 0;
- }
- }
- CoinPouch.carryOutTakingCoinPouches = new Rule({
- name: "Carry out taking coin pouches",
- firstPriority: ActionTake.defaultCarryTakingRule.firstPriority,
- priority: ActionTake.defaultCarryTakingRule.priority + 1,
- code: async (rulebook) => {
- let action = rulebook.noun;
- let actor = action.actor;
- let thing = action.getNoun(0);
- let actorPouches = Thing.CarryRelation.getRightType(actor, CoinPouch);
- if (actorPouches.length > 0) {
- let thingCoins = thing.getCoins();
- if (thingCoins > 0) {
- rulebook.skipRule(ActionTake.defaultCarryTakingRule);
- actorPouches[0].addCoins(thingCoins);
- thing.removeCoins(thing.getCoins());
- if (actor == WorldState.player) {
- action.say.add("You empty ", new SayThe(), thing, " into your ", actorPouches[0], ". Your ", actorPouches[0], " now has " + actorPouches[0].getCoins().toString() + " coins.");
- }
- else {
- action.say.add(new SayThe(), actor, " empties ", new SayThe(), thing, " into ", Say.hisHersIts(actor), actorPouches[0], ".");
- }
- }
- else {
- let myCoins = actorPouches[0].getCoins();
- actorPouches[0].removeCoins(myCoins);
- thing.addCoins(myCoins);
- if (actor == WorldState.player) {
- action.say.add("You empty your ", actorPouches[0], " into ", new SayThe(), thing, ".", Say.PARAGRAPH_BREAK);
- }
- let drop = new ActionDrop(actor, actorPouches[0]);
- await drop.execute();
- if (Thing.EnclosedRelation.getLeft(actorPouches[0]) == actor) {
- if (actor == WorldState.player) {
- action.say.add("You can't get rid of your ", actorPouches[0], "!");
- }
- return false;
- }
- }
- }
- },
- conditions: (rulebook) => {
- return (rulebook.noun.getNoun(0) instanceof CoinPouch);
- }
- });
- ActionTake.carry.addRule(CoinPouch.carryOutTakingCoinPouches);
- Say.afterPrinting.addRule(new Rule({
- name: "Include contents of Coin Pouch while Printing Visible Things in a Room",
- code: (rulebook) => {
- let say = rulebook.noun;
- let pouch = say.currentNoun;
- say.currentNounElements.push(document.createTextNode(" with " + pouch.getCoins().toString() + " coins"));
- },
- conditions: (rulebook) => {
- return Elements.RoomHandler.PrintingVisibleThingsRulebook.isRunning()
- && rulebook.noun.currentNoun instanceof CoinPouch
- && rulebook.noun.currentNoun.getCoins() > 0;
- }
- }));
- ActionExamine.carry.addRule(new Rule({
- name: "Print description of coins in Coin Pouch",
- firstPriority: ActionExamine.PrintDescriptionOfExaminedThingRule.firstPriority,
- priority: ActionExamine.PrintDescriptionOfExaminedThingRule.priority - 1,
- code: (rulebook) => {
- let action = rulebook.noun;
- let thing = action.getNoun(0);
- if (thing.getCoins() > 0) {
- action.say.add(" There are " + thing.getCoins().toString() + " coins in it.");
- }
- else {
- action.say.add(" There are no coins in it.");
- }
- },
- conditions: (rulebook) => {
- return (rulebook.noun.getNoun(0) instanceof CoinPouch);
- }
- }));
- var Elements;
- (function (Elements) {
- var InventoryHandler;
- (function (InventoryHandler) {
- var container = document.getElementById("inventoryTarget");
- function empty() {
- while (container.firstChild) {
- container.removeChild(container.firstChild);
- }
- }
- function printHeader(header) {
- let p = document.createElement("p");
- p.classList.add("inventoryHeader");
- p.appendChild(document.createTextNode(header + ":"));
- container.appendChild(p);
- }
- let currentRow;
- InventoryHandler.LinkingThing = new Rulebook("Inventory - Links for a Thing");
- function printThingLink(shortcut, action) {
- let nameLink = document.createElement("div");
- nameLink.classList.add("inventoryLink");
- nameLink.appendChild(document.createTextNode(shortcut));
- currentRow.appendChild(nameLink);
- Controls.Links.makeLink(nameLink, action);
- }
- InventoryHandler.printThingLink = printThingLink;
- async function printThing(thing) {
- currentRow = document.createElement("div");
- currentRow.classList.add("inventoryRow");
- let nameLink = document.createElement("div");
- nameLink.classList.add("inventoryLink", "name");
- nameLink.appendChild(document.createTextNode(thing.getPrintedName()));
- currentRow.appendChild(nameLink);
- Controls.Links.makeLink(nameLink, new ActionExamine(WorldState.player, thing));
- await InventoryHandler.LinkingThing.execute({ noun: thing });
- container.appendChild(currentRow);
- }
- function thingSort(a, b) {
- let na = a.getPrintedName().toLowerCase();
- let nb = b.getPrintedName().toLowerCase();
- if (na < nb)
- return -1;
- if (na > nb)
- return 1;
- return 0;
- }
- InventoryHandler.thingSort = thingSort;
- async function updateInventory() {
- let player = WorldState.player;
- empty();
- let wielded = Thing.WieldRelation.getRight(player).sort(thingSort);
- let worn = Thing.WearRelation.getRight(player).sort(thingSort);
- let carried = Thing.CarryRelation.getRight(player).sort(thingSort);
- if (wielded.length > 0) {
- printHeader("Wielded");
- for (let i = 0; i < wielded.length; i++) {
- await printThing(wielded[i]);
- }
- }
- if (worn.length > 0) {
- printHeader("Worn");
- for (let i = 0; i < worn.length; i++) {
- await printThing(worn[i]);
- }
- }
- if (carried.length > 0) {
- printHeader("Carried");
- for (let i = 0; i < carried.length; i++) {
- await printThing(carried[i]);
- }
- }
- let pouch = Thing.CarryRelation.getRightType(WorldState.player, CoinPouch);
- if (pouch.length > 0) {
- let p = document.createElement("p");
- p.classList.add("inventoryGold");
- let s;
- if (pouch[0].getCoins() > 0) {
- s = new Say("There are " + pouch[0].getCoins().toString() + " coins in your ", pouch[0], ".");
- }
- else {
- s = new Say("There are no coins in your ", pouch[0], ".");
- }
- await s.getPureElements().then(elements => {
- elements.forEach(element => {
- p.appendChild(element);
- });
- });
- container.appendChild(p);
- }
- }
- InventoryHandler.updateInventory = updateInventory;
- })(InventoryHandler = Elements.InventoryHandler || (Elements.InventoryHandler = {}));
- })(Elements || (Elements = {}));
- class ActionRetrace extends Action {
- constructor(actor, ...nouns) {
- super(actor, ...nouns);
- this.requiresNoun = false;
- this.requiresVisibility = false;
- this.requiresTurn = false;
- }
- getCommandText() {
- let name;
- if (typeof this.getNoun(0) == "number") {
- name = DirectionNames[Direction[this.getNoun(0)]];
- }
- else if (this.getNoun(0) instanceof Room) {
- name = this.getNoun(0).getPrintedName();
- }
- return "think about how to get to " + name;
- }
- }
- ActionRetrace.check = new Rulebook("Check Retracing");
- ActionRetrace.carry = new Rulebook("Carry out Retracing");
- ActionRetrace.check.addRule(new Rule({
- firstPriority: Rule.PRIORITY_HIGHEST,
- priority: Rule.PRIORITY_HIGH,
- name: "Change Room to Direction",
- code: (rulebook) => {
- let action = rulebook.noun;
- if (action.getNoun(0) instanceof Room) {
- let actor = action.actor;
- let cRoom = actor.getRoom();
- if (cRoom == undefined) {
- return false;
- }
- let dRoom = action.getNoun(0);
- if (cRoom == dRoom) {
- if (actor.isPlayer()) {
- action.say.add("You are already there!");
- }
- action.stop();
- return false;
- }
- let code;
- if (actor == WorldState.player) {
- code = (room) => {
- return WorldState.isRoomRemembered(room);
- };
- }
- let direction = cRoom.bestDirectionTo(dRoom, code);
- if (direction == undefined) {
- if (actor.isPlayer()) {
- action.say.add("You don't remember how to get there.");
- }
- return false;
- }
- else {
- action.setNoun(0, direction);
- }
- }
- }
- }));
- ActionRetrace.carry.addRule(new Rule({
- name: "Retracing - Find Direction",
- code: (rulebook) => {
- let action = rulebook.noun;
- action.say.add("To get there, you should go " + DirectionNames[Direction[action.getNoun(0)]] + ".");
- }
- }));
- var Elements;
- (function (Elements) {
- var RememberedHandler;
- (function (RememberedHandler) {
- var mapTarget = document.getElementById("mapTarget");
- var lastMap;
- var elements;
- function empty() {
- elements = {};
- lastMap = undefined;
- while (mapTarget.firstChild) {
- mapTarget.removeChild(mapTarget.firstChild);
- }
- }
- RememberedHandler.empty = empty;
- async function updateMap() {
- console.debug(Rulebook.getIndentation() + "[MAP] Creating Map");
- let regions = Region.InRelation.getAllLeftType(WorldState.player.getRoom(), RegionRandom);
- let biggestRegion = regions[regions.length - 1];
- if (biggestRegion == undefined) {
- empty();
- return;
- }
- if (biggestRegion.map != lastMap) {
- empty();
- }
- else {
- await updateOldMap();
- return;
- }
- let map = biggestRegion.map;
- lastMap = map;
- map.updateAllLimits();
- for (let y = map.highestY; y >= map.lowestY; y--) {
- let row = document.createElement("div");
- row.classList.add("mapRow");
- for (let x = map.lowestX; x <= map.highestX; x++) {
- let room = map.getRoom(x, y);
- let roomNode = new RoomNode(room);
- await roomNode.createRoomNameFloater();
- let roomDiv = roomNode.getElement();
- row.appendChild(roomDiv);
- elements[x.toString() + ";" + y.toString()] = roomNode;
- }
- mapTarget.appendChild(row);
- }
- await updateOldMap();
- }
- RememberedHandler.updateMap = updateMap;
- async function updateOldMap() {
- let map = lastMap;
- for (let y = map.highestY; y >= map.lowestY; y--) {
- for (let x = map.lowestX; x <= map.highestX; x++) {
- await elements[x.toString() + ";" + y.toString()].update();
- }
- }
- }
- RememberedHandler.updateOldMap = updateOldMap;
- })(RememberedHandler = Elements.RememberedHandler || (Elements.RememberedHandler = {}));
- })(Elements || (Elements = {}));
- var Debug;
- (function (Debug) {
- function knowdewae() {
- let map = new MapNote({
- name: "De Wae",
- description: "This map shows de wae all de wae to Zimbabwe."
- });
- map.addRoom(...Region.RegionRoom.getAnyRightType(RoomRandom));
- WorldState.player.setCarried(map);
- }
- Debug.knowdewae = knowdewae;
- function hurt(target, amount) {
- let bp;
- if (target instanceof Person) {
- bp = target.getPart(HumanoidTorso);
- if (bp == undefined)
- return;
- }
- else if (target instanceof Bodypart) {
- bp = target;
- }
- bp.changeSoreness(amount);
- }
- Debug.hurt = hurt;
- function goTo(str) {
- }
- Debug.goTo = goTo;
- })(Debug || (Debug = {}));
- class AI {
- constructor(options) {
- this.wanderer = true;
- this.wanderChance = 50;
- this.picksShinies = true;
- this.extraRules = [];
- this.extraCombatRules = [];
- for (let key in options) {
- this[key] = options[key];
- }
- }
- async execute(actor) {
- let promise;
- if (promise != undefined) {
- promise = AI.combatRules.execute({
- noun: actor
- }, ...this.extraCombatRules);
- }
- else {
- promise = AI.rules.execute({
- noun: actor
- }, ...this.extraRules);
- }
- let result = await promise;
- return result;
- }
- addRulesBook(...books) {
- this.extraRules.push(...books);
- arrayUnique(this.extraRules);
- }
- addCombatRulesBook(...books) {
- this.extraCombatRules.push(...books);
- arrayUnique(this.extraCombatRules);
- }
- }
- AI.rules = new Rulebook("Default AI Rules");
- AI.combatRules = new Rulebook("Default AI Combat Rules");
- var AIRules;
- (function (AIRules) {
- AIRules.PRIORITY_ACTING_ON_SITUATION = 5;
- AIRules.PRIORITY_ACTING_ON_PLACE = 3;
- AIRules.PRIORITY_ACTING_ON_IDLE = 1;
- })(AIRules || (AIRules = {}));
- class PersonStat {
- constructor(id, description) {
- this.defaultValue = 0;
- this.maxValue = 10;
- this.id = id;
- this.description = description == undefined ? "Not defined" : description;
- }
- getDescription(value) {
- if (typeof this.description == "string" || this.description instanceof Say) {
- return this.description;
- }
- else {
- return this.description(value);
- }
- }
- }
- class Attribute extends PersonStat {
- constructor(id, description, defValue, maxValue) {
- super(id, description);
- this.defaultValue = 2;
- this.maxValue = 5;
- if (defValue != undefined) {
- this.defaultValue = defValue;
- }
- if (maxValue != undefined) {
- this.maxValue = maxValue;
- }
- Attribute.Attributes[id] = this;
- }
- static getAttributes() {
- let attributes = [];
- for (let key in Attribute.Attributes) {
- attributes.push(Attribute.Attributes[key]);
- }
- return attributes;
- }
- static getAttribute(id) {
- return Attribute.Attributes[id];
- }
- }
- Attribute.Attributes = {};
- var Attributes;
- (function (Attributes) {
- Attributes.Strength = new Attribute("Strength", value => {
- switch (value) {
- case 5: return "Hercules' Bigger Cousin";
- case 4: return ("Circus Strong" + (WorldState.player.isMale() ? "man" : "woman"));
- case 3: return "Beach Bully";
- case 2: return ("Average " + (WorldState.player.isMale() ? "Joe" : "Jane"));
- case 1: return "Wet Noodle";
- default: return "Out of bounds.";
- }
- });
- Attributes.Agility = new Attribute("Agility", value => {
- switch (value) {
- case 5: return "Catlike";
- case 4: return "Gymnast";
- case 3: return "Accurate";
- case 2: return "Common";
- case 1: return "Accident-prone";
- default: return "Out of bounds.";
- }
- });
- Attributes.Intelligence = new Attribute("Intelligence", value => {
- switch (value) {
- case 5: return "Genius";
- case 4: return "Gifted";
- case 3: return "Knowledgeable";
- case 2: return "Normal";
- case 1: return "Door";
- default: return "Out of bounds.";
- }
- });
- Attributes.Charm = new Attribute("Charm", value => {
- switch (value) {
- case 5: return (WorldState.player.isMale() ? "Casanova" : "Seductress");
- case 4: return "Diplomat";
- case 3: return ("Cheery Sales" + (WorldState.player.isMale() ? "man" : "woman"));
- case 2: return "Not even trying";
- case 1: return "Unpleasant";
- default: return "Out of bounds.";
- }
- });
- Attributes.Corruption = new Attribute("Corruption", value => {
- return "Not defined";
- }, 0, 100);
- Attributes.GenderIdentity = new Attribute("Gender Identity", value => {
- if (value >= 75) {
- return "You strongly feel, and act, like a woman.";
- }
- else if (value >= 60) {
- return "You feel, and act, like a woman.";
- }
- else if (value >= 40) {
- return "You don't feel nor act like any particular gender.";
- }
- else if (value >= 20) {
- return "You feel, and act, like a man.";
- }
- else {
- return "You strongly feel, and act, like a man.";
- }
- }, 50, 100);
- Attributes.Degeneration = new Attribute("Degeneration", value => {
- if (value >= 75) {
- return "Sex is about the only thing on your mind, and you don't even try to hide it anymore.";
- }
- else if (value >= 60) {
- return "Sometimes you can't hide how naughty you'd like to be.";
- }
- else if (value >= 40) {
- return "";
- }
- else if (value >= 20) {
- return "Your composure is prudish and calm.";
- }
- else {
- return "You have the composure of a saint.";
- }
- }, 30, 100);
- })(Attributes || (Attributes = {}));
- class Skill extends PersonStat {
- constructor(id, description) {
- super(id, description);
- this.defaultValue = 0;
- this.maxValue = 5;
- Skill.Skills[id] = this;
- }
- static getSkills() {
- let skills = [];
- for (let key in Skill.Skills) {
- skills.push(Skill.Skills[key]);
- }
- skills.sort((a, b) => {
- let na = a.id.toUpperCase();
- let nb = b.id.toUpperCase();
- if (na > nb)
- return 1;
- if (na < nb)
- return -1;
- return 0;
- });
- return skills;
- }
- static getSkill(id) {
- return Skill.Skills[id];
- }
- }
- Skill.Skills = {};
- var Skills;
- (function (Skills) {
- Skills.Survival = new Skill("Survival", (value) => {
- switch (value) {
- case 5: return "";
- case 4: return "";
- case 3: return "";
- case 2: return "";
- case 1: return "Alert Chihuahua";
- }
- });
- })(Skills || (Skills = {}));
- class Container extends Thing {
- put(...things) {
- }
- }
- class Corpse extends Container {
- }
- class Person extends Thing {
- constructor(options) {
- super(options);
- this.AI = new AI({});
- this.animated = true;
- this.soreness = 0;
- this.lastHealthUpdate = 0;
- this.stamina = 10;
- this.lastStaminaUpdate = 0;
- this.staminaPerTurn = 1;
- this.attributeValue = {};
- this.skillValue = {};
- this.addGetAlterations((person) => {
- if (person.isPlayer()) {
- return {
- Stats: this.attributeValue,
- Skills: this.skillValue
- };
- }
- });
- this.addSetAlterations((person, changes) => {
- if (person.isPlayer()) {
- if (changes.Stats != undefined) {
- for (let name in changes.Stats) {
- let attr = Attribute.getAttribute(name);
- if (attr != undefined) {
- this.setStat(attr, changes.Stats[name]);
- }
- }
- }
- if (changes.Skills != undefined) {
- for (let name in changes.Skills) {
- let attr = Skill.getSkill(name);
- if (attr != undefined) {
- this.setSkill(attr, changes.Skills[name]);
- }
- }
- }
- }
- });
- }
- changeHealth(n) {
- let bodyparts = this.getParts(Bodypart);
- for (let i = 0; i < bodyparts.length; i++) {
- bodyparts[i].changeSoreness(n);
- }
- this.updateHealth();
- }
- getHealthOnScale() {
- return Math.round(((this.getHealth() * 10) / (this.getStat(Attributes.Strength) * 2)));
- }
- getHealth(important) {
- if (important === true || this.lastHealthUpdate != WorldState.getCurrentTurn()) {
- this.updateHealth();
- }
- return this.soreness / (this.getStat(Attributes.Strength) * Person.STRENGTH_SORENESS_MULTIPLIER);
- }
- updateHealth() {
- let health = 0;
- let bodyparts = this.getParts(Bodypart);
- for (let i = 0; i < bodyparts.length; i++) {
- health += bodyparts[i].getWeightedSoreness();
- }
- this.soreness = health;
- this.lastHealthUpdate = WorldState.getCurrentTurn();
- }
- changeStamina(n) {
- this.updateStamina();
- this.stamina += n;
- if (this.stamina > Person.MAX_STAMINA) {
- this.stamina = Person.MAX_STAMINA;
- }
- else if (this.stamina < 0) {
- this.stamina = 0;
- }
- }
- getStaminaOnScale() {
- return Math.round(((this.stamina * 10) / Person.MAX_STAMINA));
- }
- updateStamina() {
- var nTurns = WorldState.getCurrentTurn() - this.lastStaminaUpdate;
- this.stamina += this.staminaPerTurn * nTurns;
- if (this.stamina > Person.MAX_STAMINA) {
- this.stamina = Person.MAX_STAMINA;
- }
- }
- isPlayer() {
- return this == WorldState.player;
- }
- getStat(stat) {
- if (this.attributeValue[stat.id] == undefined) {
- this.attributeValue[stat.id] = stat.defaultValue;
- }
- return this.attributeValue[stat.id];
- }
- setStat(stat, value) {
- this.attributeValue[stat.id] = value;
- }
- getSkill(stat) {
- if (this.skillValue[stat.id] == undefined) {
- this.skillValue[stat.id] = stat.defaultValue;
- }
- return this.skillValue[stat.id];
- }
- setSkill(stat, value) {
- this.skillValue[stat.id] = value;
- }
- die() {
- let corpse = new Corpse({
- name: this.name + "'s corpse",
- unique: false,
- description: new Say("The lifeless body of ", this, ". May ", new SayHeSheIt(this), " rest in peace.")
- });
- corpse.put(...Thing.CarryRelation.getRight(this));
- corpse.put(...Thing.WearRelation.getRight(this));
- this.getRoom().place(corpse);
- OutOfPlay.removeFromPlay(this);
- }
- }
- Person.MAX_STAMINA = 10;
- Person.STRENGTH_SORENESS_MULTIPLIER = 4;
- var EveryTurn;
- (function (EveryTurn_1) {
- EveryTurn_1.EveryTurn = new Rulebook("Every Turn");
- EveryTurn_1.RunAIRule = EveryTurn_1.EveryTurn.createAndAddRule({
- name: "Run NPC AI Rule",
- code: async function () {
- function isAIAvailable(person) {
- return (person != WorldState.player
- && ((person.getRoom() instanceof RoomRandom
- && person.getRoom().placed)));
- }
- let people = Thing.InsideRoomRelation.getAnyRightType(Person).filter(isAIAvailable);
- for (let i = 0; i < people.length; i++) {
- let action = await people[i].AI.execute(people[i]);
- let person = people[i];
- let visible = people[i].isVisibleTo(WorldState.player);
- if (action != undefined) {
- let printValue = await action.execute();
- if ((visible ||
- person.isVisibleTo(WorldState.player)) && printValue != undefined) {
- Elements.CurrentTurnHandler.printAsContent(printValue);
- }
- }
- }
- }
- });
- EveryTurn_1.incrementTurnCounterRule = EveryTurn_1.EveryTurn.createAndAddRule({
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_LOWEST,
- name: "Increment Turn Counter",
- code: function () {
- WorldState.incrementWorldTurn();
- }
- });
- })(EveryTurn || (EveryTurn = {}));
- var Direction;
- (function (Direction) {
- Direction[Direction["NORTH"] = 0] = "NORTH";
- Direction[Direction["NORTHEAST"] = 1] = "NORTHEAST";
- Direction[Direction["EAST"] = 2] = "EAST";
- Direction[Direction["SOUTHEAST"] = 3] = "SOUTHEAST";
- Direction[Direction["SOUTH"] = 4] = "SOUTH";
- Direction[Direction["SOUTHWEST"] = 5] = "SOUTHWEST";
- Direction[Direction["WEST"] = 6] = "WEST";
- Direction[Direction["NORTHWEST"] = 7] = "NORTHWEST";
- Direction[Direction["UP"] = 8] = "UP";
- Direction[Direction["DOWN"] = 9] = "DOWN";
- })(Direction || (Direction = {}));
- var DirectionNames = (() => {
- let names;
- (function (names) {
- names["NORTH"] = "North";
- names["SOUTH"] = "South";
- names["EAST"] = "East";
- names["WEST"] = "West";
- names["SOUTHEAST"] = "Southeast";
- names["NORTHWEST"] = "Northwest";
- names["SOUTHWEST"] = "Southwest";
- names["NORTHEAST"] = "Northeast";
- names["UP"] = "Down";
- names["DOWN"] = "Up";
- })(names || (names = {}));
- ;
- let obj = {};
- for (let name in names) {
- obj[name] = names[name];
- obj[Direction[name]] = names[name];
- }
- return obj;
- })();
- var OppositeDirection = (() => {
- let obj = {};
- obj[Direction.NORTH] = Direction.SOUTH;
- obj[Direction.SOUTH] = Direction.NORTH;
- obj[Direction.EAST] = Direction.WEST;
- obj[Direction.WEST] = Direction.EAST;
- obj[Direction.SOUTHEAST] = Direction.NORTHWEST;
- obj[Direction.NORTHWEST] = Direction.SOUTHEAST;
- obj[Direction.SOUTHWEST] = Direction.NORTHEAST;
- obj[Direction.NORTHEAST] = Direction.SOUTHWEST;
- obj[Direction.UP] = Direction.DOWN;
- obj[Direction.DOWN] = Direction.UP;
- for (let i = 0; i < Object.keys(Direction).length / 2; i++) {
- obj[Direction[i]] = obj[i];
- }
- return obj;
- })();
- class Room {
- constructor(id, fodder) {
- this.description = new Say();
- this.name = id == undefined ? "Room" : id;
- this.connections = new Array(Room.DIRECTIONS.length);
- this.fodder = fodder;
- if (fodder != true) {
- Room.addRoom(this);
- }
- }
- getName() {
- return this.name;
- }
- place(thing) {
- Thing.InsideRoomRelation.setRelation(this, thing);
- }
- remove(thing) {
- if (Thing.InsideRoomRelation.getLeft(thing) == this) {
- Thing.InsideRoomRelation.unsetRight(thing);
- }
- }
- getContained() {
- return Thing.InsideRoomRelation.getRight(this);
- }
- getContainedAndVisibleTo(observer) {
- let contained = this.getContained();
- let result = [];
- contained.forEach((value) => {
- if (value.visible && value !== observer) {
- result.push(value);
- }
- });
- return result;
- }
- getContainedAndVisible() {
- return this.getContainedAndVisibleTo(WorldState.player);
- }
- mapRoom(r, direction) {
- let oppositeDirection = OppositeDirection[direction];
- if (this.connections[direction] != undefined) {
- console.warn("Replacing a connected room.", this, " connected through ", direction, " to ", this.connections[direction]);
- this.connections[direction].unmapRoom(oppositeDirection);
- }
- this.connections[direction] = r;
- if (r.connections[oppositeDirection] != undefined) {
- console.warn("Replacing a connected room.", r, " connected through ", oppositeDirection, " to ", r.connections[oppositeDirection]);
- r.unmapRoom(oppositeDirection);
- }
- r.connections[oppositeDirection] = this;
- }
- unmapRoom(direction) {
- if (this.connections[direction] != undefined) {
- let r = this.connections[direction];
- this.connections[direction] = undefined;
- r.unmapRoom(OppositeDirection[direction]);
- }
- }
- getPrintedName() {
- return this.name;
- }
- getConnectedRooms() {
- let rooms = [];
- this.connections.forEach(room => {
- if (room != undefined) {
- rooms.push(room);
- }
- });
- return rooms;
- }
- bestDirectionTo(room, validityCode) {
- if (validityCode == undefined)
- validityCode = () => { return true; };
- let maxSteps = 10;
- maxSteps = maxSteps > WorldState.getMaximumRememberedRooms() ? maxSteps : WorldState.getMaximumRememberedRooms();
- let recursiveBestPath = (cPath, cRoom, destination) => {
- if (!validityCode(cRoom)) {
- return;
- }
- if (cRoom == destination) {
- maxSteps = maxSteps > cPath.length ? cPath.length : maxSteps;
- return cPath;
- }
- else if (cPath.length > maxSteps) {
- return undefined;
- }
- else {
- let paths = [];
- for (let index in Room.DIRECTIONS) {
- let direction = Room.DIRECTIONS[index];
- let nextRoom = cRoom.connections[direction];
- if (nextRoom != undefined && cPath.indexOf(nextRoom) == -1 && validityCode(nextRoom)) {
- let path = recursiveBestPath(cPath.concat([nextRoom]), nextRoom, destination);
- if (path != undefined) {
- paths.push(path);
- }
- }
- }
- let shortestIndex = 0;
- paths.forEach((value, index, array) => {
- if (value.length < paths[shortestIndex].length) {
- shortestIndex = index;
- }
- });
- return paths[shortestIndex];
- }
- };
- let paths = Array(Room.DIRECTIONS.length);
- let shortestIndex;
- for (let index in Room.DIRECTIONS) {
- let direction = Room.DIRECTIONS[index];
- let nextRoom = this.connections[direction];
- if (nextRoom != undefined) {
- paths[direction] = recursiveBestPath([this, nextRoom], nextRoom, room);
- if (paths[direction] != undefined && (shortestIndex == undefined || paths[shortestIndex].length > paths[direction].length)) {
- shortestIndex = direction;
- }
- }
- }
- return shortestIndex;
- }
- static getDirectionXYZ(direction) {
- var y = 0;
- if ([Direction.NORTH, Direction.NORTHEAST, Direction.NORTHWEST].indexOf(direction) != -1) {
- y = 1;
- }
- else if ([Direction.SOUTH, Direction.SOUTHEAST, Direction.SOUTHWEST].indexOf(direction) != -1) {
- y = -1;
- }
- var x = 0;
- if ([Direction.EAST, Direction.SOUTHEAST, Direction.NORTHEAST].indexOf(direction) != -1) {
- x = 1;
- }
- else if ([Direction.WEST, Direction.SOUTHWEST, Direction.NORTHWEST].indexOf(direction) != -1) {
- x = -1;
- }
- var z = direction == Direction.UP ? 1 :
- direction == Direction.DOWN ? -1 :
- 0;
- return [x, y, z];
- }
- static shift(coordinates, direction) {
- let coordinatesVector = Room.getDirectionXYZ(direction);
- coordinates.forEach((value, index, array) => {
- coordinatesVector[index] += coordinates[index];
- });
- return coordinatesVector;
- }
- static addRoom(room) {
- Room.rooms[room.name] = room;
- }
- static getRooms() {
- let rooms = [];
- for (let name in Room.rooms) {
- rooms.push(Room.rooms[name]);
- }
- return rooms;
- }
- static getRoom(id) {
- return Room.rooms[id];
- }
- }
- Room.DIRECTIONS = (() => {
- let directions = [];
- for (let i = 0; i < Object.keys(Direction).length / 2; i++) {
- directions.push(i);
- }
- return directions;
- })();
- Room.rooms = {};
- var OutOfPlay;
- (function (OutOfPlay) {
- OutOfPlay.Heaven = new Room("__Heaven__RIP__");
- function removeFromPlay(thing) {
- OutOfPlay.Heaven.place(thing);
- }
- OutOfPlay.removeFromPlay = removeFromPlay;
- })(OutOfPlay || (OutOfPlay = {}));
- var PlayBegins;
- (function (PlayBegins) {
- PlayBegins.rulebook = new Rulebook("Play Begins");
- PlayBegins.LOAD_FAILED = false;
- let startingRoom;
- function execute() {
- PlayBegins.rulebook.execute({});
- }
- PlayBegins.execute = execute;
- function setStartingRoom(room) {
- if (startingRoom != undefined) {
- console.warn("[InitialRoom] Multiple requests for starting room, please check.", startingRoom, room);
- }
- startingRoom = room;
- }
- PlayBegins.setStartingRoom = setStartingRoom;
- PlayBegins.PutPlayerIntoFirstRoom = PlayBegins.rulebook.createAndAddRule({
- name: "Place player into initial room",
- firstPriority: Rule.PRIORITY_HIGHEST,
- priority: Rule.PRIORITY_MEDIUM,
- code: () => {
- if (WorldState.player.getRoom() != undefined) {
- console.debug(Rulebook.getIndentation() + "[InitialRoom] Player already in a room.", WorldState.player.getRoom());
- }
- else {
- startingRoom.place(WorldState.player);
- }
- }
- });
- PlayBegins.RunEmptyTurnSequenceRule = new Rule({
- name: "Run Empty Turn Sequence Rule",
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_LOWEST,
- code: (rulebook2) => {
- TurnSequence.execute();
- }
- });
- PlayBegins.rulebook.addRule(PlayBegins.RunEmptyTurnSequenceRule);
- })(PlayBegins || (PlayBegins = {}));
- var MachineBegins;
- (function (MachineBegins) {
- MachineBegins.RunPlayBegins = MachineBegins.rulebook.createAndAddRule({
- firstPriority: Rule.PRIORITY_LOW,
- name: "Run Play Begins",
- code: () => {
- PlayBegins.execute();
- }
- });
- })(MachineBegins || (MachineBegins = {}));
- var Tests;
- (function (Tests) {
- Tests.MIN_DICE = 0;
- Tests.MAX_DICE = 3;
- function rollDice() {
- return Math.floor(Math.random() * (Tests.MAX_DICE - Tests.MIN_DICE)) + 1 + Tests.MIN_DICE;
- }
- Tests.rollDice = rollDice;
- function test(attr, difficulty) {
- return (attr + rollDice()) >= difficulty;
- }
- Tests.test = test;
- })(Tests || (Tests = {}));
- class MapNote extends Thing {
- constructor() {
- super(...arguments);
- this.rooms = [];
- this.regions = [];
- }
- addRoom(...rooms) {
- rooms.forEach((room) => {
- this.rooms.push(room);
- });
- }
- addRegion(...regions) {
- regions.forEach(region => {
- this.regions.push(region);
- });
- }
- contains(room) {
- if (this.rooms.indexOf(room) != -1) {
- return true;
- }
- else {
- for (var i = 0; i < this.regions.length; i++) {
- if (this.regions[i].getRooms().indexOf(room) != -1) {
- return true;
- }
- }
- }
- }
- }
- class Bodypart extends Thing {
- constructor(options) {
- super(options);
- this.sorenessWeight = 1;
- this.soreness = 0;
- this.sorenessPerTurn = 0.05;
- this.lastSorenessUpdate = 0;
- this.slots = [];
- this.visibleSlots = [];
- this.genderValue = Bodypart.GENDER_MEDIUM_ANDROGYNE;
- this.genderWeight = 1;
- this.sluttiness = 10;
- this.sluttinessWeight = Bodypart.WEIGHT_LOWEST;
- this.addGetAlterations((bp) => {
- return {
- Soreness: bp.soreness,
- GenderValue: bp.genderValue,
- Sluttiness: bp.getSluttiness()
- };
- });
- this.addSetAlterations((bp, changes) => {
- this.soreness = changes.Soreness;
- this.genderValue = changes.GenderValue;
- this.sluttiness = changes.Sluttiness;
- });
- }
- updateSoreness() {
- let cTurn = WorldState.getCurrentTurn();
- if (cTurn > this.lastSorenessUpdate) {
- if (this.soreness > 0) {
- this.soreness -= (this.sorenessPerTurn * (cTurn - this.lastSorenessUpdate));
- if (this.soreness < 0) {
- this.soreness = 0;
- }
- }
- this.lastSorenessUpdate = cTurn;
- }
- }
- changeSoreness(soreness) {
- this.updateSoreness();
- this.soreness += soreness;
- if (this.soreness < 0) {
- this.soreness = 0;
- }
- }
- getSoreness() {
- this.updateSoreness();
- return this.soreness;
- }
- getWeightedSoreness() {
- return this.getSoreness() * this.sorenessWeight;
- }
- getSorenessWeight() {
- return this.sorenessWeight;
- }
- getGenderWeight() {
- if (this.slots.length == 0) {
- return 0;
- }
- return this.genderWeight * (this.visibleSlots.length / this.slots.length);
- }
- getGenderValue() {
- return this.genderValue;
- }
- getWeightedGenderValue() {
- return this.getGenderValue() * this.getGenderWeight();
- }
- getSluttiness() {
- return this.sluttiness;
- }
- getSluttinessWeight() {
- if (this.slots.length == 0) {
- return 0;
- }
- return this.sluttinessWeight * (this.visibleSlots.length / this.slots.length);
- }
- getWeightedSluttinessValue() {
- return this.getSluttiness() * this.getSluttinessWeight();
- }
- updateVisibility() {
- this.visibleSlots = this.slots.slice(0);
- let parent = Thing.PartRelation.getLeft(this);
- if (parent != undefined) {
- let clothing = Thing.WearRelation.getRight(parent);
- for (let i = 0; i < clothing.length; i++) {
- let covering = clothing[i].getCoveringSlots();
- for (let k = 0; k < covering.length; k++) {
- let idx = this.visibleSlots.indexOf(covering[k]);
- if (idx >= 0) {
- this.visibleSlots.splice(idx, 1);
- }
- }
- if (this.visibleSlots.length == 0)
- break;
- }
- }
- }
- isUncovered() {
- this.updateVisibility();
- return this.visibleSlots.length == this.slots.length && this.slots.length > 0;
- }
- updateStatus() {
- this.updateVisibility();
- }
- static getSoreness(thing) {
- let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart);
- let soreness = 0;
- bodyparts.forEach((bodypart) => {
- soreness += bodypart.getWeightedSoreness();
- });
- return soreness;
- }
- static getGenderValueOn(thing) {
- let weight = 0;
- let value = 0;
- let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart);
- bodyparts.forEach((bodypart) => {
- weight += bodypart.getGenderWeight();
- value += bodypart.getWeightedGenderValue();
- });
- return {
- weight: weight,
- value: value
- };
- }
- static getSluttinessValueOn(thing) {
- let weight = 0;
- let value = 0;
- let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart);
- bodyparts.forEach((bodypart) => {
- weight += bodypart.getSluttinessWeight();
- value += bodypart.getWeightedSluttinessValue();
- });
- return {
- weight: weight,
- value: value
- };
- }
- arrangeGenderValue(genderValue) {
- this.genderValue = genderValue;
- this.getPartOne().invalidateCaches();
- }
- increaseFemininity(amount) {
- let currentGV = this.getGenderValue();
- this.arrangeGenderValue(currentGV + (5 * amount));
- }
- increaseMasculinity(amount) {
- let currentGV = this.getGenderValue();
- this.arrangeGenderValue(currentGV - (5 * amount));
- }
- }
- Bodypart.WEIGHT_LOWEST = 1;
- Bodypart.WEIGHT_LOW = 3;
- Bodypart.WEIGHT_MEDIUM = 5;
- Bodypart.WEIGHT_HIGH = 7;
- Bodypart.WEIGHT_HIGHEST = 9;
- Bodypart.SLUTTINESS_LOWEST_SAINTLY = 0;
- Bodypart.SLUTTINESS_LOW_PRUDE = 25;
- Bodypart.SLUTTINESS_MEDIUM_AVERAGE = 50;
- Bodypart.SLUTTINESS_HIGH_SLUT = 75;
- Bodypart.SLUTTINESS_HIGHEST_WHORE = 100;
- Bodypart.GENDER_LOWEST_MANLIEST = 0;
- Bodypart.GENDER_LOW_MANLY = 25;
- Bodypart.GENDER_MEDIUM_ANDROGYNE = 50;
- Bodypart.GENDER_HIGH_FEMININE = 75;
- Bodypart.GENDER_HIGHEST_FEMININEST = 100;
- class SexStick extends Bodypart {
- getWide() {
- return new Measure();
- }
- getLong() {
- return new Measure();
- }
- }
- class SexHole extends Bodypart {
- }
- class Measure {
- constructor(...sides) {
- this.superscript = ["", "", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹"];
- this.units = 1;
- sides.forEach((side) => {
- this.units *= side;
- });
- this.sides = sides.length;
- }
- getText() {
- let meters = Math.pow(this.sides, 100);
- if (this.units > meters) {
- return (+(this.units / meters).toFixed(2)).toString() + "m" + this.superscript[this.sides];
- }
- else {
- return this.units.toString() + "cm" + this.superscript[this.sides];
- }
- }
- getNumber() {
- return this.units;
- }
- getSides() {
- return this.sides;
- }
- static fromInches(inches) {
- return inches * 2.54;
- }
- static fromFeet(feet) {
- return feet * 30.48;
- }
- }
- class MeasureLiquid {
- constructor(milliliters) {
- this.units = milliliters;
- }
- getText() {
- if (this.units > 1000) {
- return (+(this.units / 1000).toFixed(2)).toString() + "L";
- }
- else {
- return this.units.toString() + "mL";
- }
- }
- static fromLiters(liters) {
- return liters * 1000;
- }
- }
- class HumanoidArms extends Bodypart {
- constructor() {
- super(...arguments);
- this.sorenessWeight = Bodypart.WEIGHT_LOW;
- this.genderWeight = Bodypart.WEIGHT_MEDIUM;
- this.slots = [Humanoid.SLOT_ARMS];
- }
- get sluttinessWeight() {
- if (this.getPartOne().isMale()) {
- return Bodypart.WEIGHT_HIGHEST;
- }
- else {
- return Bodypart.WEIGHT_MEDIUM;
- }
- }
- set sluttinessWeight(val) { }
- getSluttiness() {
- if (this.getPartOne().isMale()) {
- return this.getGenderValue();
- }
- else {
- return 100 - this.getGenderValue();
- }
- }
- getDescription() {
- let humanoid = this.getPartOne();
- let str = humanoid.getStat(Attributes.Strength);
- if (str > 4) {
- return "Your arms and legs are ridiculously huge, showing off just how strong you are.";
- }
- else if (str > 2) {
- return "Your arms and legs are pretty big because of your muscles.";
- }
- else if (str == 2) {
- return "";
- }
- else {
- return "You look like you don't even lift.";
- }
- }
- getGenderValue() {
- let humanoid = this.getPartOne();
- let str = humanoid.getStat(Attributes.Strength);
- return 20 * str;
- }
- }
- class HumanoidBreasts extends Bodypart {
- constructor(options) {
- super(options);
- this.size = 0;
- this.silicone = 0;
- this.milk = 0;
- this.sorenessWeight = Bodypart.WEIGHT_MEDIUM;
- this.genderWeight = Bodypart.WEIGHT_HIGH;
- this.slots = [Humanoid.SLOT_BREASTS];
- this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT;
- this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
- this.addGetAlterations((thing) => {
- return {
- Size: this.size,
- Silicone: this.silicone,
- Milk: this.milk
- };
- });
- this.addSetAlterations((thing, changes) => {
- this.size = changes.Size;
- this.silicone = changes.Silicone;
- this.milk = changes.Milk;
- });
- }
- getSize() {
- return this.size + this.silicone + this.milk;
- }
- getSizeText() {
- return HumanoidBreasts.getSizeText(this.getSize());
- }
- static getSizeText(size) {
- let names = ["flat", "AA-cup", "A-cup", "B-cup", "C-cup", "D-cup", "E-cup", "F-cup", "G-cup", "H-cup"];
- if (size >= names.length) {
- return "HUGE";
- }
- else {
- return names[size];
- }
- }
- getGenderValue() {
- return HumanoidBreasts.getGenderFromSize(this.getSize());
- }
- getSluttiness() {
- return this.getGenderValue();
- }
- static getGenderFromSize(size) {
- if (size <= 0) {
- return 20;
- }
- else if (size <= 3) {
- return 20 * size;
- }
- else {
- return 80;
- }
- }
- arrangeGenderValue(gv) {
- if (gv <= 20) {
- this.size = 0;
- this.silicone = 0;
- this.milk = 0;
- }
- else if (gv < 80) {
- this.size = Math.round(gv / 20);
- }
- else {
- this.size = 4;
- }
- }
- }
- class HumanoidButt extends Bodypart {
- constructor(options) {
- super(options);
- this.size = 0;
- this.silicone = 0;
- this.sorenessWeight = Bodypart.WEIGHT_MEDIUM;
- this.genderWeight = Bodypart.WEIGHT_MEDIUM;
- this.slots = [Humanoid.SLOT_BUTT];
- this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT;
- this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
- this.addGetAlterations((thing) => {
- return {
- Size: this.size,
- Silicone: this.silicone
- };
- });
- this.addSetAlterations((thing, changes) => {
- this.size = changes.Size;
- this.silicone = changes.Silicone;
- });
- }
- getSluttiness() {
- return this.getSize() * 33;
- }
- getSize() {
- return this.size + this.silicone;
- }
- getSizeText() {
- return HumanoidButt.getSizeText(this.getSize());
- }
- static getSizeText(size) {
- let names = ["flat", "tiny", "round", "plump"];
- if (size >= names.length) {
- return "gargantuan";
- }
- else {
- return names[size];
- }
- }
- getGenderValue() {
- return HumanoidBreasts.getGenderFromSize(this.getSize());
- }
- static getGenderFromSize(size) {
- if (size <= 0) {
- return 20;
- }
- else if (size <= 2) {
- return 30 * size;
- }
- else {
- return 80;
- }
- }
- arrangeGenderValue(gv) {
- if (gv <= 20) {
- this.size = 0;
- }
- else if (gv <= 60) {
- this.size = 1;
- }
- else {
- this.size = 3;
- }
- }
- }
- class HumanoidExtremity extends Bodypart {
- constructor(options) {
- super(options);
- this.nailsPainted = false;
- this.nailColor = 0;
- this.addGetAlterations((thing) => {
- return {
- Painted: this.nailsPainted,
- Color: this.nailColor
- };
- });
- this.addSetAlterations((thing, changes) => {
- this.nailsPainted = changes.Painted;
- this.nailColor = changes.Color;
- });
- }
- static getColor(index) {
- return HumanoidExtremity.nailColorNames[index];
- }
- getSluttiness() {
- return this.getGenderValue();
- }
- getGenderValue() {
- let nailPaintedCorrection = this.nailColor * 50;
- let nailPaintedCorrectionWeight = this.nailsPainted ? 3 : 0;
- let gv = this.genderValue;
- let gw = this.genderWeight;
- return ((gv * gw) + (nailPaintedCorrection * nailPaintedCorrectionWeight)) / (gw + nailPaintedCorrectionWeight);
- }
- arrangeGenderValue(gv) {
- this.genderValue = gv;
- this.nailsPainted = gv > 60;
- if (this.nailsPainted) {
- if (gv > 70) {
- this.nailColor = 2;
- }
- else {
- this.nailColor = 1;
- }
- }
- this.getPartOne().invalidateCaches();
- }
- }
- HumanoidExtremity.nailColorNames = ['none', 'red', 'pink'];
- class HumanoidFeet extends HumanoidExtremity {
- constructor() {
- super(...arguments);
- this.sorenessWeight = Bodypart.WEIGHT_LOW;
- this.genderWeight = Bodypart.WEIGHT_LOW;
- this.slots = [Humanoid.SLOT_FEET];
- }
- getDescription() {
- let say = new Say();
- if (this.genderValue > 55) {
- say.add("Your feet are small and cute.");
- }
- else if (this.genderValue < 45) {
- say.add("Your feet are big and mannish.");
- }
- if (this.nailsPainted) {
- say.add(" Your toenails are painted " + HumanoidExtremity.getColor(this.nailColor) + ".");
- }
- return say;
- }
- }
- class HumanoidHands extends HumanoidExtremity {
- constructor() {
- super(...arguments);
- this.sorenessWeight = Bodypart.WEIGHT_LOW;
- this.genderWeight = Bodypart.WEIGHT_MEDIUM;
- this.slots = [Humanoid.SLOT_HANDS];
- }
- getDescription() {
- let say = new Say();
- if (this.genderValue > 55) {
- say.add("Your hands are delicate and slender.");
- }
- else if (this.genderValue < 45) {
- say.add("Your hands are rough and large.");
- }
- if (this.nailsPainted) {
- say.add(" Your toenails are painted " + HumanoidExtremity.getColor(this.nailColor) + ".");
- }
- return say;
- }
- }
- class HumanoidHead extends Bodypart {
- constructor() {
- super(...arguments);
- this.sorenessWeight = Bodypart.WEIGHT_MEDIUM;
- this.genderWeight = Bodypart.WEIGHT_LOW;
- this.slots = [Humanoid.SLOT_HEADGEAR, Humanoid.SLOT_HAIR, Humanoid.SLOT_EARS, Humanoid.SLOT_FACE, Humanoid.SLOT_EYES, , Humanoid.SLOT_NOSE, Humanoid.SLOT_MOUTH];
- }
- }
- class HumanoidPenis extends SexStick {
- constructor(options) {
- super(options);
- this.sorenessWeight = Bodypart.WEIGHT_HIGH;
- this.genderValue = 25;
- this.genderWeight = Bodypart.WEIGHT_HIGHEST;
- this.slots = [Humanoid.SLOT_CROTCH_FRONT];
- this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT;
- this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
- this.flaccidSize = new Measure(6);
- this.flaccidWidth = new Measure(3);
- this.erectSize = new Measure(15);
- this.erectWidth = new Measure(6);
- this.arousalMinimum = 5;
- this.arousalErect = 25;
- if (Math.random() >= 0.5) {
- this.flaccidMult = 0.33;
- }
- else {
- this.flaccidMult = 0.77;
- }
- this.addGetAlterations((thing) => {
- return {
- FSize: this.flaccidSize.getNumber(),
- FWidth: this.flaccidWidth.getNumber(),
- ESize: this.erectSize.getNumber(),
- EWidth: this.erectWidth.getNumber(),
- AMin: this.arousalMinimum,
- AErect: this.arousalErect,
- FMult: this.flaccidMult
- };
- });
- this.addSetAlterations((thing, changes) => {
- this.flaccidSize = new Measure(changes.FSize);
- this.flaccidWidth = new Measure(changes.FWidth);
- this.erectSize = new Measure(changes.ESize);
- this.erectWidth = new Measure(changes.EWidth);
- this.arousalMinimum = changes.AMin;
- this.arousalErect = changes.AErect;
- this.flaccidMult = changes.FMult;
- });
- }
- getSluttiness() {
- return this.getBulgeSize() * 3;
- }
- isGrower() {
- return this.flaccidMult < 0.5;
- }
- getActualSize() {
- let min = this.flaccidSize.getNumber();
- let max = this.erectSize.getNumber();
- let variableSize = (max - min);
- let finalSize = min + (variableSize * this.getArousalPerc());
- return finalSize;
- }
- isBig() {
- return this.getBulgeSize() > 22;
- }
- getArousalPerc() {
- let arousal = 0;
- let numSteps = this.arousalErect - this.arousalMinimum;
- let arousalPerc = (arousal - this.arousalMinimum) / numSteps;
- arousalPerc = arousalPerc < 0 ? 0 :
- arousalPerc > 1 ? 1 :
- arousalPerc;
- return arousalPerc;
- }
- isFlaccid() {
- return this.getArousalPerc() < 0.6;
- }
- isErect() {
- return !this.isFlaccid();
- }
- getActualWidth() {
- let min = this.flaccidWidth.getNumber();
- let max = this.erectWidth.getNumber();
- let variableSize = (max - min);
- let numSteps = this.arousalErect - this.arousalMinimum;
- let arousal = 0;
- let arousalPerc = (arousal - this.arousalMinimum) / numSteps;
- arousalPerc = arousalPerc < 0 ? 0 :
- arousalPerc > 1 ? 1 :
- arousalPerc;
- let finalSize = min + (variableSize * arousalPerc);
- return finalSize;
- }
- getLong() {
- return new Measure(this.getActualSize());
- }
- getWide() {
- return new Measure(this.getActualWidth());
- }
- getBulgeSize() {
- return this.getActualSize() + (3 * this.getActualWidth());
- }
- getSizeText() {
- return HumanoidPenis.getSizeText(this.getBulgeSize());
- }
- static getSizeText(size) {
- let sizeTable = [
- [0, "nonexistent"],
- [1, "tiny"],
- [20, "small"],
- [23, "medium"],
- [27, "big"],
- [32, "huge"],
- [36, "monstrous"]
- ];
- let i;
- for (i = 1; i < sizeTable.length && sizeTable[i][0] < size; i++) { }
- return sizeTable[i - 1][1];
- }
- getGenderValue() {
- let sizeTable = [
- [10, 60],
- [20, 45],
- [23, 35],
- [27, 28],
- [32, 24],
- [36, 18]
- ];
- let i;
- for (i = 1; i < sizeTable.length && sizeTable[i][0] < this.getActualSize(); i++) { }
- return sizeTable[i - 1][1];
- }
- arrangeGenderValue(gv) {
- let sizeTable = [
- [60, 3, 2],
- [45, 10, 3],
- [35, 14, 3],
- [28, 17, 3],
- [24, 19, 4],
- [18, 22, 4.5]
- ];
- let i;
- for (i = 1; i < sizeTable.length && sizeTable[i][0] > gv; i++) { }
- this.flaccidSize = new Measure(this.flaccidMult * sizeTable[i - 1][1]);
- this.flaccidWidth = new Measure(this.flaccidMult * sizeTable[i - 1][2]);
- this.erectSize = new Measure(sizeTable[i - 1][1]);
- this.erectWidth = new Measure(sizeTable[i - 1][2]);
- this.getPartOne().invalidateCaches();
- }
- static getSynonym() {
- let cockNames = [
- "cock",
- "dick"
- ];
- return (new OneOf(OneOf.PURELY_AT_RANDOM, ...cockNames).getOne());
- }
- }
- class HumanoidSkin extends Bodypart {
- constructor(options) {
- super(options);
- this.sorenessWeight = 0;
- this.genderWeight = Bodypart.WEIGHT_MEDIUM;
- this.slots = [
- Humanoid.SLOT_FACE, Humanoid.SLOT_NECK, Humanoid.SLOT_SHOULDERS,
- Humanoid.SLOT_ARMS, Humanoid.SLOT_HANDS, Humanoid.SLOT_UPPER_CHEST,
- Humanoid.SLOT_MIDRIFF, Humanoid.SLOT_WAIST, Humanoid.SLOT_BACK,
- Humanoid.SLOT_HIPS, Humanoid.SLOT_BUTT, Humanoid.SLOT_LEG_UPPER,
- Humanoid.SLOT_LEG_LOWER
- ];
- this.skinSoftness = 5;
- this.skinHairiness = 2;
- this.addGetAlterations((thing) => {
- return {
- Softness: this.skinSoftness,
- Hairiness: this.skinHairiness
- };
- });
- this.addSetAlterations((thing, changes) => {
- this.skinSoftness = changes.Softness;
- this.skinHairiness = changes.Hairiness;
- });
- }
- getSluttiness() {
- return this.getGenderValue();
- }
- getDescription() {
- let owner = this.getPartOne();
- let green = (owner.getStat(Attributes.Corruption) > 50);
- let say = new Say("Your skin is ");
- if (this.skinSoftness > 7) {
- say.add("perfectly smooth");
- }
- else if (this.skinSoftness > 4) {
- say.add("smooth");
- }
- else {
- say.add("rough");
- }
- say.add(" and ");
- if (this.skinHairiness > 8) {
- say.add("hairy, like a gorilla's");
- }
- else if (this.skinHairiness > 6) {
- say.add("hairy");
- }
- else if (this.skinHairiness > 3) {
- say.add("somewhat hairless");
- }
- else {
- say.add("completely hairless");
- }
- say.add(".");
- if (green) {
- say.add(" The taint of your corruption has turned your skin green, like an orc's.");
- }
- return say;
- }
- getGenderValue() {
- let softnessRank = this.skinSoftness * 100;
- let hairinessRank = 1000 - (this.skinHairiness * 100);
- return (softnessRank + hairinessRank) / 20;
- }
- arrangeGenderValue(genderValue) {
- let ideal = genderValue / 10;
- this.skinHairiness = 10 - Math.round(ideal);
- this.skinSoftness = Math.round(ideal);
- this.getPartOne().invalidateCaches();
- }
- }
- class HumanoidTesticles extends Bodypart {
- constructor(options) {
- super(options);
- this.size = 1;
- this.sorenessWeight = Bodypart.WEIGHT_HIGH;
- this.genderWeight = Bodypart.WEIGHT_HIGHEST;
- this.slots = [Humanoid.SLOT_CROTCH_FRONT];
- this.sluttiness = Bodypart.SLUTTINESS_MEDIUM_AVERAGE;
- this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
- this.addGetAlterations((thing) => {
- return {
- Size: this.size
- };
- });
- this.addSetAlterations((thing, changes) => {
- this.size = changes.Size;
- });
- }
- getBulgeSize() {
- return this.size;
- }
- getGenderWeight() {
- return 80;
- }
- }
- class HumanoidVagina extends SexHole {
- constructor() {
- super(...arguments);
- this.genderValue = 85;
- this.genderWeight = Bodypart.WEIGHT_HIGHEST;
- this.slots = [Humanoid.SLOT_CROTCH_FRONT];
- this.sluttiness = 50;
- this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
- }
- getSluttiness() {
- let slut = 100 - this.genderValue;
- let obscenelyOpen = false;
- slut += obscenelyOpen ? 25 : 0;
- return slut;
- }
- getDescription() {
- let say = new Say("Your ");
- let hairless = this.genderValue >= 80;
- let smallClit = this.genderValue >= 55;
- let innie = this.genderValue > 70;
- let obscenelyOpen = false;
- if (hairless) {
- say.add("hairless ", Say.PUSSY);
- }
- else {
- say.add("hairy ", Say.PUSSY);
- }
- say.add(" ");
- if (innie) {
- say.add("is usually completely covered by its lips");
- }
- else {
- say.add("has some curtains escaping its lips");
- }
- if (!smallClit) {
- say.add(" and has an oversized clit");
- }
- say.add(".");
- if (obscenelyOpen) {
- say.add(" It is currently stretched open obscenely.");
- }
- return say;
- }
- arrangeGenderValue(gv) {
- gv = (gv / 2) + 50;
- this.genderValue = gv;
- this.getPartOne().invalidateCaches();
- return;
- }
- static getSynonym() {
- let cockNames = [
- "pussy",
- "womanhood"
- ];
- return (new OneOf(OneOf.PURELY_AT_RANDOM, ...cockNames).getOne());
- }
- }
- class HumanoidTorso extends Bodypart {
- constructor() {
- super(...arguments);
- this.genderWeight = 0;
- this.sluttinessWeight = 0;
- }
- }
- class Clothing extends Thing {
- constructor() {
- super(...arguments);
- this.slots = [];
- this.transparentSlots = [];
- this.layer = Clothing.LAYER_MEDIUM;
- this.isVisible = false;
- this.visibleOn = [];
- this.breastPadding = 0;
- this.maxBreastSize = -1;
- this.tightBreastSize = -1;
- this.looseBreastSize = 0;
- this.crotchPadding = 0;
- this.maxCrotchSize = -1;
- this.tightCrotchSize = -1;
- this.looseCrotchSize = 0;
- this.buttPadding = 0;
- this.maxButtSize = -1;
- this.tightButtSize = -1;
- this.looseButtSize = 0;
- this.genderValue = 50;
- this.sluttinessValue = 40;
- }
- updateStatus() {
- this.visibleOn = [];
- this.visibleOn.push(...this.slots);
- let wearer = Thing.WearRelation.getLeft(this);
- if (wearer == undefined)
- return;
- let cloths = Thing.WearRelation.getRight(wearer);
- let coveredSlots = [];
- for (let i = 0; i < cloths.length; i++) {
- let worn = cloths[i];
- if ((worn != this) && worn.layer > this.layer) {
- coveredSlots.push(...worn.getCoveringSlots());
- }
- }
- this.visibleOn = this.visibleOn.filter(visible => {
- return coveredSlots.indexOf(visible) == -1;
- });
- this.isVisible = this.visibleOn.length > 0;
- }
- getCoveringSlots() {
- if (this.transparentSlots.length == 0) {
- return this.slots.slice(0);
- }
- return this.slots.filter((value, index, array) => {
- return this.transparentSlots.indexOf(value) == -1;
- });
- }
- getGenderWeight() {
- return this.visibleOn.length;
- }
- getGenderValue() {
- return this.genderValue;
- }
- getSluttinessWeight() {
- return this.visibleOn.length;
- }
- getSluttinessValue() {
- return this.sluttinessValue;
- }
- static getGenderValueOn(p) {
- let weight = 0;
- let value = 0;
- let clothes = Thing.WearRelation.getRight(p);
- for (let i = 0; i < clothes.length; i++) {
- weight += clothes[i].getGenderWeight();
- value += clothes[i].getGenderWeight() * clothes[i].getGenderValue();
- }
- return {
- weight: weight,
- value: value
- };
- }
- static getSluttinessValueOn(p) {
- let weight = 0;
- let value = 0;
- let clothes = Thing.WearRelation.getRight(p);
- for (let i = 0; i < clothes.length; i++) {
- weight += clothes[i].getSluttinessWeight();
- value += clothes[i].getSluttinessWeight() * clothes[i].getSluttinessValue();
- }
- return {
- weight: weight,
- value: value
- };
- }
- }
- Clothing.LAYER_LOWEST = 0;
- Clothing.LAYER_LOW = 5;
- Clothing.LAYER_MEDIUM = 10;
- Clothing.LAYER_HIGH = 15;
- Clothing.LAYER_HIGHEST = 20;
- class ActionRemove extends Action {
- getCommandText() {
- return "take off " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
- }
- getClothing() {
- return this.getNoun(0);
- }
- }
- ActionRemove.check = new Rulebook("Check Removing");
- ActionRemove.carry = new Rulebook("Carry out Removing");
- ActionRemove.checkIsWearable = ActionRemove.check.createAndAddRule({
- name: "Is noun a clothing",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: (runner) => {
- let action = runner.noun;
- let noun = action.getClothing();
- if (!(noun instanceof Clothing)) {
- if (action.actor == WorldState.player) {
- action.say.add("You can only remove Clothing.");
- }
- return false;
- }
- }
- });
- ActionRemove.checkIsHeld = ActionRemove.check.createAndAddRule({
- name: "Is noun worn",
- firstPriority: Rule.PRIORITY_HIGH,
- code: async (runner) => {
- let action = runner.noun;
- let noun = action.getClothing();
- if (!Thing.WearRelation.isRight(action.actor, noun)) {
- if (action.actor == WorldState.player) {
- action.say.add("You are not wearing it.");
- }
- return false;
- }
- }
- });
- ActionRemove.carryDefault = ActionRemove.carry.createAndAddRule({
- name: "Set Clothing as Carried",
- firstPriority: Rule.PRIORITY_MEDIUM,
- code: (runner) => {
- let action = runner.noun;
- let noun = action.getClothing();
- Thing.CarryRelation.setRelation(action.actor, noun);
- let actor = action.actor;
- let thing = action.getNoun(0);
- if (actor == WorldState.player) {
- action.say.add(new SayBold(thing, ": "), "Removed.");
- }
- else {
- action.say.add(new SayThe(), actor, " takes off ", new SayThe(), thing, ".");
- }
- }
- });
- Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
- name: "Hyperlink - Remove",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: (rulebook) => {
- let thing = rulebook.noun;
- if (thing instanceof Clothing && (Thing.WearRelation.isRight(WorldState.player, thing))) {
- Elements.HyperlinkHandler.addAvailableAction("Remove", new ActionRemove(WorldState.player, thing));
- }
- }
- }));
- Elements.InventoryHandler.LinkingThing.addRule(new Rule({
- name: "Inventory - Remove",
- firstPriority: Rule.PRIORITY_LOWEST,
- code: (rulebook) => {
- let thing = rulebook.noun;
- if (thing instanceof Clothing && (Thing.WearRelation.isRight(WorldState.player, thing))) {
- Elements.InventoryHandler.printThingLink("R", new ActionRemove(WorldState.player, thing));
- }
- }
- }));
- class ActionWear extends Action {
- getCommandText() {
- return "wear " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
- }
- getClothing() {
- return this.getNoun(0);
- }
- }
- ActionWear.check = new Rulebook("Check Wearing");
- ActionWear.carry = new Rulebook("Carry out Wearing");
- ActionWear.checkIsWearable = ActionWear.check.createAndAddRule({
- name: "Is noun a clothing",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: (runner) => {
- let action = runner.noun;
- let noun = action.getClothing();
- if (!(noun instanceof Clothing)) {
- if (action.actor == WorldState.player) {
- action.say.add("You can only wear Clothing.");
- }
- return false;
- }
- }
- });
- ActionWear.checkIsHeld = ActionWear.check.createAndAddRule({
- name: "Is noun held",
- firstPriority: Rule.PRIORITY_HIGH,
- code: async (runner) => {
- let action = runner.noun;
- let noun = action.getClothing();
- if (!Thing.CarryRelation.isRight(action.actor, noun)) {
- if (action.actor == WorldState.player) {
- action.say.add("(first taking the ", noun, ")", Say.LINE_BREAK);
- }
- let takingAction = new ActionTake(action.actor, noun);
- await takingAction.execute();
- action.say.add(takingAction.say);
- if (!Thing.CarryRelation.isRight(action.actor, noun)) {
- return false;
- }
- }
- }
- });
- ActionWear.carryDefault = ActionWear.carry.createAndAddRule({
- name: "Set Clothing as Worn",
- firstPriority: Rule.PRIORITY_MEDIUM,
- code: (runner) => {
- let action = runner.noun;
- let noun = action.getClothing();
- Thing.WearRelation.setRelation(action.actor, noun);
- let actor = action.actor;
- let thing = action.getNoun(0);
- if (actor == WorldState.player) {
- action.say.add(new SayBold(thing, ": "), "Worn.");
- }
- else {
- action.say.add(new SayThe(), actor, " puts on ", new SayThe(), thing, ".");
- }
- }
- });
- Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
- name: "Hyperlink - Wear",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: (rulebook) => {
- let thing = rulebook.noun;
- if (thing instanceof Clothing && !(Thing.WearRelation.isRight(WorldState.player, thing))) {
- Elements.HyperlinkHandler.addAvailableAction("Wear", new ActionWear(WorldState.player, thing));
- }
- }
- }));
- Elements.InventoryHandler.LinkingThing.addRule(new Rule({
- name: "Inventory - Wear",
- firstPriority: Rule.PRIORITY_LOWEST,
- code: (rulebook) => {
- let thing = rulebook.noun;
- if (thing instanceof Clothing && !(Thing.WearRelation.isRight(WorldState.player, thing))) {
- Elements.InventoryHandler.printThingLink("W", new ActionWear(WorldState.player, thing));
- }
- }
- }));
- class Humanoid extends Person {
- constructor(options) {
- super(options);
- this.breastVisibleSize = 0;
- this.isBreastVisible = false;
- this.isBreastTight = false;
- this.isBreastLoose = false;
- this.crotchVisibleSize = 0;
- this.isCrotchVisible = false;
- this.isCrotchTight = false;
- this.buttVisibleSize = 0;
- this.isButtVisible = false;
- this.isButtTight = false;
- this.isGenderCached = false;
- this.isSluttinessCached = false;
- this.uncoveredSlots = [];
- this.addParts(new HumanoidSkin(), new HumanoidHead(), new HumanoidArms(), new HumanoidHands(), new HumanoidBreasts(), new HumanoidFeet(), new HumanoidTorso(), new HumanoidButt());
- if (options.isMale) {
- this.addMaleParts();
- this.setGenderValue(25);
- }
- else {
- this.addFemaleParts();
- this.setGenderValue(75);
- }
- this.addGetAlterations((humanoid) => {
- if (humanoid.isPlayer()) {
- return {
- HumanoidGender: humanoid.isMale() ? Humanoid.SEX_MALE :
- humanoid.isFemale() ? Humanoid.SEX_FEMALE :
- Humanoid.SEX_HERM
- };
- }
- });
- this.addSetAlterations((humanoid, changes) => {
- if (humanoid.isPlayer()) {
- humanoid.removeGenderedParts();
- if (changes.HumanoidGender == Humanoid.SEX_MALE) {
- humanoid.addMaleParts();
- }
- else if (changes.HumanoidGender == Humanoid.SEX_FEMALE) {
- humanoid.addFemaleParts();
- }
- else {
- humanoid.addMaleParts();
- humanoid.addFemaleParts();
- }
- }
- });
- }
- invalidateCaches() {
- this.isGenderCached = false;
- this.isSluttinessCached = false;
- }
- getGenderValue() {
- if (!this.isSluttinessCached) {
- this.updateCaches();
- }
- return this.cachedGenderValue;
- }
- getSluttiness() {
- if (!this.isSluttinessCached) {
- this.updateCaches();
- }
- return this.cachedSluttiness;
- }
- getBulges() {
- if (!this.isGenderCached) {
- this.updateCaches();
- }
- return this.cachedBulges;
- }
- updateCaches() {
- this.updateClothing();
- this.updateSlots();
- this.updateBodyparts();
- this.updateBulges();
- this.updateGenderValue();
- this.updateSluttiness();
- }
- updateSlots() {
- this.uncoveredSlots = [];
- for (let i = 0; i < Humanoid.SLOT_SLOT_COUNT; i++) {
- this.uncoveredSlots.push(i);
- }
- let clothing = Thing.WearRelation.getRightType(this, Clothing);
- for (let i = 0; i < clothing.length; i++) {
- let covering = clothing[i].getCoveringSlots();
- for (let k = 0; k < covering.length; k++) {
- let idx = this.uncoveredSlots.indexOf(covering[k]);
- if (idx >= 0) {
- this.uncoveredSlots.splice(idx, 1);
- }
- }
- if (this.uncoveredSlots.length == 0)
- break;
- }
- }
- updateGenderValue() {
- let clothingGender = Clothing.getGenderValueOn(this);
- let bodypartGender = Bodypart.getGenderValueOn(this);
- let genderWeight = clothingGender.weight + bodypartGender.weight;
- let genderValue = clothingGender.value + bodypartGender.value;
- let correctionWeight = Bodypart.WEIGHT_HIGHEST;
- let correctionValue = this.getStat(Attributes.GenderIdentity) * Bodypart.WEIGHT_HIGHEST;
- let hasPenis = false;
- let hasVagina = false;
- if (this.isCrotchVisible) {
- if (Thing.PartRelation.getRightTypeOne(this, HumanoidPenis) != undefined) {
- hasPenis = true;
- hasVagina = false;
- correctionValue += 0 * Bodypart.WEIGHT_LOWEST;
- correctionWeight += Bodypart.WEIGHT_LOWEST;
- }
- else if (Thing.PartRelation.getRightTypeOne(this, HumanoidVagina) != undefined) {
- hasPenis = false;
- hasVagina = true;
- correctionValue += 100 * Bodypart.WEIGHT_LOWEST;
- correctionWeight += Bodypart.WEIGHT_LOWEST;
- }
- }
- if (this.breastVisibleSize > 0) {
- correctionValue += 100 * Bodypart.WEIGHT_LOWEST;
- correctionWeight += Bodypart.WEIGHT_LOWEST;
- }
- if (this.crotchVisibleSize > 0 && !hasVagina) {
- correctionValue += 0 * Bodypart.WEIGHT_LOWEST;
- correctionWeight += Bodypart.WEIGHT_LOWEST;
- }
- let genderValueFinal = genderValue / genderWeight;
- let genderValueCorrected = (genderValue + correctionValue) / (genderWeight + correctionWeight);
- this.cachedGenderValue = {
- hasTits: this.breastVisibleSize > 1,
- hasPenisBulge: this.crotchVisibleSize > 0 && !hasVagina,
- hasPenis: hasPenis,
- hasVagina: hasVagina,
- genderValue: genderValueFinal,
- genderValueCorrected: genderValueCorrected
- };
- this.isGenderCached = true;
- }
- isVisibleOn(slot) {
- return this.uncoveredSlots.indexOf(slot) != -1;
- }
- updateSluttiness() {
- let clothingSluttiness = Clothing.getSluttinessValueOn(this);
- let bodypartSluttiness = Bodypart.getSluttinessValueOn(this);
- let sluttinessWeight = clothingSluttiness.weight + bodypartSluttiness.weight;
- let sluttinessValue = clothingSluttiness.value + bodypartSluttiness.value;
- let correctionWeight = 0;
- let correctionValue = 0;
- let somewhatSlutty = [Humanoid.SLOT_MIDRIFF, Humanoid.SLOT_LEG_UPPER, Humanoid.SLOT_WAIST, Humanoid.SLOT_HIPS, Humanoid.SLOT_BACK];
- for (let i = 0; i < somewhatSlutty.length; i++) {
- if (this.isVisibleOn(somewhatSlutty[i])) {
- correctionWeight += 1;
- correctionValue += 75;
- }
- }
- let verySlutty = [Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT];
- for (let i = 0; i < verySlutty.length; i++) {
- if (this.isVisibleOn(verySlutty[i])) {
- correctionWeight += 3;
- correctionValue += 75;
- }
- }
- if ((this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) > 0.75) {
- let extremeSlutty = [Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT];
- for (let i = 0; i < extremeSlutty.length; i++) {
- if (this.isVisibleOn(extremeSlutty[i])) {
- correctionWeight += 5;
- correctionValue += 85;
- }
- }
- }
- let halfNaked;
- let naked;
- if (!this.isMale()) {
- halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 &&
- !this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]);
- naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 &&
- this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]);
- }
- else {
- if (this.hasBreasts()) {
- halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 &&
- !this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]);
- naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 &&
- this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]);
- }
- else {
- halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 &&
- !this.isVisibleOnArray([Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]);
- naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 &&
- this.isVisibleOnArray([Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]);
- }
- }
- let sluttinessValueFinal = sluttinessValue / sluttinessWeight;
- let sluttinessCorrected = (sluttinessValue + correctionValue) / (sluttinessWeight + correctionWeight);
- this.cachedSluttiness = {
- halfNaked: halfNaked,
- naked: naked,
- sluttiness: sluttinessValueFinal,
- sluttinessCorrected: sluttinessCorrected
- };
- this.isSluttinessCached = true;
- }
- isVisibleOnArray(arr) {
- for (let i = 0; i < arr.length; i++) {
- if (!this.isVisibleOn(arr[i])) {
- return false;
- }
- }
- return true;
- }
- addMaleParts() {
- if (!this.isMale() && !this.isHerm()) {
- this.addParts(new HumanoidTesticles(), new HumanoidPenis());
- }
- this.invalidateCaches();
- }
- addFemaleParts() {
- if (!this.isFemale() && !this.isHerm()) {
- this.addParts(new HumanoidVagina());
- }
- this.invalidateCaches();
- }
- removeGenderedParts() {
- this.removeParts(HumanoidVagina);
- this.removeParts(HumanoidPenis);
- this.removeParts(HumanoidTesticles);
- this.invalidateCaches();
- }
- setGenderValue(value) {
- let bp = this.getParts(Bodypart);
- for (let i = 0; i < bp.length; i++) {
- if (bp[i] instanceof HumanoidBreasts && this.isMale()) {
- bp[i].arrangeGenderValue(0);
- }
- else {
- bp[i].arrangeGenderValue(value);
- }
- }
- }
- updateBodyparts() {
- let parts = Thing.PartRelation.getRightType(this, Bodypart);
- for (let i = 0; i < parts.length; i++) {
- parts[i].updateStatus();
- }
- }
- updateClothing() {
- let clothes = Thing.WearRelation.getRightType(this, Clothing);
- for (let i = 0; i < clothes.length; i++) {
- clothes[i].updateStatus();
- }
- }
- updateBulges() {
- let clothes = Thing.WearRelation.getRightType(this, Clothing).sort(function (a, b) {
- return a.layer - b.layer;
- });
- this.isBreastVisible = true;
- this.isCrotchVisible = true;
- this.isButtVisible = true;
- let bras = [];
- let butts = [];
- let junks = [];
- clothes.forEach((cloth) => {
- cloth.updateStatus();
- if (cloth.slots.indexOf(Humanoid.SLOT_BREASTS) != -1) {
- bras.push(cloth);
- if (cloth.transparentSlots.indexOf(Humanoid.SLOT_BREASTS) == -1) {
- this.isBreastVisible = false;
- }
- }
- if (cloth.slots.indexOf(Humanoid.SLOT_BUTT) != -1) {
- butts.push(cloth);
- if (cloth.transparentSlots.indexOf(Humanoid.SLOT_BUTT) == -1) {
- this.isButtVisible = false;
- }
- }
- if (cloth.slots.indexOf(Humanoid.SLOT_CROTCH_FRONT) != -1) {
- junks.push(cloth);
- if (cloth.transparentSlots.indexOf(Humanoid.SLOT_CROTCH_FRONT) == -1) {
- this.isCrotchVisible = false;
- }
- }
- });
- this.updateBreastSizes(bras);
- this.updateCrotchSizes(junks);
- this.updateButtSizes(butts);
- this.cachedBulges = {
- breasts: this.breastVisibleSize,
- butt: this.buttVisibleSize,
- crotch: this.crotchVisibleSize,
- waist: 0
- };
- }
- getTopClothOn(slot) {
- return Thing.WearRelation.getRightType(this, Clothing).filter(otherCloth => {
- return otherCloth.visibleOn.includes(slot);
- }).sort((a, b) => {
- return a.layer - b.layer;
- })[0];
- }
- updateBreastSizes(bras) {
- this.isBreastTight = false;
- this.isBreastLoose = true;
- let breasts = Thing.PartRelation.getRightTypeOne(this, HumanoidBreasts);
- this.breastVisibleSize = breasts.getSize();
- bras.forEach((bra) => {
- if (bra.tightBreastSize >= 0 && this.breastVisibleSize > bra.tightBreastSize) {
- this.isBreastTight = true;
- }
- if (bra.maxBreastSize >= 0 && this.breastVisibleSize > bra.maxBreastSize) {
- this.breastVisibleSize = bra.maxBreastSize;
- }
- if (this.breastVisibleSize >= bra.looseBreastSize) {
- this.isBreastLoose = false;
- }
- this.breastVisibleSize += bra.breastPadding;
- if (this.breastVisibleSize < 0) {
- this.breastVisibleSize = 0;
- }
- });
- }
- updateCrotchSizes(cloths) {
- this.isCrotchTight = false;
- this.crotchVisibleSize = 0;
- let penis = Thing.PartRelation.getRightTypeOne(this, HumanoidPenis);
- let testicles = Thing.PartRelation.getRightTypeOne(this, HumanoidTesticles);
- this.crotchVisibleSize = 0;
- if (penis != undefined) {
- this.crotchVisibleSize += penis.getBulgeSize();
- }
- if (testicles != undefined) {
- this.crotchVisibleSize += testicles.getBulgeSize();
- }
- this.crotchVisibleSize = Math.floor(this.crotchVisibleSize * 10) / 10;
- cloths.forEach((worn) => {
- if (worn.tightCrotchSize >= 0 && this.crotchVisibleSize > worn.tightCrotchSize) {
- this.isCrotchTight = true;
- }
- if (worn.maxCrotchSize >= 0 && this.crotchVisibleSize > worn.maxCrotchSize) {
- this.crotchVisibleSize = worn.maxCrotchSize;
- }
- this.crotchVisibleSize += worn.crotchPadding;
- if (this.crotchVisibleSize < 0) {
- this.crotchVisibleSize = 0;
- }
- });
- }
- updateButtSizes(cloths) {
- this.isButtTight = false;
- let butt = Thing.PartRelation.getRightTypeOne(this, HumanoidButt);
- this.buttVisibleSize = butt == undefined ? 0 : butt.getSize();
- cloths.forEach((worn) => {
- if (worn.tightButtSize >= 0 && this.buttVisibleSize > worn.tightButtSize) {
- this.isButtTight = true;
- }
- if (worn.maxButtSize >= 0 && this.buttVisibleSize > worn.maxButtSize) {
- this.buttVisibleSize = worn.maxButtSize;
- }
- this.buttVisibleSize += worn.buttPadding;
- if (this.buttVisibleSize < 0) {
- this.buttVisibleSize = 0;
- }
- });
- }
- hasBreasts() {
- let breasts = this.getPart(HumanoidBreasts);
- if (breasts.size > 1) {
- return true;
- }
- return false;
- }
- isMale() {
- return this.getParts(HumanoidPenis).length > 0 && this.getParts(HumanoidVagina).length == 0;
- }
- isFemale() {
- return this.getParts(HumanoidPenis).length == 0 && this.getParts(HumanoidVagina).length > 0;
- }
- isHerm() {
- return this.getParts(HumanoidPenis).length > 0 && this.getParts(HumanoidVagina).length > 0;
- }
- getShortestDescription() {
- let playerGender = this.getGenderValue();
- let playerSluttiness = this.getSluttiness();
- let presentation = "";
- if (playerSluttiness.sluttinessCorrected > 75) {
- presentation += ("slutty, ");
- }
- else if (playerSluttiness.sluttinessCorrected > 35) {
- }
- else if (playerSluttiness.sluttinessCorrected > 20) {
- presentation += ("prude, ");
- }
- else {
- presentation += ("saintly, ");
- }
- if (playerGender.genderValueCorrected < 40) {
- presentation += ("masculine ");
- }
- else if (playerGender.genderValueCorrected < 60) {
- presentation += ("androgynous ");
- }
- else {
- presentation += ("feminine ");
- }
- if (playerGender.hasTits) {
- if (playerGender.hasPenis || playerGender.hasPenisBulge) {
- presentation += ("shemale");
- }
- else if (playerGender.hasVagina) {
- presentation += ("woman");
- }
- }
- else {
- if (playerGender.hasPenis) {
- if (playerGender.genderValueCorrected < 60) {
- presentation += ("man");
- }
- else {
- presentation += ("trap");
- }
- }
- else if (playerGender.hasPenisBulge) {
- if (playerGender.genderValueCorrected < 60) {
- presentation += ("man");
- }
- else {
- presentation += ("trap");
- }
- }
- else if (playerGender.hasVagina) {
- presentation += ("woman");
- }
- }
- return presentation;
- }
- static getPlayerDescription() {
- let say = new Say();
- say.add("You are ");
- let player = WorldState.player;
- let male = player.getParts(HumanoidPenis).length > 0;
- let female = player.getParts(HumanoidVagina).length > 0;
- if (male && female) {
- say.add("hermaphrodite");
- }
- else if (male) {
- say.add("male");
- }
- else {
- say.add("female");
- }
- say.add(". You are presenting as ", new SayAn(), player.getShortestDescription() + ". ");
- say.add(Attributes.GenderIdentity.getDescription(player.getStat(Attributes.GenderIdentity)));
- let sv = player.getSluttiness();
- let bulges = player.getBulges();
- let coveredPerc = 1 - (player.uncoveredSlots.length / Humanoid.SLOT_SLOT_COUNT);
- say.add(" ", player.getPart(HumanoidSkin).getDescription());
- if (sv.halfNaked) {
- say.add(" You are almost naked. ");
- }
- else if (sv.naked) {
- say.add(" You are naked. ");
- }
- else if (coveredPerc < 0.2) {
- say.add("You are not showing much of it, though.");
- }
- say.add(Attributes.Degeneration.getDescription(player.getStat(Attributes.Degeneration)));
- say.add(Say.PARAGRAPH_BREAK);
- say.add(player.getPart(HumanoidArms).getDescription(), " ");
- say.add(player.getPart(HumanoidHands).getDescription(), " ");
- say.add(player.getPart(HumanoidFeet).getDescription(), " ");
- let penis = player.getPart(HumanoidPenis);
- let vagina = player.getPart(HumanoidVagina);
- if (penis != undefined) {
- say.add("You have a ", penis.getSizeText(), (penis.isFlaccid() ? " flaccid " : " erect "), Say.COCK, " between your legs");
- if (!penis.isBig() && penis.isGrower() && penis.isFlaccid()) {
- say.add(", which is okay, since you're a grower, not a shower");
- }
- if (penis.isUncovered()) {
- let oneOf = new OneOf(OneOf.PURELY_AT_RANDOM, ...[
- ", it is not covered by any clothing",
- ", it is not covered by any clothes",
- ", it is uncovered",
- ", it is visible to all",
- ", it is hanging freely"
- ]);
- say.add(oneOf.getOne());
- }
- let testicles = player.getPart(HumanoidTesticles);
- if (HumanoidPenis.getSizeText(bulges.crotch) != HumanoidPenis.getSizeText(penis.getBulgeSize() + testicles.getBulgeSize())) {
- say.add(", but it looks like it's actually ", HumanoidPenis.getSizeText(bulges.crotch), " due to your clothing");
- }
- say.add(". ");
- if (testicles != undefined) {
- }
- }
- else {
- say.add(vagina.getDescription());
- }
- say.add(" ");
- let breasts = player.getPart(HumanoidBreasts);
- let butt = player.getPart(HumanoidButt);
- say.add("You have ", breasts.getSizeText(), " breasts and a ", butt.getSizeText(), " butt.");
- if (bulges.breasts != breasts.getSize() && bulges.butt != butt.getSize()) {
- say.add(" Your clothing makes your breasts look like they're actually ", HumanoidBreasts.getSizeText(bulges.breasts), " and make your butt appear ", HumanoidButt.getSizeText(bulges.butt), ".");
- }
- else if (bulges.breasts != breasts.getSize()) {
- say.add(" Your clothing makes your breasts look like they're actually ", HumanoidBreasts.getSizeText(bulges.breasts), ".");
- }
- else if (bulges.butt != butt.getSize()) {
- say.add(" Your clothing makes your butt appear ", HumanoidButt.getSizeText(bulges.butt), ".");
- }
- say.add(Say.PARAGRAPH_BREAK);
- let clothingSluttiness = Clothing.getSluttinessValueOn(player);
- let bodypartSluttiness = Bodypart.getSluttinessValueOn(player);
- if (clothingSluttiness.weight > 0) {
- let clothingSluttinessFinal = clothingSluttiness.value / clothingSluttiness.weight;
- if (clothingSluttinessFinal > 75) {
- say.add("Your outfit can only be described as \"whore-ish\", it is far too nasty.");
- }
- else if (clothingSluttinessFinal > 60) {
- say.add("Your clothing are obviously making you look a bit naughty.");
- }
- else if (clothingSluttinessFinal < 30 && sv.sluttinessCorrected < 30) {
- say.add("Your clothing are definitely a bit prude.");
- }
- else if (clothingSluttinessFinal < 15 && sv.sluttinessCorrected < 30) {
- say.add("Your outfit is so prude that it could be worn by a saint.");
- }
- }
- say.add(" ");
- if (bodypartSluttiness.weight > 0) {
- let bodypartSluttinessFinal = bodypartSluttiness.value / bodypartSluttiness.weight;
- if (bodypartSluttinessFinal > 75) {
- say.add("The way your body is makes you look like you were made purely for sex");
- if (coveredPerc > 0.7) {
- say.add(", thankfully it's mostly covered");
- }
- else if (coveredPerc < 0.2) {
- say.add(", and you didn't even bother covering it up");
- }
- say.add(".");
- }
- else if (bodypartSluttinessFinal > 60) {
- say.add("Your body definitely has a lot of sex-appeal going on");
- if (coveredPerc > 0.7) {
- say.add(", although it's covered");
- }
- else if (coveredPerc < 0.2) {
- say.add(", proudly displayed for all to see");
- }
- say.add(".");
- }
- else if (bodypartSluttinessFinal < 30) {
- say.add("You have very little sex-appeal, maybe you are a kitchen table?");
- if (coveredPerc > 0.7) {
- say.add(" At least you covered it up.");
- }
- else if (coveredPerc < 0.2) {
- say.add(" Maybe you could cover it up a bit.");
- }
- }
- }
- say.add(Say.PARAGRAPH_BREAK);
- let stats = new SayLeftRight();
- stats.addLeft(new SayBold("Strength: "), Attributes.Strength.getDescription(player.getStat(Attributes.Strength)));
- stats.addLeft(Say.LINE_BREAK);
- stats.addLeft(new SayBold("Agility: "), Attributes.Agility.getDescription(player.getStat(Attributes.Agility)));
- stats.addLeft(Say.LINE_BREAK);
- stats.addLeft(new SayBold("Charm: "), Attributes.Charm.getDescription(player.getStat(Attributes.Charm)));
- stats.addLeft(Say.LINE_BREAK);
- stats.addLeft(new SayBold("Intelligence: "), Attributes.Intelligence.getDescription(player.getStat(Attributes.Intelligence)));
- Skill.getSkills().forEach((skill) => {
- if (player.getSkill(skill) > 0) {
- stats.addRight(new SayBold(skill.id + ": "), skill.getDescription(player.getSkill(skill)));
- }
- });
- say.add(stats);
- return say;
- }
- }
- Humanoid.SEX_MALE = 0;
- Humanoid.SEX_FEMALE = 1;
- Humanoid.SEX_HERM = 2;
- Humanoid.SLOT_HAIR = 0;
- Humanoid.SLOT_HEADGEAR = 1;
- Humanoid.SLOT_FACE = 2;
- Humanoid.SLOT_EARS = 3;
- Humanoid.SLOT_EYES = 4;
- Humanoid.SLOT_NOSE = 5;
- Humanoid.SLOT_MOUTH = 6;
- Humanoid.SLOT_NECK = 7;
- Humanoid.SLOT_SHOULDERS = 8;
- Humanoid.SLOT_ARMS = 9;
- Humanoid.SLOT_HANDS = 10;
- Humanoid.SLOT_FINGERS = 11;
- Humanoid.SLOT_FINGERNAILS = 12;
- Humanoid.SLOT_UPPER_CHEST = 13;
- Humanoid.SLOT_MIDRIFF = 14;
- Humanoid.SLOT_WAIST = 15;
- Humanoid.SLOT_BACK = 16;
- Humanoid.SLOT_HIPS = 17;
- Humanoid.SLOT_CROTCH_FRONT = 18;
- Humanoid.SLOT_CROTCH_BACK = 19;
- Humanoid.SLOT_BUTT = 20;
- Humanoid.SLOT_LEG_UPPER = 21;
- Humanoid.SLOT_LEG_LOWER = 22;
- Humanoid.SLOT_FEET = 23;
- Humanoid.SLOT_FEET_NAILS = 24;
- Humanoid.SLOT_BREASTS = 25;
- Humanoid.SLOT_SLOT_COUNT = 26;
- Humanoid.cacheInvalidationActionRule = new Rule({
- name: "Invalidate humanoid caches",
- firstPriority: Rule.PRIORITY_LOWEST,
- code: (runner) => {
- runner.noun.actor.invalidateCaches();
- },
- conditions: (runner) => {
- return runner.noun.actor instanceof Humanoid;
- }
- });
- ActionWear.carry.addRule(Humanoid.cacheInvalidationActionRule);
- ActionRemove.carry.addRule(Humanoid.cacheInvalidationActionRule);
- var WorldState;
- (function (WorldState) {
- var worldTurn = 0;
- var playerTurn = 0;
- WorldState.player = new Humanoid({ isMale: false });
- WorldState.player.description = Humanoid.getPlayerDescription;
- var rememberedRooms = new StoredVariable({
- id: "Remembered Rooms",
- value: []
- });
- var rememberedFodder = [];
- let rememberedRoomsForIntelligence = 2;
- let rememberedRoomsForSurvival = 1;
- WorldState.RememberingRoomRulebook = new Rulebook("Remembering Room something");
- function isTurnWaiting() {
- return worldTurn < playerTurn;
- }
- WorldState.isTurnWaiting = isTurnWaiting;
- function incrementWorldTurn() {
- worldTurn++;
- }
- WorldState.incrementWorldTurn = incrementWorldTurn;
- function incrementPlayerTurn() {
- playerTurn++;
- }
- WorldState.incrementPlayerTurn = incrementPlayerTurn;
- function getCurrentTurn() {
- return playerTurn;
- }
- WorldState.getCurrentTurn = getCurrentTurn;
- function setCurrentTurn(turn) {
- playerTurn = turn;
- worldTurn = turn;
- }
- WorldState.setCurrentTurn = setCurrentTurn;
- WorldState.RememberingRoomInList = WorldState.RememberingRoomRulebook.createAndAddRule({
- name: "Is room listed in remembered rooms?",
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_LOW,
- code: runner => {
- if (rememberedRooms.value.indexOf(runner.noun.getName()) != -1 || rememberedFodder.indexOf(runner.noun) != -1) {
- return true;
- }
- }
- });
- WorldState.RememberingRoomInMap = WorldState.RememberingRoomRulebook.createAndAddRule({
- name: "Is room shown on a map?",
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_LOWEST,
- code: runner => {
- let maps = Thing.CarryRelation.getRightType(WorldState.player, MapNote);
- for (let i = 0; i < maps.length; i++) {
- if (maps[i].contains(runner.noun)) {
- return true;
- }
- }
- }
- });
- async function isRoomRemembered(room) {
- let result = await WorldState.RememberingRoomRulebook.execute({ noun: room });
- return result == true;
- }
- WorldState.isRoomRemembered = isRoomRemembered;
- function getRememberedRooms() {
- return rememberedRooms.value;
- }
- WorldState.getRememberedRooms = getRememberedRooms;
- function getRememberedRoomsAsRooms() {
- let rooms = [];
- rememberedRooms.value.forEach(roomName => {
- let room = Room.getRoom(roomName);
- if (room != undefined)
- rooms.push(room);
- });
- return rooms;
- }
- WorldState.getRememberedRoomsAsRooms = getRememberedRoomsAsRooms;
- function getMaximumRememberedRooms() {
- let intRooms = WorldState.player.getStat(Attributes.Intelligence) * rememberedRoomsForIntelligence;
- let skillRooms = WorldState.player.getSkill(Skills.Survival) * rememberedRoomsForSurvival;
- return intRooms + skillRooms;
- }
- WorldState.getMaximumRememberedRooms = getMaximumRememberedRooms;
- function truncateRooms() {
- while (rememberedRooms.value.length > getMaximumRememberedRooms()) {
- rememberedRooms.value.pop();
- }
- }
- WorldState.truncateRooms = truncateRooms;
- function rememberRoom(...rooms) {
- rooms.forEach((value) => {
- if (value instanceof Room) {
- if (value.fodder) {
- if (rememberedFodder.indexOf(value) == -1) {
- rememberedFodder.push(value);
- }
- }
- else {
- let idx = rememberedRooms.value.indexOf(value.getName());
- if (idx != -1) {
- rememberedRooms.value.splice(idx, 1);
- }
- rememberedRooms.value.unshift(value.getName());
- }
- }
- });
- truncateRooms();
- }
- WorldState.rememberRoom = rememberRoom;
- function saveState() {
- let things = {
- carried: [],
- worn: [],
- wielded: []
- };
- return {
- Things: things
- };
- }
- WorldState.saveState = saveState;
- WorldState.CorrectRememberedRoomsRule = PlayBegins.rulebook.createAndAddRule({
- name: "Correct remembered rooms",
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_MEDIUM,
- code: () => {
- let allRooms = rememberedRooms.value;
- let currentRoom = WorldState.player.getRoom();
- if (allRooms.length == 0) {
- rememberedRooms.value = [currentRoom.getName()];
- return;
- }
- let newRooms = [];
- function recursivelyAddRooms(room) {
- if (room instanceof RoomRandom) {
- if (room.fodder) {
- rememberedFodder.push(room);
- room.connections.forEach((newRoom) => {
- recursivelyAddRooms(newRoom);
- });
- }
- else if (allRooms.indexOf(room.getName()) != -1 && newRooms.indexOf(room.getName()) == -1) {
- newRooms.push(room.getName());
- room.connections.forEach((newRoom) => {
- recursivelyAddRooms(newRoom);
- });
- }
- }
- }
- recursivelyAddRooms(currentRoom);
- rememberedRooms.value = newRooms;
- }
- });
- })(WorldState || (WorldState = {}));
- class Region {
- constructor(name) {
- this.name = name;
- }
- place(...rooms) {
- rooms.forEach(room => {
- if (room instanceof Room) {
- Region.RegionRoom.setRelation(this, room);
- }
- else {
- Region.RegionRegion.setRelation(this, room);
- }
- });
- }
- getRooms() {
- let rooms = Region.RegionRoom.getRight(this);
- Region.RegionRegion.getRight(this).forEach((region) => {
- Region.RegionRoom.getRight(region).forEach((room) => {
- rooms.push(room);
- });
- });
- return rooms;
- }
- containsRoom(room) {
- let directlyContained = Region.RegionRoom.getLeft(room) == this;
- if (directlyContained) {
- return true;
- }
- else if (Region.RegionRegion.getLeft(this) != undefined) {
- return this.getRooms().indexOf(room) != -1;
- }
- return false;
- }
- contains(thing) {
- let room = thing.getRoom();
- if (room == undefined) {
- return false;
- }
- else {
- let regions = Region.InRelation.getAllLeft(room);
- return regions.indexOf(this) != -1;
- }
- }
- }
- Region.RegionRoom = new RelationOneToMany();
- Region.RegionRegion = new RelationOneToMany();
- Region.InRelation = new RelationHandlerStrictOneToMany(Region.RegionRegion, Region.RegionRoom);
- class Shuffler {
- constructor(array, rng) {
- this.position = 0;
- this.rng = rng == undefined ? Math.random : rng;
- this.array = array;
- }
- restart() {
- this.position = 0;
- }
- getOne() {
- if (this.position >= this.array.length) {
- return undefined;
- }
- let randomIndex = Math.floor(this.rng() * (this.array.length - this.position)) + this.position;
- let localCopy = this.array[this.position];
- this.array[this.position] = this.array[randomIndex];
- this.array[randomIndex] = localCopy;
- return this.array[this.position++];
- }
- getShuffled() {
- let array = this.array.slice(0);
- var m = array.length, t, i;
- while (m) {
- i = Math.floor(this.rng() * m--);
- t = array[m];
- array[m] = array[i];
- array[i] = t;
- }
- return array;
- }
- }
- var AIRules;
- (function (AIRules) {
- AIRules.PickShiny = AI.rules.createAndAddRule({
- name: "Pick Shinies",
- firstPriority: AIRules.PRIORITY_ACTING_ON_PLACE,
- conditions: (runner) => {
- let person = runner.noun;
- return person.AI.picksShinies;
- },
- code: (runner) => {
- let person = runner.noun;
- let room = person.getRoom();
- let visibleThings = room.getContainedAndVisibleTo(person);
- if (visibleThings.length > 0) {
- for (let i = 0; i < visibleThings.length; i++) {
- if (!visibleThings[i].fixedInPlace && visibleThings[i].getShiny()) {
- return new ActionTake(person, visibleThings[i]);
- }
- }
- }
- }
- });
- })(AIRules || (AIRules = {}));
- var AIRules;
- (function (AIRules) {
- AIRules.Wander = AI.rules.createAndAddRule({
- name: "Wander",
- firstPriority: AIRules.PRIORITY_ACTING_ON_IDLE,
- conditions: (runner) => {
- let person = runner.noun;
- return person.AI.wanderer && (Math.random() * 100) > person.AI.wanderChance;
- },
- code: (runner) => {
- let person = runner.noun;
- let room = person.getRoom();
- if (person.AI.wandersOn != undefined) {
- if (person.AI.wandersOn.containsRoom(room)) {
- let connections = room.connections.slice();
- let realConnections = [];
- for (let i = 0; i < connections.length; i++) {
- if (connections[i] != undefined && person.AI.wandersOn.containsRoom(connections[i])) {
- realConnections.push(i);
- }
- }
- let direction = ((new Shuffler(realConnections)).getOne());
- return new ActionGo(person, direction);
- }
- else {
- let regionRooms = person.AI.wandersOn.getRooms().filter((a) => {
- if (a instanceof RoomRandom && a.placed) {
- return true;
- }
- });
- regionRooms.sort((a, b) => {
- let dist = a.getDistanceTo(b);
- if (dist != undefined) {
- return -dist;
- }
- else {
- return 0;
- }
- });
- let targetRoom = regionRooms.pop();
- return new ActionGo(person, targetRoom);
- }
- }
- else {
- let direction = room.getConnectedDirection();
- return new ActionGo(person, direction);
- }
- }
- });
- })(AIRules || (AIRules = {}));
- class ActionDrop extends Action {
- getCommandText() {
- return "drop " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
- }
- }
- ActionDrop.check = new Rulebook("Check Dropping");
- ActionDrop.carry = new Rulebook("Carry out Dropping");
- ActionDrop.check.addRule(new Rule({
- name: "Check Dropping - Are you Wearing it?",
- firstPriority: Rule.PRIORITY_LOWEST,
- code: async (rulebook) => {
- let action = rulebook.noun;
- let actor = action.actor;
- let thing = action.getNoun(0);
- if (Thing.WearRelation.getLeft(thing) == actor || Thing.WieldRelation.getLeft(thing) == actor) {
- if (action.actor == WorldState.player) {
- action.say.add("(first taking off the ", thing, ")", Say.LINE_BREAK);
- }
- let takingAction = new ActionRemove(actor, thing);
- await takingAction.execute();
- action.say.add(takingAction.say);
- if (Thing.WearRelation.getLeft(thing) == actor || Thing.WieldRelation.getLeft(thing) == actor) {
- return false;
- }
- action.say.add(Say.LINE_BREAK);
- }
- }
- }));
- ActionDrop.check.addRule(new Rule({
- name: "Check Dropping - Do you have it??",
- firstPriority: Rule.PRIORITY_LOWEST,
- code: (rulebook) => {
- let action = rulebook.noun;
- let actor = action.actor;
- let thing = action.getNoun(0);
- if (Thing.CarryRelation.getLeft(thing) != actor) {
- if (actor == WorldState.player) {
- action.say.add("You don't have it.");
- }
- return false;
- }
- }
- }));
- ActionDrop.carry.addRule(new Rule({
- name: "Dropping - Place the noun on the floor",
- code: (rulebook) => {
- let action = rulebook.noun;
- let actor = action.actor;
- let thing = action.getNoun(0);
- Thing.EnclosedRelation.unsetRight(thing);
- actor.getRoom().place(thing);
- if (actor == WorldState.player) {
- action.say.add(new SayBold(action.getNoun(0).getPrintedName() + ": "), "Dropped.");
- }
- else {
- action.say.add(new SayThe(), actor, " drops ", new SayThe(), action.getNoun(0), " on the floor.");
- }
- }
- }));
- Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
- name: "Hyperlink - Drop",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: (rulebook) => {
- let thing = rulebook.noun;
- if (Thing.CarryRelation.getLeft(thing) == WorldState.player || Thing.WieldRelation.getLeft(thing) == WorldState.player || Thing.WearRelation.getLeft(thing) == WorldState.player) {
- Elements.HyperlinkHandler.addAvailableAction("Drop", new ActionDrop(WorldState.player, thing));
- }
- }
- }));
- Elements.InventoryHandler.LinkingThing.addRule(new Rule({
- name: "Inventory - Drop",
- firstPriority: Rule.PRIORITY_LOWEST,
- code: (rulebook) => {
- let thing = rulebook.noun;
- Elements.InventoryHandler.printThingLink("D", new ActionDrop(WorldState.player, thing));
- }
- }));
- class ActionInventory extends Action {
- constructor() {
- super(...arguments);
- this.requiresTurn = false;
- this.requiresNoun = false;
- this.requiresVisibility = false;
- }
- getCommandText() {
- return "take inventory";
- }
- static async createButton(thing, resolve) {
- let p = document.createElement("p");
- p.classList.add("choice");
- let elements = await ((new Say(thing)).getPureElements());
- elements.forEach(ele => {
- p.appendChild(ele);
- });
- p.addEventListener("click", () => {
- resolve(thing);
- });
- Controls.KeyHandler.applyCode(p, Controls.KeyHandler.getFirstKeyCode());
- return p;
- }
- }
- ActionInventory.check = new Rulebook("Check Taking Inventory");
- ActionInventory.carry = new Rulebook("Carry out Taking Inventory");
- ActionInventory.checkInventoryRule = ActionInventory.check.createAndAddRule({
- name: "List inventory as options",
- code: async (rulebook) => {
- let player = WorldState.player;
- let wielded = Thing.WieldRelation.getRight(player).sort(Elements.InventoryHandler.thingSort);
- let worn = Thing.WearRelation.getRight(player).sort(Elements.InventoryHandler.thingSort);
- let carried = Thing.CarryRelation.getRight(player).sort(Elements.InventoryHandler.thingSort);
- let buttons;
- let chosenPromise = new Promise((async (resolve) => {
- Controls.KeyHandler.reset();
- let say = new Say();
- if (wielded.length > 0) {
- say.add(new SayBold("Wielded:"), Say.LINE_BREAK);
- for (let i = 0; i < wielded.length; i++) {
- say.add(await ActionInventory.createButton(wielded[i], resolve));
- }
- }
- if (worn.length > 0) {
- if (say.sequence.length > 0) {
- say.add(Say.PARAGRAPH_BREAK);
- }
- say.add(new SayBold("Worn:"), Say.LINE_BREAK);
- for (let i = 0; i < worn.length; i++) {
- say.add(await ActionInventory.createButton(worn[i], resolve));
- }
- }
- if (carried.length > 0) {
- if (say.sequence.length > 0) {
- say.add(Say.PARAGRAPH_BREAK);
- }
- say.add(new SayBold("Carried:"), Say.LINE_BREAK);
- for (let i = 0; i < carried.length; i++) {
- say.add(await ActionInventory.createButton(carried[i], resolve));
- }
- }
- if (say.sequence.length == 0) {
- return resolve(undefined);
- }
- buttons = await say.getHTMLContent();
- Elements.CurrentTurnHandler.print(...(buttons));
- }));
- let chosenThing = await chosenPromise;
- if (chosenThing != undefined) {
- Elements.CurrentTurnHandler.unprint(...buttons);
- Controls.KeyHandler.reset();
- return new ActionExamine(WorldState.player, chosenThing);
- }
- else {
- rulebook.noun.say.add("You have nothing.");
- return false;
- }
- }
- });
- Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
- name: "Add Take Inventory Command Rule",
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_MEDIUM,
- code: (rulebook) => {
- Elements.HyperlinkHandler.addCommonAction("Inventory", new ActionInventory(WorldState.player));
- }
- }));
- class ActionSaveGame extends Action {
- constructor() {
- super(...arguments);
- this.requiresTurn = false;
- this.requiresNoun = false;
- this.requiresVisibility = false;
- }
- getCommandText() {
- return "save to file";
- }
- }
- ActionSaveGame.check = new Rulebook("Check Saving");
- ActionSaveGame.carry = new Rulebook("Carry out Saving");
- ActionSaveGame.carry.addRule(new Rule({
- name: "Save the game",
- code: runner => {
- SaveHandler.saveToFile();
- runner.noun.say.add("Saved.");
- }
- }));
- Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
- name: "Add Save Command Rule",
- firstPriority: Rule.PRIORITY_LOWEST,
- priority: Rule.PRIORITY_LOWEST,
- code: (rulebook) => {
- Elements.HyperlinkHandler.addCommonAction("Save", new ActionSaveGame(WorldState.player));
- }
- }));
- class ActionTalk extends Action {
- getCommandText() {
- return "talk to " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
- }
- }
- ActionTalk.PRIORITY_SITUATION_DIALOGUE = 9;
- ActionTalk.PRIORITY_POSSESSION_DIALOGUE = 7;
- ActionTalk.PRIORITY_LOCATION_DIALOGUE = 5;
- ActionTalk.PRIORITY_COMMON_DIALOGUE = 3;
- ActionTalk.PRIORITY_GLOBAL_DIALOGUE = 1;
- ActionTalk.check = new Rulebook("Check Talking");
- ActionTalk.carry = new Rulebook("Carry out Talking");
- ActionTalk.defaultCarryTalkingRule = ActionTalk.carry.createAndAddRule({
- name: "Talking - Doesn't want to talk",
- firstPriority: -1,
- priority: -1,
- code: (rulebook) => {
- let action = rulebook.noun;
- let thing = action.getNoun(0);
- if (thing instanceof Person) {
- action.say = new Say("It doesn't look like ", new SayHeSheIt(thing), " wants to talk.");
- }
- else {
- action.say = new Say("How are you going to talk to that?");
- }
- }
- });
- Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
- name: "Hyperlink - Talk",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: (rulebook) => {
- let thing = rulebook.noun;
- if (thing instanceof Person && thing.getRoom() == WorldState.player.getRoom()) {
- Elements.HyperlinkHandler.addAvailableAction("Talk", new ActionTalk(WorldState.player, thing));
- }
- }
- }));
- class ActionWait extends Action {
- constructor() {
- super(...arguments);
- this.requiresTurn = true;
- this.requiresNoun = false;
- this.requiresVisibility = false;
- }
- getCommandText() {
- return "wait";
- }
- }
- ActionWait.check = new Rulebook("Check Waiting");
- ActionWait.carry = new Rulebook("Carry out Waiting");
- ActionWait.carry.addRule(new Rule({
- name: "Print waiting message",
- code: runner => {
- if (runner.noun.actor == WorldState.player) {
- runner.noun.say.add("You wait.");
- }
- }
- }));
- Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
- name: "Add Wait Command Rule",
- firstPriority: Rule.PRIORITY_HIGHEST,
- priority: Rule.PRIORITY_MEDIUM,
- code: (rulebook) => {
- Elements.HyperlinkHandler.addCommonAction("Wait", new ActionWait(WorldState.player));
- }
- }));
- class ContentDescription {
- constructor(name, group) {
- this.saidCount = 0;
- this.name = name;
- this.group = group;
- }
- getScore() {
- return (this.group).getScore();
- }
- getDescription(group) {
- this.saidCount++;
- if (typeof this.description == "function") {
- return this.description(this, group);
- }
- return this.description;
- }
- setDescription(description) {
- if (!(description instanceof Say)) {
- this.description = new Say(description);
- }
- else {
- this.description = description;
- }
- return this;
- }
- static pickDescriptions(cda, target) {
- let a = cda.slice();
- let groups = [];
- for (let i = 0; i < a.length; i++) {
- let randomIndex = Math.floor(Math.random() * (a.length - i)) + i;
- let temp = a[i];
- a[i] = a[randomIndex];
- a[randomIndex] = temp;
- }
- a.sort((a, b) => {
- let scoreA = a.getScore() / (a.saidCount + 1);
- let scoreB = b.getScore() / (b.saidCount + 1);
- if (scoreA != scoreB)
- return scoreB - scoreA;
- return 0;
- });
- a.forEach(description => {
- groups.push(description.group);
- });
- let matches = target.matchAgainst(groups);
- if (matches != undefined) {
- let result = [];
- matches.forEach(i => {
- result.push(a[i].getDescription(target));
- result.push(new Say(" "));
- });
- return result;
- }
- else {
- console.warn("No description available for", target);
- return [new Say("Warning: No description available for the current situation. Please report so it can be corrected.")];
- }
- }
- }
- class ContentDifferential {
- constructor(...nouns) {
- this.nouns = [];
- this.score = 0;
- this.addNoun(...nouns);
- }
- addNoun(...nouns) {
- nouns.forEach(noun => {
- this.nouns.push(noun);
- });
- this.score = this.getScore();
- return this;
- }
- getNouns() {
- return this.nouns;
- }
- replaceNouns(...nouns) {
- this.nouns = nouns;
- return this;
- }
- isMatch(cd, allowPartial = false) {
- let check = this.getUnmatched(cd);
- if ((allowPartial || check.unmatched.length == 0) && check.matching.length == 0) {
- return true;
- }
- else if (check.matching.length == 0) {
- for (let i = 0; i < check.unmatched.length; i++) {
- if (!(check.unmatched[i] instanceof ContentMarker)) {
- return false;
- }
- else {
- if (check.unmatched[i].isImportant()) {
- return false;
- }
- }
- }
- return true;
- }
- return false;
- }
- getUnmatched(cd) {
- let unmatched = cd.nouns.slice();
- let matching = this.nouns.slice();
- for (let i = matching.length - 1; i >= 0; i--) {
- for (let k = unmatched.length - 1; k >= 0; k--) {
- if (ContentDifferential.compareNouns(matching[i], unmatched[k])) {
- unmatched.splice(k, 1);
- matching.splice(i, 1);
- break;
- }
- }
- }
- return {
- matching: matching,
- unmatched: unmatched
- };
- }
- getScore() {
- let highest = 0;
- let count = this.nouns.length;
- this.nouns.forEach((noun) => {
- let level = ContentDifferential.getNounLevel(noun);
- if (highest < level) {
- highest = level;
- }
- });
- return highest + (count / 100);
- }
- static getNounLevel(noun) {
- if (noun == undefined || noun == null) {
- return 0;
- }
- else if (typeof noun == "function") {
- if (noun.prototype instanceof Thing) {
- let specifity = 2;
- let parentClass = Object.getPrototypeOf(noun);
- while (parentClass != Thing) {
- specifity += 0.1;
- parentClass = Object.getPrototypeOf(parentClass);
- }
- return specifity;
- }
- else {
- return 2.5;
- }
- }
- else if (noun instanceof Thing) {
- return 4;
- }
- else if (noun instanceof ContentDifferential) {
- return 1;
- }
- else {
- return 0.5;
- }
- }
- static compareNouns(a, b) {
- if (a == undefined || a == null) {
- return true;
- }
- if (typeof a == "function") {
- return b == a || b instanceof a || (typeof b == "function" && b.prototype instanceof a);
- }
- else if (a instanceof Thing) {
- return b == a;
- }
- return a === b;
- }
- static isMatch(matchFrom, matchAgainst) {
- let unmatched = matchAgainst.slice();
- let matching = matchFrom.slice();
- for (let i = matching.length - 1; i >= 0; i--) {
- for (let k = unmatched.length - 1; k >= 0; k--) {
- if (matching[i].isMatch(unmatched[k])) {
- unmatched.splice(k, 1);
- matching.splice(i, 1);
- break;
- }
- }
- }
- if (unmatched.length == 0 && matching.length == 0) {
- return true;
- }
- else if (unmatched.length == 0) {
- for (let i = 0; i < matching.length; i++) {
- let nouns = matching[i].getNouns();
- for (let k = 0; k < nouns.length; k++) {
- if (!(nouns[k] instanceof ContentMarker)) {
- return false;
- }
- else {
- if (nouns[k].isImportant()) {
- return false;
- }
- }
- }
- }
- return true;
- }
- return false;
- }
- }
- var ContentGroupMatch;
- (function (ContentGroupMatch) {
- ContentGroupMatch[ContentGroupMatch["NO_MATCH"] = 0] = "NO_MATCH";
- ContentGroupMatch[ContentGroupMatch["PARTIAL_MATCH"] = 1] = "PARTIAL_MATCH";
- ContentGroupMatch[ContentGroupMatch["PERFECT_MATCH"] = 2] = "PERFECT_MATCH";
- })(ContentGroupMatch || (ContentGroupMatch = {}));
- class ContentGroup {
- constructor(...units) {
- this.units = [];
- units.forEach(unit => {
- this.addUnit(unit);
- });
- }
- addUnit(unit) {
- this.units.push(unit);
- return this;
- }
- reset() {
- this.matching = this.units.slice();
- }
- isMatching() {
- return this.matching.length;
- }
- setMatching(matching) {
- this.matching = matching;
- }
- isMatch(cg) {
- let unmatched = cg.matching.slice();
- let matching = this.units.slice();
- for (let i = matching.length - 1; i >= 0; i--) {
- for (let k = unmatched.length - 1; k >= 0; k--) {
- if (matching[i].isMatch(unmatched[k])) {
- unmatched.splice(k, 1);
- matching.splice(i, 1);
- break;
- }
- }
- }
- return {
- type: matching.length > 0 ? ContentGroupMatch.NO_MATCH :
- unmatched.length == 0 ? ContentGroupMatch.PERFECT_MATCH :
- ContentGroupMatch.PARTIAL_MATCH,
- unmatched: unmatched
- };
- }
- getScore() {
- let score = 0;
- this.units.forEach(unit => {
- score += unit.getScore();
- });
- return score;
- }
- matchAgainst(a) {
- let matches = [];
- this.reset();
- for (let i = 0; i < a.length; i++) {
- let match = a[i].isMatch(this);
- if (match.type != ContentGroupMatch.NO_MATCH) {
- matches.push(i);
- this.setMatching(match.unmatched);
- }
- if (!this.isMatching()) {
- return matches;
- }
- }
- return undefined;
- }
- }
- class ContentMarker {
- constructor(name, important) {
- this.important = false;
- this.name = name;
- this.important = important == true;
- }
- isImportant() {
- return this.important;
- }
- }
- class ContentUnit {
- constructor() {
- this.categories = [];
- }
- addCategory(...nouns) {
- this.categories.push(new ContentDifferential(...nouns));
- }
- isMatch(cu) {
- return ContentDifferential.isMatch(this.categories, cu.categories);
- }
- getScore() {
- let score = 0;
- this.categories.forEach(diff => {
- score += diff.score;
- });
- return score / this.categories.length;
- }
- matchAgainst(a) {
- for (let i = 0; i < a.length; i++) {
- if (a[i].isMatch(this)) {
- return [i];
- }
- }
- }
- }
- class CombatDescription extends ContentDescription {
- constructor(name) {
- super(name, new ContentGroup());
- CombatDescription.DESCRIPTIONS.push(this);
- }
- addUnit() {
- let unit = new CombatUnit();
- this.group.addUnit(unit);
- return unit;
- }
- static getDescription(target) {
- return ContentDescription.pickDescriptions(CombatDescription.DESCRIPTIONS, target);
- }
- }
- CombatDescription.DESCRIPTIONS = [];
- class CombatHit extends ContentMarker {
- }
- CombatHit.FULL_DODGE = new CombatHit("Full Dodge", true);
- CombatHit.PARTIAL_DODGE = new CombatHit("Partial Dodge", true);
- CombatHit.FULL_HIT = new CombatHit("Full Hit", true);
- class CombatDamage extends ContentMarker {
- }
- CombatDamage.LOW_DAMAGE = new CombatDamage("Low Damage");
- CombatDamage.MEDIUM_DAMAGE = new CombatDamage("Medium Damage");
- CombatDamage.HIGH_DAMAGE = new CombatDamage("High Damage");
- class CombatResult extends ContentMarker {
- }
- CombatResult.KNOCKED = new CombatResult("Target was knocked down by the attack", true);
- CombatResult.KNOCKED_OFF = new CombatResult("Target was knocked off by the attack, becoming unconscious", true);
- CombatResult.KILLED = new CombatResult("Target was killed by this attack", true);
- class CombatUnit extends ContentUnit {
- constructor() {
- super();
- this.actor = new ContentDifferential(Person);
- this.target = new ContentDifferential(Person);
- this.weapon = new ContentDifferential(Thing);
- this.markers = new ContentDifferential();
- }
- setActor(it) {
- this.actor = new ContentDifferential(it);
- return this;
- }
- setTarget(it) {
- this.target = new ContentDifferential(it);
- return this;
- }
- setWeapon(it) {
- this.weapon = new ContentDifferential(it);
- return this;
- }
- addMarker(marker) {
- this.markers.addNoun(marker);
- return this;
- }
- getScore() {
- return this.actor.getScore() + this.target.getScore() + this.weapon.getScore() + this.markers.getScore();
- }
- isMatch(cu) {
- if (cu instanceof CombatUnit) {
- return this.actor.isMatch(cu.actor) && this.target.isMatch(cu.target) &&
- this.weapon.isMatch(cu.weapon) && this.markers.isMatch(cu.markers);
- }
- return false;
- }
- }
- class FuckingDescription extends ContentDescription {
- constructor(name) {
- super(name, new ContentGroup());
- FuckingDescription.DESCRIPTIONS.push(this);
- }
- addUnit() {
- let unit = new FuckingUnit();
- this.group.addUnit(unit);
- return unit;
- }
- static getDescription(target) {
- return ContentDescription.pickDescriptions(FuckingDescription.DESCRIPTIONS, target);
- }
- }
- FuckingDescription.DESCRIPTIONS = [];
- class FuckingStyle extends ContentMarker {
- }
- FuckingStyle.GENTLE = new FuckingStyle("Gentle");
- FuckingStyle.ROUGH = new FuckingStyle("Rough");
- class FuckingState extends ContentMarker {
- }
- FuckingState.PENETRATING = new FuckingState("Penetration Start", true);
- FuckingState.REMOVING = new FuckingState("Removing Stick", true);
- FuckingState.SPEEDING_UP = new FuckingState("Speeding up", true);
- FuckingState.CUM_START = new FuckingState("Started Cumming", true);
- FuckingState.CUMMING = new FuckingState("Cumming", true);
- FuckingState.CUM_END = new FuckingState("Finished Cumming", true);
- FuckingState.CUM_INSIDE = new FuckingState("Cum Inside", true);
- FuckingState.CUM_OUTSIDE = new FuckingState("Cum Outside", true);
- class FuckingUnit extends ContentUnit {
- constructor() {
- super();
- this.fucker = new ContentDifferential(Person);
- this.fucked = new ContentDifferential(Person);
- this.hole = new ContentDifferential(SexHole);
- this.stick = new ContentDifferential(SexStick);
- this.markers = new ContentDifferential();
- }
- setFucker(it) {
- this.fucker = new ContentDifferential(it);
- return this;
- }
- setFucked(it) {
- this.fucked = new ContentDifferential(it);
- return this;
- }
- setHole(it) {
- this.hole = new ContentDifferential(it);
- return this;
- }
- setStick(it) {
- this.stick = new ContentDifferential(it);
- return this;
- }
- addMarker(marker) {
- this.markers.addNoun(marker);
- return this;
- }
- getScore() {
- return this.fucker.getScore() + this.fucked.getScore() + this.hole.getScore() + this.stick.getScore() + this.markers.getScore();
- }
- isMatch(fu) {
- if (fu instanceof FuckingUnit) {
- return this.fucker.isMatch(fu.fucker) && this.fucked.isMatch(fu.fucked) &&
- this.hole.isMatch(fu.hole) && this.stick.isMatch(fu.stick) && this.markers.isMatch(fu.markers);
- }
- return false;
- }
- }
- class BranchingOption {
- constructor(say, appearCondition) {
- this.previouslyPicked = false;
- this.say = say;
- this.appearCondition = appearCondition;
- }
- }
- class BranchingDialogue {
- constructor(...options) {
- this.options = [];
- this.addOptions(...options);
- }
- addOptions(...options) {
- this.options.push(...options);
- arrayUnique(this.options);
- }
- async getChosenOption() {
- let validOptions = [];
- for (let i = 0, value = this.options[i]; value != undefined; value = this.options[++i]) {
- if (value.appearCondition == undefined || (typeof value.appearCondition == "function" && value.appearCondition()) || value.appearCondition) {
- validOptions.push(value);
- }
- }
- let choiceButtons = [];
- for (let i = 0; i < validOptions.length; i++) {
- let value = validOptions[i];
- let classes = ["choice"];
- if (value.previouslyPicked) {
- classes.push("picked");
- }
- choiceButtons.push((await value.say.getHTML("p", classes))[0]);
- }
- let PlayerInput = new Promise((resolve, reject) => {
- this.resolve = resolve;
- });
- Controls.KeyHandler.reset();
- for (let index = 0, value = choiceButtons[index]; value != undefined; value = choiceButtons[++index]) {
- Controls.KeyHandler.applyCode(value, Controls.KeyHandler.getFirstKeyCode());
- value.addEventListener("click", (e) => {
- validOptions[index].previouslyPicked = true;
- this.resolve(validOptions[index]);
- e.preventDefault();
- });
- }
- await Elements.CurrentTurnHandler.print(...choiceButtons);
- let choice = await PlayerInput;
- await Elements.CurrentTurnHandler.unprint(...choiceButtons);
- return choice;
- }
- }
- var NodeType;
- (function (NodeType) {
- NodeType[NodeType["Node"] = 0] = "Node";
- NodeType[NodeType["Tree"] = 1] = "Tree";
- NodeType[NodeType["Text"] = 2] = "Text";
- NodeType[NodeType["Set"] = 3] = "Set";
- NodeType[NodeType["Choice"] = 4] = "Choice";
- NodeType[NodeType["Branch"] = 5] = "Branch";
- })(NodeType || (NodeType = {}));
- class DialogueNode {
- constructor(id) {
- this.type = NodeType.Node;
- this.id = id;
- }
- setName(name) {
- this.name = name;
- }
- setNext(next) {
- this.next = next;
- }
- getNext() {
- return this.next;
- }
- setChoices(choices) {
- this.choices = choices;
- }
- hasChoices() {
- return this.choices != undefined && this.choices.length > 0;
- }
- }
- class DialogueBranch extends DialogueNode {
- constructor() {
- super(...arguments);
- this.type = NodeType.Branch;
- this.variable = () => { return false; };
- this.branchIds = [];
- this.branchConditions = [];
- }
- setVariable(varFunc) {
- this.variable = varFunc;
- }
- addBranch(targetid, valueFunc) {
- this.branchIds.push(targetid);
- this.branchConditions.push(valueFunc);
- }
- getNext() {
- let variable = this.variable();
- for (let i = 0; i < this.branchIds.length; i++) {
- let comparing = this.branchConditions[i]();
- if (comparing == variable) {
- return this.branchIds[i];
- }
- }
- return this.next;
- }
- }
- class DialogueText extends DialogueNode {
- constructor() {
- super(...arguments);
- this.type = NodeType.Text;
- }
- setSay(sayCreator) {
- this.sayCreator = sayCreator;
- }
- getSay() {
- return this.sayCreator();
- }
- }
- class DialogueChoice extends DialogueText {
- constructor() {
- super(...arguments);
- this.type = NodeType.Choice;
- this.conditions = () => { return true; };
- }
- isAvailable() {
- return this.conditions();
- }
- setConditions(conditions) {
- this.conditions = conditions;
- }
- }
- class DialogueNodeTree extends DialogueNode {
- constructor() {
- super(...arguments);
- this.type = NodeType.Tree;
- }
- setTree(treeFinder) {
- this.tree = treeFinder;
- }
- }
- class DialogueSet extends DialogueNode {
- constructor() {
- super(...arguments);
- this.type = NodeType.Set;
- }
- setFunction(code) {
- this.code = code;
- }
- run() {
- return this.code();
- }
- }
- class DialogueTree {
- constructor(id) {
- this.nodes = {};
- this.startNode = undefined;
- this.repeatChoices = true;
- this.id = id;
- }
- addNode(node) {
- this.nodes[node.id] = node;
- if (node.type == NodeType.Node) {
- this.nodes[node.name] = node;
- }
- }
- addStartNode(node) {
- this.addNode(node);
- this.startNode = node;
- }
- getNode(id) {
- return this.nodes[id];
- }
- getNext(node) {
- let next = node.getNext();
- if (next != undefined) {
- return this.getNode(next);
- }
- }
- setRepeatChoices(doIt) {
- this.repeatChoices = doIt;
- }
- async execute(startId) {
- console.debug(Rulebook.getIndentation() + "[DialogueTree] Running " + this.id);
- Rulebook.increaseIndentation(this);
- let node;
- if (startId == undefined) {
- node = this.startNode;
- }
- else {
- node = this.getNode(startId);
- }
- if (node == undefined) {
- Elements.CurrentTurnHandler.printAsError("Unable to start dialogue " + this.id + ": A starting node could not be found.");
- return;
- }
- let previousNode;
- while (node != undefined) {
- let nextNode = await this.processNode(node, previousNode);
- previousNode = node;
- node = nextNode;
- }
- Rulebook.decreaseIndentation();
- }
- async processNode(node, previousNode) {
- console.debug(Rulebook.getIndentation() + "[" + node.type + "] " + node.id);
- Rulebook.increaseIndentation(node);
- let doChoices = node.hasChoices();
- if (node.type == NodeType.Tree) {
- await node.tree().execute();
- }
- else if (node.type == NodeType.Text) {
- let say = node.getSay();
- Elements.CurrentTurnHandler.printAsContent(say);
- }
- else if (node.type == NodeType.Set) {
- let runningSet = node.run();
- if (runningSet instanceof Promise) {
- await runningSet;
- }
- }
- if (doChoices) {
- let branchingDialogue = new BranchingDialogue();
- let choices = node.choices;
- let options = [];
- for (let i = 0; i < choices.length; i++) {
- let choice = this.getNode(choices[i]);
- let branchingOption = new BranchingOption(choice.getSay(), choice.isAvailable());
- options.push(branchingOption);
- branchingDialogue.addOptions(branchingOption);
- }
- let chosenOption = await branchingDialogue.getChosenOption();
- let chosenNodeId = choices[options.indexOf(chosenOption)];
- let chosenNode = this.getNode(chosenNodeId);
- if (this.repeatChoices) {
- let say = new Say(new SayBold(" > ", chosenNode.getSay()));
- this.lastPrintedChoice = await Elements.CurrentTurnHandler.getSayElementsAsContent(say);
- await Elements.CurrentTurnHandler.print(...this.lastPrintedChoice);
- }
- console.debug(Rulebook.getIndentation() + "[Choice] Picked " + chosenNodeId);
- console.debug(Rulebook.getIndentation() + "[Choice] Going to " + chosenNode.getNext());
- Rulebook.increaseIndentation(chosenNodeId);
- Rulebook.decreaseIndentation();
- Rulebook.decreaseIndentation();
- return this.getNext(chosenNode);
- }
- else {
- Rulebook.decreaseIndentation();
- return this.getNext(node);
- }
- }
- unprintLastChoice() {
- Elements.CurrentTurnHandler.unprint(...this.lastPrintedChoice);
- }
- }
- var DialogueTrees;
- (function (DialogueTrees) {
- function findUnusedTrees() {
- let allCode = document.getElementById("appCode").innerHTML;
- let useCount = {};
- let unused = [];
- for (let dialogueName in DialogueTrees) {
- if (dialogueName != "findUnusedTrees") {
- let count = occurrences(allCode, "DialogueTrees." + dialogueName, false) - 1;
- if (count > 0) {
- useCount[dialogueName] = count;
- }
- else {
- unused.push(dialogueName);
- }
- }
- }
- for (let dialogueName in useCount) {
- let times = useCount[dialogueName];
- console.debug("[DialogueUsage] " + dialogueName + " is referenced " + times + (times > 1 ? " times." : " time."));
- }
- for (let i = 0; i < unused.length; i++) {
- console.error("[DialogueUsage] " + unused[i] + " is never referenced and will not appear in-game.");
- }
- }
- DialogueTrees.findUnusedTrees = findUnusedTrees;
- function occurrences(string, subString, allowOverlapping) {
- string += "";
- subString += "";
- if (subString.length <= 0)
- return (string.length + 1);
- var n = 0, pos = 0, step = allowOverlapping ? 1 : subString.length;
- while (true) {
- pos = string.indexOf(subString, pos);
- if (pos >= 0) {
- ++n;
- pos += step;
- }
- else
- break;
- }
- return n;
- }
- })(DialogueTrees || (DialogueTrees = {}));
- class RoomRandom extends Room {
- constructor(id, fodder) {
- super(id, fodder);
- this.connectableOn = [Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST];
- this.randomizable = true;
- this.placed = false;
- this.appearChance = 75;
- this.extraConnectionChance = 75;
- this.backgroundImage = "tomato";
- }
- getBackgroundClass() {
- if (this.isImageDefined()) {
- return this.backgroundImage;
- }
- return "tomato";
- }
- isImageDefined() {
- try {
- for (var i = 0; i < document.styleSheets.length; i++) {
- var rules = document.styleSheets[i]['rules'] || document.styleSheets[i]['cssRules'];
- for (var x in rules) {
- if (typeof rules[x].selectorText == 'string' && rules[x].selectorText == "." + this.backgroundImage) {
- return true;
- }
- }
- }
- return false;
- }
- catch (e) {
- console.warn("Unable to read image");
- return true;
- }
- }
- isConnectableOn(oppositeDirection) {
- return this.connectableOn.indexOf(oppositeDirection) != -1;
- }
- getAnyDirection(options) {
- let directionShuffler = new Shuffler(this.connectableOn);
- for (let direction = directionShuffler.getOne(); direction != undefined; direction = directionShuffler.getOne()) {
- let oppositeDirection = OppositeDirection[Direction[direction]];
- let otherCoordinates = options.map.getCoordinates(options.otherRoom);
- let wouldbeCoordinates = Room.shift(otherCoordinates, oppositeDirection);
- let trickyOptions = {
- otherRoom: options.otherRoom,
- otherRoomDirection: oppositeDirection,
- trickyRoomDirection: direction,
- map: options.map,
- region: options.region,
- x: wouldbeCoordinates[0],
- y: wouldbeCoordinates[1]
- };
- if (this.isPlaceable(trickyOptions)) {
- return trickyOptions;
- }
- }
- }
- isPlaceable(options) {
- if (!this.isConnectableOn(options.trickyRoomDirection) || !options.map.isFree(options.x, options.y)) {
- return false;
- }
- if (options.otherRoom == undefined || !options.otherRoom.isConnectableOn(options.otherRoomDirection)) {
- return false;
- }
- if (this.trickyCode != undefined) {
- return this.trickyCode(options);
- }
- return true;
- }
- getDistanceTo(room) {
- let myCoordinates = this.lastMap.getCoordinates(this);
- let otherCoordinates = this.lastMap.getCoordinates(room);
- if (myCoordinates != undefined && otherCoordinates != undefined) {
- let c1 = myCoordinates;
- let c2 = otherCoordinates;
- return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]);
- }
- }
- findPathTo(pathEnd, validRoom) {
- validRoom = validRoom == undefined ? () => { return true; } : validRoom;
- let map = this.lastMap;
- let endPosition = map.getCoordinates(pathEnd);
- let open = [];
- let distance = (c1, c2) => {
- return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]);
- };
- let neighbors = (room, x, y) => {
- let neighs = [];
- for (let direction = 0; direction < room.connections.length; direction++) {
- let otherRoom = room.connections[direction];
- if (otherRoom != undefined && open.indexOf(otherRoom) == -1 && validRoom(otherRoom)) {
- let dirCoordinates = Room.shift([x, y], direction);
- let dir = [otherRoom, dirCoordinates, distance(endPosition, dirCoordinates)];
- neighs.push(dir);
- }
- }
- return neighs.sort((a, b) => { return a[2] - b[2]; });
- };
- let shortestPath = {
- length: map.getRoomCount()
- };
- let noPath = shortestPath;
- let cPath = [];
- let findPath = (myArray) => {
- let room = myArray[0];
- cPath.push(myArray);
- if (room == pathEnd) {
- if (shortestPath.length >= cPath.length) {
- shortestPath = cPath.slice(0);
- }
- }
- else if (shortestPath.length > (cPath.length)) {
- open.push(room);
- let otherRooms = neighbors(room, myArray[1][0], myArray[1][1]);
- for (let i = 0; i < otherRooms.length; i++) {
- if ((cPath.length + 1) < shortestPath.length) {
- findPath(otherRooms[i]);
- }
- }
- open.pop();
- }
- cPath.pop();
- };
- findPath([this, map.getCoordinates(this)]);
- return shortestPath != noPath ? shortestPath : undefined;
- }
- getBestDirectionTo(otherRoom, validRoom) {
- let path = this.findPathTo(otherRoom, validRoom);
- if (path != undefined) {
- if (path.length == 1) {
- return undefined;
- }
- return this.connections.indexOf(path[1][0]);
- }
- }
- getAStarPathTo(otherRoom, validRoom) {
- validRoom = validRoom != undefined ? validRoom : () => { return true; };
- let distance = (c1, c2) => {
- return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]);
- };
- let isVisited = (room) => {
- return visited.indexOf(room) != -1;
- };
- let getNeighbors = (node) => {
- let neighbors = [];
- for (let direction = 0; direction < node.room.connections.length; direction++) {
- if (node.room.connections[direction] != undefined && !isVisited(node.room.connections[direction]) && validRoom(node.room.connections[direction])) {
- let coordinates = Room.shift(node.coordinates, direction);
- neighbors.push({
- room: node.room.connections[direction],
- coordinates: coordinates,
- distance: distance(coordinates, endNode.coordinates)
- });
- visited.push(node.room.connections[direction]);
- }
- }
- return neighbors;
- };
- let getClosestPath = () => {
- let shortest = 0;
- for (let i = 1; i < open.length; i++) {
- let lastPoint = open[i][open[i].length - 1];
- if (lastPoint.distance < open[shortest][open[shortest].length - 1].distance) {
- shortest = i;
- }
- }
- return shortest;
- };
- let endNode = { room: otherRoom, coordinates: this.lastMap.getCoordinates(otherRoom), distance: 0 };
- let startCoordinates = this.lastMap.getCoordinates(this);
- let startNode = { room: this, coordinates: startCoordinates, distance: distance(startCoordinates, endNode.coordinates) };
- let open = [[startNode]];
- let closed = [];
- let shortestPath = this.lastMap.getRoomCount();
- let shortestIndex;
- let myPath;
- let closest = 0;
- let visited = [this];
- while (open.length > 0) {
- myPath = open.splice(closest, 1)[0];
- if (myPath[myPath.length - 1].distance == 0) {
- let push = closed.push(myPath);
- if (myPath.length < shortestPath) {
- shortestPath = myPath.length;
- shortestIndex = push - 1;
- }
- break;
- }
- else {
- let neighbors = getNeighbors(myPath[myPath.length - 1]);
- for (let i = 0; i < neighbors.length; i++) {
- open.push(myPath.concat([neighbors[i]]));
- }
- }
- for (let i = open.length - 1; i >= 0; i--) {
- if (open[i].length >= shortestPath) {
- open.splice(i, 1);
- }
- }
- closest = getClosestPath();
- }
- return closed[shortestIndex];
- }
- getAStarBestDirectionTo(otherRoom, validRoom) {
- let path = this.getAStarPathTo(otherRoom, validRoom);
- if (path != undefined) {
- if (path.length == 1) {
- return undefined;
- }
- return this.connections.indexOf(path[1].room);
- }
- }
- getConnectedDirection() {
- let shuffler = new Shuffler(Room.DIRECTIONS);
- for (let direction = shuffler.getOne(); direction != undefined; direction = shuffler.getOne()) {
- if (this.connections[direction] != undefined) {
- return direction;
- }
- }
- }
- static getActive(type) {
- }
- }
- class RoomRandomMap {
- constructor() {
- this.positionTable = {};
- this.roomMap = new Map();
- this.lowestX = 0;
- this.lowestY = 0;
- this.highestX = 0;
- this.highestY = 0;
- this.limitsInvalid = false;
- }
- emptyCache() {
- this.availableConnections = [];
- Room.DIRECTIONS.forEach(() => {
- this.availableConnections.push([]);
- });
- this.rooms = 0;
- }
- getAvailableConnections() {
- return this.availableConnections.reduce((previousValue, currentValue, currentIndex, array) => {
- return previousValue + (currentValue.length);
- }, 0);
- }
- removeFromCache(coordinatesToRemove, direction) {
- let directionArray = this.availableConnections[direction];
- for (let k = 0, coordinates = directionArray[k]; coordinates != undefined; coordinates = directionArray[++k]) {
- if (coordinates.x == coordinatesToRemove.x && coordinates.y == coordinatesToRemove.y) {
- directionArray.splice(k, 1);
- return;
- }
- }
- }
- addToCache(coordinatesToAdd, direction) {
- let directionArray = this.availableConnections[direction];
- for (let k = 0, coordinates = directionArray[k]; coordinates != undefined; coordinates = directionArray[++k]) {
- if (coordinates.x == coordinatesToAdd.x && coordinates.y == coordinatesToAdd.y) {
- return;
- }
- }
- directionArray.push(coordinatesToAdd);
- }
- getAnyFromCache(direction) {
- let array = this.availableConnections[direction];
- if (array.length > 0) {
- let randomIndex = Math.floor(Math.random() * (array.length));
- let randomCoordinates = array[randomIndex];
- if (randomCoordinates != undefined) {
- return this.getRoom(randomCoordinates.x, randomCoordinates.y);
- }
- }
- }
- isFree(x, y) {
- return (this.positionTable[x] == undefined || this.positionTable[x][y] === undefined);
- }
- block(x, y) {
- if (this.isFree(x, y)) {
- if (this.positionTable[x] == undefined) {
- this.positionTable[x] = {};
- }
- this.positionTable[x][y] = null;
- this.updateCacheOnPosition(x, y);
- this.updateLimits(x, y);
- }
- }
- updateAllLimits() {
- this.highestX = 0;
- this.highestY = 0;
- this.lowestX = 0;
- this.lowestY = 0;
- for (let x in this.positionTable) {
- for (let y in this.positionTable[x]) {
- if (this.positionTable[x][y] != undefined && this.positionTable[x][y] != null) {
- this.updateLimits(parseInt(x), parseInt(y));
- }
- }
- }
- this.limitsInvalid = false;
- }
- updateLimits(x, y) {
- if (x > this.highestX)
- this.highestX = x;
- if (y > this.highestY)
- this.highestY = y;
- if (y < this.lowestY)
- this.lowestY = y;
- if (x < this.lowestX)
- this.lowestX = x;
- }
- map(room, x, y) {
- if (this.positionTable[x] == undefined) {
- this.positionTable[x] = {};
- }
- this.positionTable[x][y] = room;
- this.roomMap.set(room, [x, y]);
- this.updateCacheOnPosition(x, y);
- this.updateLimits(x, y);
- room.placed = true;
- room.lastMap = this;
- this.rooms++;
- }
- unmap(x, y) {
- if (this.positionTable[x] != undefined && this.positionTable[x][y] != undefined) {
- this.roomMap.delete(this.positionTable[x][y]);
- delete (this.positionTable[x][y]);
- this.rooms--;
- this.updateCacheOnPosition(x, y);
- this.limitsInvalid = true;
- }
- }
- updateCacheOnPosition(x, y) {
- let coordinates = [x, y, 0];
- let coordinatesMap = { x: x, y: y };
- let coordinatesBlocked = !this.isFree(x, y);
- let coordinatesRoom = this.getRoom(x, y);
- Room.DIRECTIONS.forEach(direction => {
- let oppositeDirection = OppositeDirection[Direction[direction]];
- let shifted = Room.shift(coordinates, direction);
- let shiftedMap = { x: shifted[0], y: shifted[1] };
- let shiftedBlocked = !this.isFree(shifted[0], shifted[1]);
- let shiftedRoom = this.getRoom(shifted[0], shifted[1]);
- if (coordinatesRoom != undefined) {
- if (shiftedBlocked) {
- this.removeFromCache(coordinatesMap, direction);
- }
- else if (coordinatesRoom.isConnectableOn(direction)) {
- this.addToCache(coordinatesMap, direction);
- }
- }
- else {
- this.removeFromCache(coordinatesMap, direction);
- }
- if (shiftedRoom != undefined) {
- if (coordinatesBlocked) {
- this.removeFromCache(shiftedMap, oppositeDirection);
- }
- else if (shiftedRoom.isConnectableOn(oppositeDirection)) {
- this.addToCache(shiftedMap, oppositeDirection);
- }
- }
- else {
- this.removeFromCache(shiftedMap, oppositeDirection);
- }
- });
- }
- getRoom(x, y) {
- if (this.positionTable[x] != undefined) {
- if (this.positionTable[x][y] != null) {
- return this.positionTable[x][y];
- }
- }
- return undefined;
- }
- getCoordinates(room) {
- return this.roomMap.get(room);
- }
- getRoomCount() {
- return this.roomMap.size;
- }
- getWidth() {
- return this.highestX - this.lowestX;
- }
- getHeight() {
- return this.highestY - this.lowestY;
- }
- getPreferredGrowth() {
- let ratio = this.getHeight() / this.getWidth();
- let idealRatio = 2.5;
- let difference = Math.abs(ratio - idealRatio);
- if (difference < 0.5) {
- return RoomRandomMap.PREFERRED_GROWTH_ANY;
- }
- else {
- if (ratio < idealRatio) {
- return RoomRandomMap.PREFERRED_GROWTH_VERTICAL;
- }
- else {
- return RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL;
- }
- }
- }
- static isDirectionPreferred(direction, growth) {
- if (growth == RoomRandomMap.PREFERRED_GROWTH_ANY) {
- return true;
- }
- else if (direction == Direction.NORTH || direction == Direction.SOUTH) {
- return growth == RoomRandomMap.PREFERRED_GROWTH_VERTICAL;
- }
- else {
- return growth == RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL;
- }
- }
- }
- RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL = 0;
- RoomRandomMap.PREFERRED_GROWTH_VERTICAL = 1;
- RoomRandomMap.PREFERRED_GROWTH_ANY = 2;
- class ShufflerDirection extends Shuffler {
- constructor(array, preferredGrowth, rng) {
- super(array, rng);
- this.runner = 0;
- this.preferredGrowth = preferredGrowth;
- let goodDirections = [];
- let badDirections = [];
- for (let direction = this.getOne(); direction != undefined; direction = this.getOne()) {
- if (RoomRandomMap.isDirectionPreferred(direction, this.preferredGrowth)) {
- goodDirections.push(direction);
- }
- else {
- badDirections.push(direction);
- }
- }
- this.directionsArray = goodDirections.concat(badDirections);
- }
- getDirection() {
- return this.directionsArray[this.runner++];
- }
- }
- class RoomRandomFodder extends RoomRandom {
- constructor(id) {
- super(id, true);
- }
- }
- class RegionRandom extends Region {
- constructor(name, map) {
- super(name);
- this.randomized = false;
- this.fodderRoomClass = RoomRandomFodder;
- this.placedRooms = [];
- this.map = map == undefined ? new RoomRandomMap() : map;
- }
- async randomize() {
- if (!this.randomized) {
- await RegionRandom.rulebookRandomizeRegion.execute({
- noun: this
- });
- }
- }
- }
- RegionRandom.rng = () => { return Math.random(); };
- RegionRandom.rulebookRandomizeRegion = new Rulebook("Randomizing Random Region something");
- RegionRandom.rulebookPlaceRoom = new Rulebook("Placing Random Room something");
- RegionRandom.rulebookBeforePlaceRoom = new Rulebook("Before placing Random Room something");
- RegionRandom.rulebookAfterPlaceRoom = new Rulebook("After placing Random Room something");
- RegionRandom.ruleFirstRandomizeRegion = RegionRandom.rulebookRandomizeRegion.createAndAddRule({
- name: "Empty map cache to start randomizing region",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: runner => {
- let region = runner.noun;
- region.map.emptyCache();
- }
- });
- RegionRandom.ruleBasicRandomizeRegion = RegionRandom.rulebookRandomizeRegion.createAndAddRule({
- name: "Randomize all unplaced, randomizable rooms in region something",
- code: async (runner) => {
- let region = runner.noun;
- let roomShuffler = new Shuffler(Region.InRelation.getAllRightTypes(region, RoomRandom).filter((room) => {
- return room.randomizable && !room.placed &&
- (room == WorldState.player.getRoom() || (RegionRandom.rng() * 100) <= room.appearChance);
- }), RegionRandom.rng);
- for (let room = roomShuffler.getOne(); room != undefined; room = roomShuffler.getOne()) {
- while (region.map.rooms > 0 && region.map.getAvailableConnections() < 4) {
- let fodder = new region.fodderRoomClass();
- let options = {
- map: region.map,
- room: fodder,
- region: region
- };
- region.place(fodder);
- await RegionRandom.rulebookBeforePlaceRoom.execute({ noun: options });
- await RegionRandom.rulebookPlaceRoom.execute({ noun: options });
- await RegionRandom.rulebookAfterPlaceRoom.execute({ noun: options });
- }
- let options = {
- map: region.map,
- room: room,
- region: region
- };
- await RegionRandom.rulebookBeforePlaceRoom.execute({ noun: options });
- await RegionRandom.rulebookPlaceRoom.execute({ noun: options });
- await RegionRandom.rulebookAfterPlaceRoom.execute({ noun: options });
- if (!room.placed) {
- Elements.CurrentTurnHandler.printAsError(new Say("Was unable to place room ", room, ". Game might be unplayable."));
- }
- }
- }
- });
- RegionRandom.ruleAddExtraConnections = RegionRandom.rulebookRandomizeRegion.createAndAddRule({
- firstPriority: Rule.PRIORITY_LOWEST,
- name: "Add extra connections to rooms in region",
- code: runner => {
- let region = runner.noun;
- let placedRooms = Region.InRelation.getAllRightTypes(region, RoomRandom).filter((room) => {
- return room.randomizable && room.placed;
- });
- placedRooms.forEach((room) => {
- let myCoordinates = region.map.getCoordinates(room);
- let directionShuffler = new Shuffler(room.connectableOn.slice(0), RegionRandom.rng);
- for (let direction = directionShuffler.getOne(); direction != undefined && (RegionRandom.rng() * 100) <= room.extraConnectionChance; direction = directionShuffler.getOne()) {
- if (room.connections[direction] == undefined) {
- let otherCoordinates = Room.shift(myCoordinates, direction);
- let otherRoom = region.map.getRoom(otherCoordinates[0], otherCoordinates[1]);
- if (otherRoom != undefined && otherRoom.randomizable
- && otherRoom.isConnectableOn(OppositeDirection[Direction[direction]])
- && (RegionRandom.rng() * 100) <= otherRoom.extraConnectionChance) {
- room.mapRoom(otherRoom, direction);
- }
- }
- }
- });
- }
- });
- RegionRandom.rulePlaceFirstRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({
- name: "Placing First room something",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: runner => {
- let placingOptions = runner.noun;
- if (placingOptions.map.isFree(0, 0)) {
- placingOptions.map.map(placingOptions.room, 0, 0);
- return true;
- }
- },
- conditions: runner => {
- return runner.noun.map.rooms == 0;
- }
- });
- RegionRandom.rulePlaceNonTrickyRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({
- name: "Placing non-tricky room something",
- firstPriority: Rule.PRIORITY_HIGH,
- code: runner => {
- let placingOptions = runner.noun;
- let preferredGrowthDirection = placingOptions.map.getPreferredGrowth();
- let directionShuffler = new ShufflerDirection(placingOptions.room.connectableOn, preferredGrowthDirection);
- for (let direction = directionShuffler.getDirection(); direction != undefined; direction = directionShuffler.getDirection()) {
- let oppositeDirection = OppositeDirection[Direction[direction]];
- let connectableRoom = placingOptions.map.getAnyFromCache(oppositeDirection);
- if (connectableRoom != undefined) {
- let otherCoordinates = placingOptions.map.getCoordinates(connectableRoom);
- let myCoordinates = Room.shift(otherCoordinates, oppositeDirection);
- placingOptions.room.mapRoom(connectableRoom, direction);
- placingOptions.map.map(placingOptions.room, myCoordinates[0], myCoordinates[1]);
- return true;
- }
- }
- },
- conditions: runner => {
- return runner.noun.room.trickyCode == undefined;
- }
- });
- RegionRandom.rulePlaceTrickyRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({
- name: "Placing tricky room something",
- code: runner => {
- let placingOptions = runner.noun;
- let placedRooms = placingOptions.region.getRooms().filter((room) => {
- return room instanceof RoomRandom && room.placed;
- });
- if (placedRooms.length == 0) {
- Elements.CurrentTurnHandler.printAsError("Unable to place room " + placingOptions.room.getPrintedName() + ": There are no rooms to connect to!");
- return false;
- }
- let roomShuffler = new Shuffler(placedRooms, RegionRandom.rng);
- for (let connectableRoom = roomShuffler.getOne(); connectableRoom != undefined; connectableRoom = roomShuffler.getOne()) {
- let trickier = {
- region: placingOptions.region,
- map: placingOptions.map,
- otherRoom: connectableRoom
- };
- let tricky = placingOptions.room.getAnyDirection(trickier);
- if (tricky != undefined) {
- placingOptions.room.mapRoom(connectableRoom, tricky.trickyRoomDirection);
- placingOptions.map.map(placingOptions.room, tricky.x, tricky.y);
- return true;
- }
- }
- let connectableThroughFodder = (fodderStep, connectingRoom) => {
- let trickier = {
- region: placingOptions.region,
- map: placingOptions.map,
- otherRoom: connectingRoom
- };
- if (fodderStep == 0) {
- return placingOptions.room.getAnyDirection(trickier);
- }
- else {
- let newFodder = new (placingOptions.region.fodderRoomClass)();
- let preferredGrowthDirection = placingOptions.map.getPreferredGrowth();
- let directionShuffler = new ShufflerDirection(placingOptions.room.connectableOn, preferredGrowthDirection);
- for (let direction = directionShuffler.getDirection(); direction != undefined; direction = directionShuffler.getDirection()) {
- let oppositeDirection = OppositeDirection[Direction[direction]];
- let otherCoordinates = placingOptions.map.getCoordinates(connectingRoom);
- let wouldbeCoordinates = Room.shift(otherCoordinates, oppositeDirection);
- let fodderTricky = {
- otherRoom: connectingRoom,
- otherRoomDirection: oppositeDirection,
- trickyRoomDirection: direction,
- map: placingOptions.map,
- region: placingOptions.region,
- x: wouldbeCoordinates[0],
- y: wouldbeCoordinates[1]
- };
- if (newFodder.isPlaceable(fodderTricky)) {
- newFodder.mapRoom(connectingRoom, fodderTricky.trickyRoomDirection);
- placingOptions.map.map(newFodder, fodderTricky.x, fodderTricky.y);
- let nextTricky = connectableThroughFodder(fodderStep - 1, newFodder);
- if (nextTricky != undefined) {
- placingOptions.region.place(newFodder);
- return nextTricky;
- }
- else {
- newFodder.unmapRoom(fodderTricky.trickyRoomDirection);
- placingOptions.map.unmap(fodderTricky.x, fodderTricky.y);
- }
- }
- }
- }
- };
- for (let fodderLevel = 1; fodderLevel < 10; fodderLevel++) {
- roomShuffler.restart();
- for (let connectableRoom = roomShuffler.getOne(); connectableRoom != undefined; connectableRoom = roomShuffler.getOne()) {
- let tricky = connectableThroughFodder(fodderLevel, connectableRoom);
- if (tricky != undefined) {
- placingOptions.room.mapRoom(tricky.otherRoom, tricky.trickyRoomDirection);
- placingOptions.map.map(placingOptions.room, tricky.x, tricky.y);
- return true;
- }
- }
- }
- Elements.CurrentTurnHandler.printAsError("Unable to place room " + placingOptions.room.getPrintedName() + ": All attempts failed");
- return false;
- }
- });
- class SavedEvent extends StoredVariable {
- constructor(options) {
- super(options);
- this.description = options.description;
- this.getValueDescription = options.valueDescription;
- }
- getDescription() {
- return this.description;
- }
- }
- let EVENT_ORC_CHIEF_KILLED = new SavedEvent({
- id: "EVENT_ORC_CHIEF_KILLED",
- description: "Describer whether the orc chief is alive or dead.",
- value: false,
- valueDescription: (value) => {
- if (EVENT_ORC_CHIEF_KILLED.value) {
- return "The orc chief has been killed.";
- }
- else {
- return "The orc chief is alive.";
- }
- }
- });
- class Dice {
- constructor(testString) {
- this.range = [0, 0, 1, 1];
- this.minResult = 0;
- this.testString = testString;
- }
- roll(stat) {
- let rng = this.range.slice();
- if (stat >= 10) {
- rng.push(2, 1);
- }
- else if (stat >= 7) {
- rng.push(1, 1);
- }
- else if (stat >= 4) {
- rng.push(1);
- }
- let results = [];
- for (let i = 0; i < stat; i++) {
- let index = Math.floor(Math.random() * (rng.length));
- results.push(rng[index]);
- }
- return results;
- }
- static sum(a, b) {
- return a + b;
- }
- getSay(results) {
- let finalResult = results.reduce(Dice.sum);
- return new Say(new SayBold("[", this.testString, "] "), " = [", results.join("] ["), "]", results.length == 1 ? "" :
- (" = " + finalResult));
- }
- static testAgainstRoll(player, enemy) {
- let playerDice = new Dice(player.name);
- let playerResult = playerDice.roll(player.value);
- let enemyDice = new Dice(enemy.name);
- let enemyResult = enemyDice.roll(enemy.value);
- return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum);
- }
- static testAgainstDifficulty(player, difficulty) {
- let playerDice = new Dice(player.name);
- let playerResult = playerDice.roll(player.value);
- return playerResult.reduce(Dice.sum) - difficulty;
- }
- }
- class DiceCommon extends Dice {
- constructor() {
- super(...arguments);
- this.range = [-1, 0, 0, 0, 1, 1, 1];
- this.minResult = -1;
- }
- static testAgainstRoll(player, enemy) {
- let playerDice = new DiceCommon(player.name);
- let playerResult = playerDice.roll(player.value);
- let enemyDice = new DiceCommon(enemy.name);
- let enemyResult = enemyDice.roll(enemy.value);
- return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum);
- }
- static testAgainstDifficulty(player, difficulty) {
- let playerDice = new DiceCommon(player.name);
- let playerResult = playerDice.roll(player.value);
- return playerResult.reduce(Dice.sum) - difficulty;
- }
- }
- class DiceDangerous extends Dice {
- constructor() {
- super(...arguments);
- this.range = [-2, -1, 0, 0, 0, 0, 1, 1, 1, 1];
- this.minResult = -2;
- }
- static testAgainstRoll(player, enemy) {
- let playerDice = new DiceDangerous(player.name);
- let playerResult = playerDice.roll(player.value);
- let enemyDice = new DiceDangerous(enemy.name);
- let enemyResult = enemyDice.roll(enemy.value);
- return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum);
- }
- static testAgainstDifficulty(player, difficulty) {
- let playerDice = new DiceDangerous(player.name);
- let playerResult = playerDice.roll(player.value);
- return playerResult.reduce(Dice.sum) - difficulty;
- }
- }
- class Liquid extends Thing {
- constructor(options) {
- super(options);
- options = options == undefined ? {} : options;
- if (options.taste != undefined) {
- this.taste = options.taste;
- }
- else {
- this.taste = new OneOf(OneOf.ROTATING_RANDOM, "It goes easily through your throat with no particular taste.", "You taste nothing as it softly slides through your tongue.");
- }
- }
- static async mix(container) {
- let result = await Liquid.rulebookMixing.execute({ noun: container });
- if (result != undefined) {
- let finalQuantity = result.quantityMultiplier != undefined ?
- (result.quantityMultiplier * container.liquidContents.length)
- :
- (container.liquidContents.length);
- container.liquidContents = new Array(finalQuantity);
- for (let i = 0; i < finalQuantity; i++) {
- container.liquidContents[i] = result.result;
- }
- }
- }
- static getMixtures() {
- if (Liquid.sortedMixtures) {
- return Liquid.mixtures;
- }
- Liquid.mixtures.sort((a, b) => {
- if (b.firstPriority < a.firstPriority)
- return -1;
- if (a.firstPriority < b.firstPriority)
- return 1;
- if (b.priority < a.priority)
- return -1;
- if (a.priority < b.priority)
- return 1;
- return 0;
- });
- Liquid.sortedMixtures = true;
- return Liquid.mixtures;
- }
- static addMixture(mixture) {
- Liquid.mixtures.push(mixture);
- Liquid.sortedMixtures = false;
- }
- }
- Liquid.rulebookMixing = new Rulebook("Mixing the liquid contents of something");
- Liquid.mixtures = [];
- Liquid.sortedMixtures = false;
- Liquid.ruleDefaultMixing = Liquid.rulebookMixing.createAndAddRule({
- name: "Mixing through Mixtures",
- code: runner => {
- if (runner.noun.liquidContents.length == 0) {
- return;
- }
- let mixture;
- for (let i = 0; i < Liquid.mixtures.length; i++) {
- mixture = Liquid.mixtures[i];
- let proportions = [];
- let mixtureIterator = mixture.quantities.entries();
- for (let mixtureLiquid = mixtureIterator.next(); !mixtureLiquid.done; mixtureLiquid = mixtureIterator.next()) {
- let mixtureType = mixtureLiquid.value[0];
- let mixtureQuantity = mixtureLiquid.value[1];
- let matchedQuantity = 0;
- runner.noun.liquidContents.forEach((liquidType) => {
- try {
- if (liquidType == mixtureType ||
- (typeof mixtureType == "function" &&
- (liquidType instanceof mixtureType || mixtureType(liquidType)))) {
- matchedQuantity++;
- }
- }
- catch (e) { }
- });
- proportions.push(matchedQuantity / mixtureQuantity);
- }
- if (proportions.every(function (element, index, array) {
- return element === array[0];
- })) {
- return mixture;
- }
- }
- }
- });
- class Scenery extends Thing {
- constructor() {
- super(...arguments);
- this.fixedInPlace = true;
- this.scenery = true;
- }
- }
- class OrcDebugger extends Humanoid {
- constructor() {
- super({
- isMale: true,
- name: (() => {
- let nameMod = OrcDebugger.nameModifier.getOne();
- if (nameMod == undefined) {
- nameMod = (OrcDebugger.counter++).toString();
- }
- return nameMod + " Orc";
- })(),
- unique: true,
- description: "This is one extremely ugly fellow."
- });
- this.AI.wanderer = true;
- this.AI.picksShinies = true;
- }
- }
- OrcDebugger.nameModifier = new Shuffler([
- "Ugly", "Muscular", "Veiny", "Angry", "Sad", "Smart", "Agile", "Short", "Bulging", "Intense", "Smouldering"
- ]);
- OrcDebugger.counter = 1;
- ActionTalk.carry.createAndAddRule({
- name: "Talking to the orc",
- firstPriority: ActionTalk.PRIORITY_GLOBAL_DIALOGUE,
- priority: ActionTalk.PRIORITY_COMMON_DIALOGUE,
- conditions: (runner) => {
- return runner.noun.getNoun(0) instanceof OrcDebugger;
- },
- code: (runner) => {
- let orc = runner.noun.getNoun(0);
- let result = Dice.testAgainstRoll({ name: "Charm + 2", value: WorldState.player.getStat(Attributes.Charm) + 2 }, { name: "Orc's wits + 2", value: orc.getStat(Attributes.Intelligence) + 2 });
- if (result > 0) {
- Elements.CurrentTurnHandler.printAsContent(new Say("You win!"));
- }
- else {
- Elements.CurrentTurnHandler.printAsContent(new Say("You lose."));
- }
- return true;
- }
- });
- class Semen extends Liquid {
- constructor(cummer, options) {
- super(options);
- this.cummer = cummer;
- }
- }
- var rooma = new RoomRandom("Room A");
- rooma.description = new Say("You are inside a box of metal painted blue. Your head almost touches the ceiling, making the room look smaller than it really is.", Say.LINE_BREAK, new SayIf(() => {
- return Thing.InsideRoomRelation.getLeft(vase) == rooma || Thing.InsideRoomRelation.getLeft(urn) == rooma;
- }, " Still, there are some things thrown about."));
- PlayBegins.setStartingRoom(rooma);
- let paddedBra = new Clothing({ name: "Padded Bra", unique: true });
- paddedBra.breastPadding = 3;
- paddedBra.slots = [Humanoid.SLOT_BREASTS];
- let paddedUnderwear = new Clothing({ name: "Padded Underwear", unique: true });
- paddedUnderwear.crotchPadding = 15;
- paddedUnderwear.slots = [Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_CROTCH_FRONT];
- let player = WorldState.player;
- WorldState.player = player;
- var vase = new Thing({ name: "Vase" });
- vase.description = new Say("This is an ornamental vase that'd look very nice on your lap. Why? Who knows.");
- rooma.place(vase);
- let mapOfTest = new MapNote({ name: "Map of this Region",
- description: "This is a simple map showing all the rooms here.", unique: true });
- rooma.place(mapOfTest);
- let urn = new Thing({ unique: true, name: "Urn of Dreams", image: "image001" });
- urn.description = new Say("This appears to be a simple, black urn containing the ashes of your dreams.");
- rooma.place(urn);
- var roomb = new RoomRandom("Room B");
- roomb.place(vase);
- let frillyPouch = new CoinPouch({
- name: "Frilly Pouch",
- description: new Say("This is a very gay little pink pouch full of little hearts.")
- });
- frillyPouch.addCoins(502);
- rooma.place(frillyPouch);
- let bigSack = new CoinPouch({ name: "Big Sack" });
- bigSack.addCoins(100);
- rooma.place(bigSack);
- let region = new RegionRandom("Test Region");
- region.place(rooma, roomb);
- for (let i = 1; i < 6; i++) {
- let room = new RoomRandom("Room " + i.toString());
- region.place(room);
- if (Math.random() > 0.5) {
- }
- }
- mapOfTest.addRegion(region);
- let southestRoom = new RoomRandom("Southest Room");
- region.place(southestRoom);
- southestRoom.appearChance = 100;
- southestRoom.backgroundImage = "bloo";
- southestRoom.trickyCode = (options) => {
- let myCoordinates = [options.x, options.y];
- for (let i = 0; i < Room.DIRECTIONS.length; i++) {
- let direction = Room.DIRECTIONS[i];
- if (direction != Direction.NORTH) {
- let coordinates = Room.shift(myCoordinates, direction);
- if (!options.map.isFree(coordinates[0], coordinates[1])) {
- return false;
- }
- coordinates = Room.shift(coordinates, direction);
- if (!options.map.isFree(coordinates[0], coordinates[1])) {
- return false;
- }
- }
- }
- return true;
- };
- RegionRandom.rulebookAfterPlaceRoom.addRule(new Rule({
- name: "After placing the southest room",
- code: runner => {
- let options = runner.noun;
- let myCoordinates = options.map.getCoordinates(options.room);
- if (myCoordinates != undefined) {
- for (let i = 0; i < Room.DIRECTIONS.length; i++) {
- let direction = Room.DIRECTIONS[i];
- if (direction != Direction.NORTH) {
- let coordinates = Room.shift(myCoordinates, direction);
- options.map.block(coordinates[0], coordinates[1]);
- coordinates = Room.shift(coordinates, direction);
- options.map.block(coordinates[0], coordinates[1]);
- }
- }
- }
- },
- conditions: runner => {
- return runner.noun.room == southestRoom;
- }
- }));
- Thing.CarryRelation.setRelation(WorldState.player, mapOfTest);
- PlayBegins.rulebook.addRule(new Rule({
- name: "randomize region",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: async (runner) => {
- await region.randomize();
- }
- }));
- RegionRandom.rulebookRandomizeRegion.addRule(new Rule({
- name: "Add room A and B to region",
- firstPriority: Rule.PRIORITY_HIGHEST,
- code: async (runner) => {
- await RegionRandom.rulebookPlaceRoom.execute({
- noun: {
- map: region.map,
- room: rooma,
- region: region
- }
- }).then();
- await RegionRandom.rulebookPlaceRoom.execute({
- noun: {
- map: region.map,
- room: roomb,
- region: region
- }
- }).then();
- },
- conditions: runner => {
- return runner.noun == region;
- }
- }));
- function getPath(rooma, roomb) {
- console.debug("The best path from " + rooma.getPrintedName() + " to " + roomb.getPrintedName() + " is:");
- let t0, dir, t1;
- t0 = performance.now();
- dir = rooma.bestDirectionTo(roomb);
- t1 = performance.now();
- if (dir != undefined) {
- console.debug(DirectionNames[Direction[dir]]);
- }
- else {
- console.debug("There is no path.");
- }
- console.debug("Call to doSomething took " + (t1 - t0) + " milliseconds.");
- }
- let wanderRegion = new RegionRandom("OrcableRegion");
- wanderRegion.place(rooma, roomb);
- region.place(wanderRegion);
- let rooms = region.getRooms();
- let shuffler = new Shuffler(rooms);
- for (let i = 0; i < 0; i++) {
- AI.rules.createAndAddRule({
- name: "Pick Shinies",
- firstPriority: AIRules.PRIORITY_ACTING_ON_PLACE,
- conditions: (runner) => {
- let person = runner.noun;
- return person.AI.picksShinies;
- },
- code: (runner) => {
- let person = runner.noun;
- let room = person.getRoom();
- let visibleThings = room.getContainedAndVisibleTo(person);
- if (visibleThings.length > 0) {
- for (let i = 0; i < visibleThings.length; i++) {
- if (!visibleThings[i].fixedInPlace && visibleThings[i].getShiny()) {
- return new ActionTake(person, visibleThings[i]);
- }
- }
- }
- }
- });
- }
- let randomOrc;
- let randomOrc2;
- for (let i = 0; i < 10; i++) {
- let orc = new OrcDebugger();
- randomOrc = orc;
- if (randomOrc2 == undefined) {
- randomOrc2 = orc;
- }
- orc.AI.wanderer = true;
- orc.AI.picksShinies = true;
- orc.AI.wandersOn = wanderRegion;
- let room = new Shuffler(region.getRooms()).getOne();
- room.place(orc);
- }
- var fTarget = new ContentGroup();
- fTarget.addUnit(new FuckingUnit()
- .setFucked(WorldState.player)
- .setFucker(randomOrc)
- .setHole(WorldState.player.getPart(HumanoidVagina))
- .setStick(randomOrc.getPart(HumanoidPenis)));
- fTarget.addUnit(new FuckingUnit()
- .setFucked(WorldState.player)
- .setFucker(randomOrc2)
- .setHole(WorldState.player.getPart(HumanoidHead))
- .setStick(randomOrc2.getPart(HumanoidPenis)));
- let spitroast = (new FuckingDescription("Orc spitroast!"));
- spitroast.setDescription(new Say("Orc Spitroast!"))
- .addUnit()
- .setFucker(OrcDebugger)
- .setHole(HumanoidVagina)
- .setStick(HumanoidPenis);
- spitroast.addUnit()
- .setFucker(OrcDebugger)
- .setHole(HumanoidHead)
- .setStick(HumanoidPenis);
- (new FuckingDescription("Specific Orc in Vagina"))
- .setDescription(new Say("Specific Orc in Vagina."))
- .addUnit()
- .setFucker(randomOrc)
- .setHole(WorldState.player.getPart(HumanoidVagina))
- .setStick(randomOrc.getPart(HumanoidPenis));
- (new FuckingDescription("Specific Orc Starts Cumming in Vagina"))
- .setDescription(new Say("Specific Orc Starts Cumming in Vagina"))
- .addUnit()
- .setFucker(randomOrc)
- .setHole(WorldState.player.getPart(HumanoidVagina))
- .addMarker(FuckingState.CUM_START)
- .setStick(randomOrc.getPart(HumanoidPenis));
- (new FuckingDescription("Orc in mouth"))
- .setDescription(new Say("Orc in mouth."))
- .addUnit()
- .setFucker(OrcDebugger)
- .setHole(HumanoidHead)
- .setStick(HumanoidPenis);
- var DialogueTrees;
- (function (DialogueTrees) {
- DialogueTrees.CreationIntro = (function () {
- let tree = new DialogueTree("CreationIntro");
- let node;
- let text;
- let set;
- node = new DialogueNode("ae981322-9151-49c8-a889-94455db7c262");
- node.setNext("81582dea-ba27-4baa-8df2-a77fbb5ed9ef");
- tree.addStartNode(node);
- text = new DialogueText("f72bf099-bae2-49df-9433-c9c3ec6a020d");
- text.setSay(() => { return new Say("As you approach the Obelisk, many dreams and nightmares will become reality as it attempts to dissuade you from getting too close, with the intensity increasing the closer you get to your objective.", Say.PARAGRAPH_BREAK, "Ultimately, the Obelisk wishes you no harm, for it is better to have you around as a protector than as a dead enemy, so the Obelisk will attempt to give you exactly what you want deep in your heart, trying to make you completely satisfied so that you no longer wish for the Obelisk's destruction or become unable to continue your quest. Of course, what your heart wants is not necessarily what you think it wants.", Say.PARAGRAPH_BREAK, "Orcs, the most common creature to come out of the Obelisk, are nothing more than humans warped by their own desire for unbridled violence. What will the Obelisk do to you?", Say.PARAGRAPH_BREAK, "On the following screens, you will define who you will be in this story. Please confirm carefully, as there is no turning back."); });
- text.setNext("66d4b27a-ff40-4a8e-a749-2b5e8237695a");
- tree.addNode(text);
- set = new DialogueSet("81582dea-ba27-4baa-8df2-a77fbb5ed9ef");
- set.setFunction(() => { Elements.startMenu(); });
- set.setNext("f72bf099-bae2-49df-9433-c9c3ec6a020d");
- tree.addNode(set);
- set = new DialogueSet("0b4fec87-a2b0-4e3b-81ed-a4150f94fc10");
- set.setFunction(() => { Elements.endMenu(); });
- tree.addNode(set);
- set = new DialogueSet("66d4b27a-ff40-4a8e-a749-2b5e8237695a");
- set.setFunction(() => { return Elements.waitForAnyKey(); });
- set.setNext("0b4fec87-a2b0-4e3b-81ed-a4150f94fc10");
- tree.addNode(set);
- return tree;
- })();
- })(DialogueTrees || (DialogueTrees = {}));
- var CharacterCreation;
- (function (CharacterCreation) {
- CharacterCreation.CreationIntro = CharacterCreation.rulebook.createAndAddRule({
- name: "Show small Intro",
- firstPriority: Rule.PRIORITY_HIGHEST,
- priority: Rule.PRIORITY_HIGHEST,
- code: async () => {
- await DialogueTrees.CreationIntro.execute();
- }
- });
- })(CharacterCreation || (CharacterCreation = {}));
- var CharacterCreation;
- (function (CharacterCreation) {
- let ccDiv = document.createElement("div");
- ccDiv.id = "characterCreation";
- let rightSide = document.createElement("div");
- rightSide.id = "ccRight";
- let leftSide = document.createElement("div");
- leftSide.id = "ccLeft";
- ccDiv.appendChild(leftSide);
- ccDiv.appendChild(rightSide);
- let resolver;
- async function printTable() {
- printOrigin();
- while (leftSide.firstChild)
- leftSide.removeChild(leftSide.firstChild);
- await (new Say(new SayBold("Character Origin:")).getHTMLContent().then(eles => {
- eles.forEach(ele => {
- leftSide.appendChild(ele);
- });
- }));
- let origins = CharacterOrigin.getOrigins();
- for (let i = 0; i < origins.length; i++) {
- let origin = origins[i];
- let say = new Say(origin.name);
- if (origin.id == CharacterCreation.PlayerOrigin.value) {
- say.add(" - SELECTED");
- }
- await (say).getHTML("p", ["choice"]).then(elementArray => {
- Controls.Links.makeCustomLink(elementArray[0], {
- mouseover: () => {
- printOrigin(origin);
- },
- mouseout: () => {
- printOrigin();
- },
- click: () => {
- CharacterCreation.PlayerOrigin.value = origin.id;
- reset();
- }
- });
- Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
- leftSide.appendChild(elementArray[0]);
- });
- }
- }
- function printConfirm() {
- (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => {
- elementArray[0].addEventListener("click", () => {
- resolver();
- });
- Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
- Elements.CurrentTurnHandler.print(elementArray[0]);
- });
- }
- function printOrigin(origin) {
- if (origin == undefined) {
- origin = CharacterOrigin.getOrigin(CharacterCreation.PlayerOrigin.value);
- }
- let say = new Say(origin.description);
- if (origin.bonusStats != undefined) {
- say.add(Say.PARAGRAPH_BREAK, origin.bonusStats);
- }
- say.getHTMLContent().then((eles => {
- while (rightSide.firstChild)
- rightSide.removeChild(rightSide.firstChild);
- for (let i = 0; i < eles.length; i++) {
- rightSide.appendChild(eles[i]);
- }
- }));
- }
- function reset() {
- Elements.CurrentTurnHandler.clear();
- Elements.CurrentTurnHandler.print(ccDiv);
- printTable();
- Elements.CurrentTurnHandler.print(document.createElement("br"));
- Elements.CurrentTurnHandler.print(document.createElement("br"));
- printConfirm();
- }
- CharacterCreation.CCOrigin = CharacterCreation.rulebook.createAndAddRule({
- name: "Character Creation - Origin",
- firstPriority: Rule.PRIORITY_MEDIUM,
- priority: Rule.PRIORITY_HIGH,
- code: async () => {
- Elements.startMenu();
- let promise = new Promise(resolve => {
- resolver = resolve;
- });
- reset();
- await promise;
- CharacterCreation.getOrigin().confirmPicked();
- Elements.endMenu();
- }
- });
- })(CharacterCreation || (CharacterCreation = {}));
- var CharacterCreation;
- (function (CharacterCreation) {
- let ccDiv = document.createElement("div");
- ccDiv.id = "characterCreation";
- let rightSide = document.createElement("div");
- rightSide.id = "ccRight";
- let leftSide = document.createElement("div");
- leftSide.id = "ccLeft";
- ccDiv.appendChild(leftSide);
- ccDiv.appendChild(rightSide);
- let resolver;
- async function printTable() {
- while (leftSide.firstChild)
- leftSide.removeChild(leftSide.firstChild);
- await (new Say(new SayBold("Perks (Choose any):")).getHTMLContent().then(eles => {
- eles.forEach(ele => {
- leftSide.appendChild(ele);
- });
- }));
- let perks = Perk.getPerks();
- for (let i = 0; i < perks.length; i++) {
- let perk = perks[i];
- let say = new Say(perk.name);
- if (perk.isEnabled()) {
- if (perk.isForced()) {
- say.add(" (Mandatory)");
- }
- else {
- say.add(" - Selected");
- }
- }
- else if (perk.isForced()) {
- say.add(" (Forbidden)");
- }
- await (say).getHTML("p", ["choice"]).then(elementArray => {
- Controls.Links.makeCustomLink(elementArray[0], {
- mouseover: () => {
- printPerk(perk);
- },
- mouseout: () => {
- emptyPerk();
- },
- click: () => {
- if (!perk.isForced()) {
- perk.value = !perk.value;
- }
- reset();
- }
- });
- Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
- leftSide.appendChild(elementArray[0]);
- });
- }
- }
- function printConfirm() {
- (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => {
- elementArray[0].addEventListener("click", () => {
- resolver();
- });
- Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
- Elements.CurrentTurnHandler.print(elementArray[0]);
- });
- }
- function emptyPerk() {
- while (rightSide.firstChild)
- rightSide.removeChild(rightSide.firstChild);
- }
- function printPerk(perk) {
- let say = new Say(perk.description);
- say.getHTMLContent().then((eles => {
- emptyPerk();
- for (let i = 0; i < eles.length; i++) {
- rightSide.appendChild(eles[i]);
- }
- }));
- }
- function reset() {
- Perk.updatePerks();
- Elements.CurrentTurnHandler.clear();
- Elements.CurrentTurnHandler.print(ccDiv);
- printTable();
- Elements.CurrentTurnHandler.print(document.createElement("br"));
- Elements.CurrentTurnHandler.print(document.createElement("br"));
- printConfirm();
- }
- CharacterCreation.CCPerk = CharacterCreation.rulebook.createAndAddRule({
- name: "Character Creation - Origin",
- firstPriority: Rule.PRIORITY_LOW,
- priority: Rule.PRIORITY_HIGH,
- code: async () => {
- Elements.startMenu();
- let promise = new Promise(resolve => {
- resolver = resolve;
- });
- reset();
- await promise;
- let perks = Perk.getPerks();
- perks.forEach(perk => {
- if (perk.isEnabled()) {
- perk.confirmPicked();
- }
- });
- Elements.endMenu();
- }
- });
- })(CharacterCreation || (CharacterCreation = {}));
- var CharacterCreation;
- (function (CharacterCreation) {
- function createRange(options) {
- let valueNode = document.createTextNode(String(options.value));
- let div = document.createElement("div");
- div.classList.add("ccOption");
- if (options.topLabel != undefined) {
- let topLabel = document.createElement("div");
- topLabel.classList.add("ccOptionTopLabel");
- topLabel.appendChild(document.createTextNode(options.topLabel + ":"));
- div.appendChild(topLabel);
- }
- let label = document.createElement("div");
- if (options.showValue != false) {
- label.classList.add("rangeValue");
- if (options.label != undefined) {
- let b = document.createElement("b");
- b.appendChild(document.createTextNode(options.label + ": "));
- label.appendChild(b);
- }
- label.appendChild(valueNode);
- }
- let input = document.createElement("input");
- input.classList.add("ccRange");
- input.type = "range";
- input.min = options.minValue.toString();
- input.max = options.maxValue.toString();
- input.step = options.step.toString();
- input.value = options.value.toString();
- let onChange = () => {
- valueNode.nodeValue = input.value;
- options.onChange(Number(input.value), valueNode, input);
- };
- input.addEventListener("change", onChange);
- let leftButton = document.createElement("a");
- leftButton.classList.add("ccButton");
- leftButton.addEventListener("click", () => {
- input.value = String(Number(input.value) - options.step);
- onChange();
- });
- Controls.KeyHandler.applyCode(leftButton, Controls.KeyHandler.getFirstKeyCode());
- if (options.leftLabel != undefined) {
- leftButton.appendChild(document.createTextNode(options.leftLabel));
- }
- let rightButton = document.createElement("a");
- rightButton.classList.add("ccButton");
- rightButton.addEventListener("click", () => {
- input.value = String(Number(input.value) + options.step);
- onChange();
- });
- Controls.KeyHandler.applyCode(rightButton, Controls.KeyHandler.getFirstKeyCode());
- ;
- if (options.rightLabel != undefined) {
- rightButton.appendChild(document.createTextNode(options.rightLabel));
- }
- div.appendChild(leftButton);
- div.appendChild(input);
- div.appendChild(rightButton);
- div.appendChild(label);
- onChange();
- return div;
- }
- CharacterCreation.CCSexStats = CharacterCreation.rulebook.createAndAddRule({
- name: "Character Creation - Sex and Stats",
- firstPriority: Rule.PRIORITY_HIGH,
- priority: Rule.PRIORITY_HIGH,
- code: () => {
- Elements.startMenu();
- let ccDiv = document.createElement("div");
- ccDiv.id = "characterCreation";
- let ccLeft = document.createElement("div");
- ccLeft.id = "ccLeft";
- ccDiv.appendChild(ccLeft);
- let ccRight = document.createElement("div");
- ccRight.id = "ccRight";
- ccDiv.appendChild(ccRight);
- let onChange = () => {
- (new Say(WorldState.player.description)).getHTMLContent().then((value => {
- while (ccRight.firstChild)
- ccRight.removeChild(ccRight.firstChild);
- value.forEach(val => {
- ccRight.appendChild(val);
- });
- }));
- };
- ccLeft.appendChild(createRange({
- minValue: 0, maxValue: 1, step: 1, value: 0, leftLabel: "Male", rightLabel: "Female", topLabel: "Sex",
- onChange: (value, labelValue, input) => {
- labelValue.nodeValue = (value == 0 ? "Male" : "Female");
- WorldState.player.removeGenderedParts();
- if (value == 0) {
- WorldState.player.addMaleParts();
- }
- else {
- WorldState.player.addFemaleParts();
- }
- let otherInputs = ccDiv.getElementsByTagName("input");
- for (let i = 0; i < otherInputs.length; i++) {
- let otherInput = otherInputs[i];
- if (otherInput != input) {
- otherInput.dispatchEvent(new Event("change"));
- }
- }
- onChange();
- }
- }));
- ccLeft.appendChild(createRange({
- minValue: 0, maxValue: 4, step: 1, value: 2, leftLabel: "Masculine", rightLabel: "Feminine", topLabel: "Gender",
- onChange: (value, labelValue) => {
- let names = ["Masculine", "Somewhat masculine", "Androgynous", "Somewhat feminine", "Feminine"];
- labelValue.nodeValue = names[value];
- let player = WorldState.player;
- let intendedValue;
- if (player.isMale()) {
- let values = [10, 25, 50, 55, 60];
- intendedValue = values[value];
- }
- else {
- let values = [35, 40, 50, 65, 75];
- intendedValue = values[value];
- }
- WorldState.player.setGenderValue(intendedValue);
- WorldState.player.setStat(Attributes.GenderIdentity, intendedValue);
- onChange();
- }
- }));
- let statsHeader = document.createElement("div");
- ccLeft.appendChild(statsHeader);
- statsHeader.classList.add("ccHeader");
- statsHeader.appendChild(document.createTextNode("Stats ("));
- let maxStats = 12;
- let statsRemaining = document.createTextNode("4 points remaining");
- statsHeader.appendChild(statsRemaining);
- statsHeader.appendChild(document.createTextNode(")"));
- let setStat = (attr, value, input) => {
- player.setStat(attr, value);
- let remaining = maxStats
- - player.getStat(Attributes.Strength)
- - player.getStat(Attributes.Agility)
- - player.getStat(Attributes.Intelligence)
- - player.getStat(Attributes.Charm);
- if (remaining < 0) {
- value += remaining;
- remaining = 0;
- input.value = value.toString();
- input.dispatchEvent(new Event("change"));
- return;
- }
- statsRemaining.nodeValue = (remaining == 0 ? "Done" :
- remaining > 1 ? remaining.toString() + " points remaining" :
- remaining.toString() + " point remaining");
- };
- ccLeft.appendChild(createRange({
- minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Strength",
- onChange: (value, labelValue, input) => {
- setStat(Attributes.Strength, value, input);
- onChange();
- }
- }));
- ccLeft.appendChild(createRange({
- minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Agility",
- onChange: (value, labelValue, input) => {
- setStat(Attributes.Agility, value, input);
- onChange();
- }
- }));
- ccLeft.appendChild(createRange({
- minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Charm",
- onChange: (value, labelValue, input) => {
- setStat(Attributes.Charm, value, input);
- onChange();
- }
- }));
- ccLeft.appendChild(createRange({
- minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Intelligence",
- onChange: (value, labelValue, input) => {
- setStat(Attributes.Intelligence, value, input);
- onChange();
- }
- }));
- let creationDone = new Promise((resolve) => {
- (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => {
- elementArray[0].addEventListener("click", () => {
- Elements.endMenu();
- resolve();
- });
- Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
- Elements.CurrentTurnHandler.print(elementArray[0]);
- });
- });
- Elements.CurrentTurnHandler.print(ccDiv);
- return creationDone;
- }
- });
- })(CharacterCreation || (CharacterCreation = {}));
- var PlayBegins;
- (function (PlayBegins) {
- PlayBegins.LOAD_FAILED = false;
- PlayBegins.CONTINUE_FAILED = false;
- PlayBegins.IntroMenuRule = PlayBegins.rulebook.createAndAddRule({
- name: "Intro Menu Rule",
- firstPriority: Rule.PRIORITY_HIGHEST,
- priority: Rule.PRIORITY_HIGHEST,
- code: async (runner) => {
- await DialogueTrees.IntroMenu.execute();
- }
- });
- })(PlayBegins || (PlayBegins = {}));
- var DialogueTrees;
- (function (DialogueTrees) {
- DialogueTrees.IntroMenu = (function () {
- let tree = new DialogueTree("IntroMenu");
- let node;
- let choice;
- let text;
- let branch;
- let set;
- node = new DialogueNode("b018bb28-4efc-493b-ac37-31634c4e6406");
- node.setNext("f448e718-9d24-4191-9913-ccc36d97c4c0");
- tree.addStartNode(node);
- choice = new DialogueChoice("3b8c8bcb-0ac8-40dc-9f62-4abbde0d0f7f");
- choice.setSay(() => { return new Say("Start Game"); });
- choice.setNext("719e71dd-9989-4015-93af-9fb7096002c1");
- tree.addNode(choice);
- choice = new DialogueChoice("53710087-4002-41b7-b089-cadabedbcafd");
- choice.setSay(() => { return new Say("Load from file"); });
- choice.setNext("f25f6525-dad6-45d7-a391-246c1b02b569");
- tree.addNode(choice);
- choice = new DialogueChoice("b4593a36-ca83-4afc-b01b-e71344ca6e1f");
- choice.setSay(() => { return new Say("Settings"); });
- choice.setNext("d4a379b5-06c9-4fca-a25c-b1a31b6bf93d");
- tree.addNode(choice);
- choice = new DialogueChoice("4c5032a5-5509-4a00-b8c7-788e7ddbf17d");
- choice.setSay(() => { return new Say("About"); });
- choice.setNext("6b3f385b-8283-4635-9c73-e2303d77642d");
- tree.addNode(choice);
- node = new DialogueNode("674841a6-3752-4c81-977d-19e111536203");
- node.setName("2");
- node.setChoices(["3b8c8bcb-0ac8-40dc-9f62-4abbde0d0f7f", "53710087-4002-41b7-b089-cadabedbcafd", "4c5032a5-5509-4a00-b8c7-788e7ddbf17d", "b4593a36-ca83-4afc-b01b-e71344ca6e1f", "a55f46fa-98a9-4dff-9f1c-4f88c18ce8dd"]);
- tree.addNode(node);
- text = new DialogueText("bc32e411-3c54-4747-ad79-506fc5a9d6c9");
- text.setSay(() => { return new Say(Say.CENTERED, new SayImage("introLogo"), Say.LINE_BREAK, new SayItalic("The Obelisk is an adult interactive fiction game set in a post-apocalyptic world ravaged by a magical structure.")); });
- text.setNext("36da9ea6-909c-4c0c-94d1-a17fef44452d");
- tree.addNode(text);
- text = new DialogueText("36da9ea6-909c-4c0c-94d1-a17fef44452d");
- text.setSay(() => { return new Say("A sleek, black obelisk appeared, monsters pouring from it, threatening the world. Many tried to reach the obelisk, only to return changed - monstrous. Civilization was unable to cope with the creatures and humanity soon returned to its old, tribal ways, humans becoming rarer with each passing day. Centuries have passed and technology is now scarce, with people leading simpler lives in small settlements.", Say.PARAGRAPH_BREAK, "You were born in the ashes of the old world, living in isolation as you and your fellow men attempt to stay safe from the evils of The Obelisk. ", Say.PARAGRAPH_BREAK, "Now, fate has decided you must go, reach The Obelisk and destroy it. Will you succeed in stopping it, or will you lose yourself to all the changes it will bring to you?"); });
- text.setNext("674841a6-3752-4c81-977d-19e111536203");
- tree.addNode(text);
- node = new DialogueNode("9f11871f-eebd-4b9a-b3db-ed9be8cf78e7");
- node.setName("1");
- node.setNext("9eeb2100-917d-41fd-b756-6d3b80e92463");
- tree.addNode(node);
- branch = new DialogueBranch("5d1dfb86-abd9-4ad6-bf07-8ced5476e401");
- branch.setVariable(() => { return PlayBegins.LOAD_FAILED; });
- branch.addBranch("415dc32a-1549-429d-9ac4-8cd1b4c92c14", () => { return true; });
- branch.setNext("f82fc177-b4bd-4f06-b7ab-216259e056a5");
- tree.addNode(branch);
- set = new DialogueSet("f82fc177-b4bd-4f06-b7ab-216259e056a5");
- set.setFunction(() => { Elements.endMenu(); });
- tree.addNode(set);
- set = new DialogueSet("9eeb2100-917d-41fd-b756-6d3b80e92463");
- set.setFunction(() => { Elements.clearMainScreen(); });
- set.setNext("bc32e411-3c54-4747-ad79-506fc5a9d6c9");
- tree.addNode(set);
- node = new DialogueNode("415dc32a-1549-429d-9ac4-8cd1b4c92c14");
- node.setNext("1");
- tree.addNode(node);
- set = new DialogueSet("f448e718-9d24-4191-9913-ccc36d97c4c0");
- set.setFunction(() => { Elements.startMenu(); tree.setRepeatChoices(false); });
- set.setNext("9f11871f-eebd-4b9a-b3db-ed9be8cf78e7");
- tree.addNode(set);
- choice = new DialogueChoice("ef9253b9-5c24-46cc-8e2d-5562a1544f07");
- choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(0)); });
- choice.setNext("9594cf06-6062-4952-b378-6aedaafe2951");
- tree.addNode(choice);
- choice = new DialogueChoice("82c512c6-0115-4d72-a413-5728a623f04b");
- choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(1)); });
- choice.setNext("fe95cfb3-b9f5-4b12-83aa-94d26e5bcac0");
- tree.addNode(choice);
- choice = new DialogueChoice("7315835a-4d95-4377-828c-8a4ca7e49f87");
- choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(2)); });
- choice.setNext("dc884974-7bb2-436f-b3a4-cdf8550bd494");
- tree.addNode(choice);
- choice = new DialogueChoice("50afd6f8-87ce-49bf-b689-4819bc5dc8e7");
- choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(3)); });
- choice.setNext("62f5ea88-c6f0-4469-87f2-ea3b37638509");
- tree.addNode(choice);
- choice = new DialogueChoice("d79e9955-f81e-4ac9-8246-a02b0bd49dae");
- choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(4)); });
- choice.setNext("ee4ecd8b-59e2-43a6-8150-8a835d6eeae1");
- tree.addNode(choice);
- node = new DialogueNode("719e71dd-9989-4015-93af-9fb7096002c1");
- node.setName("SlotChoices");
- node.setChoices(["ef9253b9-5c24-46cc-8e2d-5562a1544f07", "82c512c6-0115-4d72-a413-5728a623f04b", "7315835a-4d95-4377-828c-8a4ca7e49f87", "50afd6f8-87ce-49bf-b689-4819bc5dc8e7", "d79e9955-f81e-4ac9-8246-a02b0bd49dae", "9483a087-04d0-48dd-884f-946930771b95", "defe0f4c-4452-40f3-aff1-ba076263fcbc"]);
- tree.addNode(node);
- set = new DialogueSet("9594cf06-6062-4952-b378-6aedaafe2951");
- set.setFunction(() => { SaveHandler.setSlot(0); });
- set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
- tree.addNode(set);
- set = new DialogueSet("fe95cfb3-b9f5-4b12-83aa-94d26e5bcac0");
- set.setFunction(() => { SaveHandler.setSlot(1); });
- set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
- tree.addNode(set);
- set = new DialogueSet("dc884974-7bb2-436f-b3a4-cdf8550bd494");
- set.setFunction(() => { SaveHandler.setSlot(2); });
- set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
- tree.addNode(set);
- set = new DialogueSet("62f5ea88-c6f0-4469-87f2-ea3b37638509");
- set.setFunction(() => { SaveHandler.setSlot(3); });
- set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
- tree.addNode(set);
- set = new DialogueSet("ee4ecd8b-59e2-43a6-8150-8a835d6eeae1");
- set.setFunction(() => { SaveHandler.setSlot(4); });
- set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
- tree.addNode(set);
- set = new DialogueSet("f25f6525-dad6-45d7-a391-246c1b02b569");
- set.setFunction(() => { return SaveHandler.loadFromFile(); });
- set.setNext("5d1dfb86-abd9-4ad6-bf07-8ced5476e401");
- tree.addNode(set);
- choice = new DialogueChoice("9483a087-04d0-48dd-884f-946930771b95");
- choice.setSay(() => { return new Say("Erase a save"); });
- choice.setConditions(() => { return !SaveHandler.isErasing(); });
- choice.setNext("ee65c84a-021f-44d3-aa34-50235f438c96");
- tree.addNode(choice);
- choice = new DialogueChoice("defe0f4c-4452-40f3-aff1-ba076263fcbc");
- choice.setSay(() => { return new Say("Don't erase my saves!"); });
- choice.setConditions(() => { return SaveHandler.isErasing(); });
- choice.setNext("ee65c84a-021f-44d3-aa34-50235f438c96");
- tree.addNode(choice);
- set = new DialogueSet("ee65c84a-021f-44d3-aa34-50235f438c96");
- set.setFunction(() => { SaveHandler.toggleErasing(); });
- set.setNext("6f15f7d6-4944-4b93-9d47-7046e8ae1f15");
- tree.addNode(set);
- node = new DialogueNode("6f15f7d6-4944-4b93-9d47-7046e8ae1f15");
- node.setNext("SlotChoices");
- tree.addNode(node);
- set = new DialogueSet("915492f1-8fa7-4ddc-9dc0-6b0340f738c8");
- set.setFunction(() => { return SaveHandler.loadFromStorage(); });
- set.setNext("f82fc177-b4bd-4f06-b7ab-216259e056a5");
- tree.addNode(set);
- node = new DialogueNode("d4a379b5-06c9-4fca-a25c-b1a31b6bf93d");
- node.setNext("Settings");
- tree.addNode(node);
- node = new DialogueNode("6b3f385b-8283-4635-9c73-e2303d77642d");
- node.setNext("About");
- tree.addNode(node);
- node = new DialogueNode("b75c038c-654c-4c62-8f49-2f4518f52cff");
- node.setName("Settings");
- node.setNext("d33456b8-72b6-4214-90b3-3eba2442b287");
- tree.addNode(node);
- text = new DialogueText("d33456b8-72b6-4214-90b3-3eba2442b287");
- text.setSay(() => { return new Say("Not implemented."); });
- text.setNext("bc24b446-d6a2-4284-93fb-67ad3598fcd1");
- tree.addNode(text);
- set = new DialogueSet("bc24b446-d6a2-4284-93fb-67ad3598fcd1");
- set.setFunction(() => { return Elements.waitForAnyKey(); });
- set.setNext("81f9d62b-907e-48ae-84fe-78c7cecc4fe3");
- tree.addNode(set);
- node = new DialogueNode("81f9d62b-907e-48ae-84fe-78c7cecc4fe3");
- node.setNext("1");
- tree.addNode(node);
- node = new DialogueNode("c342e112-5c73-4c82-8882-47ca3a71c914");
- node.setName("About");
- node.setNext("d33456b8-72b6-4214-90b3-3eba2442b287");
- tree.addNode(node);
- choice = new DialogueChoice("a55f46fa-98a9-4dff-9f1c-4f88c18ce8dd");
- choice.setSay(() => { return new Say("Note about content (Spoiler Alert)"); });
- choice.setNext("7c2060aa-66ce-4dbb-88d2-0c8f190e0a6c");
- tree.addNode(choice);
- text = new DialogueText("59a3cb30-d4ba-4b46-8157-b900fc7022dd");
- text.setSay(() => { return new Say(Say.CENTERED, new SayImage("introLogo"), Say.LINE_BREAK, new SayItalic("The Obelisk is an adult interactive fiction game set in a post-apocalyptic world ravaged by a magical structure.")); });
- text.setNext("1b8bdc9d-a4bf-40aa-a382-f7813c158840");
- tree.addNode(text);
- set = new DialogueSet("c27829b7-7199-4b1e-9334-536258546cfc");
- set.setFunction(() => { return Elements.waitForAnyKey(); });
- set.setNext("42401145-9154-40c3-a9d3-4f83df97b89e");
- tree.addNode(set);
- node = new DialogueNode("42401145-9154-40c3-a9d3-4f83df97b89e");
- node.setNext("1");
- tree.addNode(node);
- set = new DialogueSet("7c2060aa-66ce-4dbb-88d2-0c8f190e0a6c");
- set.setFunction(() => { Elements.clearMainScreen(); });
- set.setNext("59a3cb30-d4ba-4b46-8157-b900fc7022dd");
- tree.addNode(set);
- text = new DialogueText("1b8bdc9d-a4bf-40aa-a382-f7813c158840");
- text.setSay(() => { return new Say("In this story, the Obelisk will attempt to give the player exactly what the player wants, but that's not always what the player thinks they want. This is a pornographic game first and a roleplaying game second, which means that it is assumed that the player character wants sex - even if they don't act like it.", Say.PARAGRAPH_BREAK, "Therefore, this game will \"fit\" for players who go in with that mentality, but it ", new SayBold("will"), " look differently for players with a different point of view for their characters. While roleplaying is encouraged, that is not how the game was written, so if you're playing it that way, it's just your choice.", Say.PARAGRAPH_BREAK, "There is no sex without explicit consent from the NPCs: implicit consent is only used for the player character, because that's part of the story. It is possible to remove the player's consent, thereby having no unwanted sex scenes occur, by setting up the content options, which will disable content without explicit consent (i.e. disabling M/M Sex Scenes means this kind of thing will only happen if you actively ask an NPC for it).", Say.PARAGRAPH_BREAK, "While the content options are there to tailor your experience, the game is made with \"all content is available\" in mind, which might result in a playthrough that's not much fun if you disable too many things. Still, that's your choice. Game on."); });
- text.setNext("c27829b7-7199-4b1e-9334-536258546cfc");
- tree.addNode(text);
- branch = new DialogueBranch("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
- branch.setVariable(() => { return SaveHandler.isVirgin(); });
- branch.addBranch("d0dcd7c6-26ae-41d0-99a6-e0cae17ae381", () => { return true; });
- branch.setNext("915492f1-8fa7-4ddc-9dc0-6b0340f738c8");
- tree.addNode(branch);
- text = new DialogueText("b8ee6702-8d38-4bd7-9b24-df8c901a50d4");
- text.setSay(() => { return new Say(new SayBold("A note on saves: "), "The selected slot will be saved to browser storage, so it will be deleted if the browser ever decides to delete it. The game will write to that save slot every turn, so you don't need to worry about that. Alternatively, you can manually save in-game, which will save to a file."); });
- text.setNext("50876e13-23b9-43c0-b6b1-a89b1683d5e7");
- tree.addNode(text);
- set = new DialogueSet("50876e13-23b9-43c0-b6b1-a89b1683d5e7");
- set.setFunction(() => { return Elements.waitForAnyKey(); });
- set.setNext("915492f1-8fa7-4ddc-9dc0-6b0340f738c8");
- tree.addNode(set);
- set = new DialogueSet("d0dcd7c6-26ae-41d0-99a6-e0cae17ae381");
- set.setFunction(() => { Elements.clearMainScreen(); });
- set.setNext("b8ee6702-8d38-4bd7-9b24-df8c901a50d4");
- tree.addNode(set);
- return tree;
- })();
- })(DialogueTrees || (DialogueTrees = {}));
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwbGljYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9hcHAvRnVuY3Rpb25zLnRzIiwiLi4vYXBwL1dvcmxkL0NsYXNzZXMvU2F2ZS9TdG9yZWRWYXJpYWJsZS50cyIsIi4uL2FwcC9Xb3JsZC9DbGFzc2VzL1J1bGVib29rLnRzIiwiLi4vYXBwL1dvcmxkL1NldHRpbmdzLnRzIiwiLi4vYXBwL1dvcmxkL0NsYXNzZXMvUnVsZS50cyIsIi4uL2FwcC9Xb3JsZC9UdXJuU2VxdWVu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GVib29rPFQ+Pikge1xyXG4gICAgICAgIHJ1bGVib29rcyA9IGFycmF5VW5pcXVlTmV3QXJyYXkocnVsZWJvb2tzKTtcclxuICAgICAgICBydWxlYm9va3MuZm9yRWFjaCgocnVsZWJvb2spID0+IHtcclxuICAgICAgICAgICAgdGhpcy5hZGRSdWxlcyguLi5ydWxlYm9vay5ydWxlcyk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFkZFJ1bGVzICguLi5ydWxlcykge1xyXG4gICAgICAgIGlmICh0aGlzLnJ1bGVSdW5uZXIgPCAwKSB7XHJcbiAgICAgICAgICAgIHRoaXMucnVsZXNUb0V4ZWN1dGUucHVzaCguLi5ydWxlcyk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBza2lwUnVsZSAocnVsZSA6IFJ1bGUpIHtcclxuICAgICAgICBpZiAodGhpcy5ydWxlUnVubmVyID49IDApIHtcclxuICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5ydWxlc1RvRXhlY3V0ZS5pbmRleE9mKHJ1bGUpO1xyXG4gICAgICAgICAgICBpZiAoaW5kZXggPiB0aGlzLnJ1bGVSdW5uZXIpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMucnVsZXNUb0V4ZWN1dGUuc3BsaWNlKGluZGV4LCAxKTtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUuZGVidWcoXCJbUnVsZWJvb2tdXCIgKyB0aGlzLnJ1bGVib29rLm5hbWUgKyBcIiwgc2tpcHBpbmcgUnVsZSBcIiArIHJ1bGUubmFtZSArIFwiIGR1ZSB0byByZXF1ZXN0LlwiKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIltSdWxlYm9va11cIiArIHRoaXMucnVsZWJvb2submFtZSArIFwiOiB1bmFtZSB0byBza2lwIFJ1bGVcIiArIHJ1bGUubmFtZSArIFwi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Y3Rpb25zID0gW107XHJcblxyXG4gICAgZXhwb3J0IGxldCBsYXN0VHVyblRpbWUgOiBudW1iZXIgPSAwO1xyXG5cclxuICAgIGV4cG9ydCBhc3luYyBmdW5jdGlvbiBleGVjdXRlIChhY3Rpb24/IDogQWN0aW9uKSB7XHJcbiAgICAgICAgLy8gT25seSBvbmUgYWN0aW9uIGF0IGEgdGltZVxyXG4gICAgICAgIGlmIChwbGF5ZXJBY3Rpb25zLnB1c2goYWN0aW9uKSA9PSAxKSB7XHJcbiAgICAgICAgICAgIGxldCB0MCA9IHBlcmZvcm1hbmNlLm5vdygpO1xyXG4gICAgICAgICAgICBjb25zb2xlLmRlYnVnKFJ1bGVib29rLmdldEluZGVudGF0aW9uKCkgKyBcIiAgIFBsYXllciBBY3Rpb246IFwiICsgKGFjdGlvbiA/IGFjdGlvbi5nZXRDb21tYW5kVGV4dCgpIDogXCJub25lXCIpKTtcclxuICAgICAgICAgICAgYXdhaXQgcnVsZWJvb2suZXhlY3V0ZSh7XHJcbiAgICAgICAgICAgICAgICBub3VuOiBhY3Rpb25cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICBwbGF5ZXJBY3Rpb25zID0gW107XHJcbiAgICAgICAgICAgIGxldCB0MSA9IHBlcmZvcm1hbmNlLm5vdygpO1xyXG4gICAgICAgICAgICBsYXN0VHVyblRpbWUgPSB0MSAtIHQwO1xyXG4gICAgICAgICAgICBjb25zb2xlLmRlYnVnKFwiVG90YWw6IFwiICsgKHQxIC0gdDApICsgXCIgbWlsbGlzZWNvbmRzLlwiKTtcclxuICAgICAgICAgICAgaWYgKFNldHRpbmdzLnNheVR1cm5UaW1lKSB7XHJcbiAgICAgICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnRBc0NvbnRlbnQobmV3IFNheShuZXcgU2F5Qm9sZChcIlRpbWUgdGFrZW4gZm9yIHR1cm46IFwiKSwgKHQxIC0gdDApLCBcIiBtaWxsaXN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B7UnVsZX1cclxuICAgICAqL1xyXG4gICAgZXhwb3J0IGxldCBQbGF5ZXJBY3Rpb25SdWxlID0gbmV3IFJ1bGUoe1xyXG4gICAgICAgIGZpcnN0UHJpb3JpdHk6IFJ1bGUuUFJJT1JJVFlfSElHSCxcclxuICAgICAgICBwcmlvcml0eTogUnVsZS5QUklPUklUWV9NRURJVU0sXHJcbiAgICAgICAgbmFtZTogXCJEbyBQbGF5ZXIgQWN0aW9uXCIsXHJcbiAgICAgICAgY29kZTogYXN5bmMgKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgcGxheWVyQWN0aW9uID0gPEFjdGlvbj4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgaWYgKHBsYXllckFjdGlvbiAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCBwcm9taXNlID0gcGxheWVyQWN0aW9uLmV4ZWN1dGUoKTtcclxuXHJcbiAgICAgICAgICAgICAgICBhd2FpdCBwcm9taXNlO1xyXG5cclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzQ29udGVudChwbGF5ZXJBY3Rpb24uc2F5KTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAocGxheWVyQWN0aW9uLnJlcXVpcmVzVHVybikge1xyXG4gICAgICAgICAgICAgICAgICAgIFdvcmxkU3RhdGUuaW5jcmVtZW50UGxheWVyVHVybigpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbiAgICBydWxlYm9vay5hZGRSdWxlKFBsYXllckFjdGlvblJ1bGUpO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogVGhpcyBpcyB0aGUgUnVuIEV2ZXJ5IFR1cm4gUnVsZXMuXHJcbiAgICAgKiBAdHlwZSB7UnVsZX1cclxuICAgICA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QncyB0aGUgdmVyeSBsYXN0IG9yIG5vdFxyXG4gICAgICAgIG5hbWU6IFwiRW5kIFR1cm4gKEVsZW1lbnRzL0NvbnRyb2xzIFNpZGUpXCIsXHJcbiAgICAgICAgY29kZTogYXN5bmMgZnVuY3Rpb24gKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uPikge1xyXG4gICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIuZW5kVHVybigpO1xyXG5cclxuICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5yZXNldCgpO1xyXG5cclxuICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5oeXBlcmxpbmtDb21tb25BY3Rpb25zKCk7XHJcbiAgICAgICAgICAgIGF3YWl0IEVsZW1lbnRzLlJvb21IYW5kbGVyLnVwZGF0ZVJvb20oKTtcclxuICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuUmVtZW1iZXJlZEhhbmRsZXIudXBkYXRlTWFwKCk7XHJcblxyXG4gICAgICAgICAgICBsZXQgcGxheWVyQWN0aW9uID0gPEFjdGlvbj4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgaWYgKHBsYXllckFjdGlvbikge1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5oeXBlcmxpbmtPYmplY3QocGxheWVyQWN0aW9uLmdldE5vdW4oMCkpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5oeXBlcmxpbmtPYmplY3QoKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuSW52ZW50b3J5SGFuZGxlci51cGRhdGVJbnZlbnRvcnkoKTtcclxuICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuQXBw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TtcclxuICAgIGxldCB2aXJnaW4gPSBuZXcgU3RvcmVkTWVtb3J5KFwiRmlyc3QgdGltZSBzYXZpbmdcIiwgdHJ1ZSk7XHJcblxyXG4gICAgZXhwb3J0IGxldCBBZnRlckxvYWQgPSBuZXcgUnVsZWJvb2s8U2F2ZVN0cnVjdHVyZT4oXCJBZnRlciBsb2FkaW5nXCIpO1xyXG5cclxuICAgIGV4cG9ydCBhc3luYyBmdW5jdGlvbiByZWFkRmlsZSAoKSA6IFByb21pc2U8c3RyaW5nPiB7XHJcbiAgICAgICAgbGV0IGVsZW1lbnQgPSA8SFRNTElucHV0RWxlbWVudD4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImlucHV0XCIpO1xyXG4gICAgICAgIGVsZW1lbnQudHlwZSA9IFwiZmlsZVwiO1xyXG4gICAgICAgIGVsZW1lbnQuYWNjZXB0ID0gXCIuXCIgKyBzYXZlRXh0ZW5zaW9uO1xyXG5cclxuICAgICAgICBsZXQgcHJvbWlzZSA6IFByb21pc2U8c3RyaW5nPiA9IG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICAgICAgZWxlbWVudC5vbmNoYW5nZSA9ICgpID0+IHtcclxuICAgICAgICAgICAgICAgIGlmIChlbGVtZW50LmZpbGVzLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh1bmRlZmluZWQpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZnIgPSBuZXcgRmlsZVJlYWRlcigpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBmci5vbmxvYWQgPSAoZXYpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShldi50YXJnZXRbJ3Jlc3VsdCddKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGZyLnJlYWRBc1R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1xyXG4gICAgICAgICAgICAgICAgaXRlbSA9IGl0ZW1zWzBdO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChpdGVtID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgbGV0IGVycm9yID0gdGhpbmcuTmFtZSArIFwiIG5vIGxvbmdlciBleGlzdHMuXCI7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiW1NhdmVIYW5kbGVyXSBcIiArIGVycm9yKTtcclxuICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKGVycm9yKVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGl0ZW0gPSBpdGVtLmNsb25lKHRydWUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGl0ZW0uc2V0Q2hhbmdlcyh0aGluZy5DaGFuZ2VzKTtcclxuICAgICAgICByZXR1cm4gaXRlbTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gbG9hZEdhbWUgKHNhdmVTdHJ1YyA6IFNhdmVTdHJ1Y3R1cmUpIHtcclxuICAgICAgICAvLyBpbnRlcmZhY2UgU2F2ZVN0cnVjdHVyZSB7XHJcbiAgICAgICAgLy8gICAgIFZhcmlhYmxlcyA6IHtbaWQgOiBzdHJpbmddIDogYW55fTtcclxuICAgICAgICAvLyAgICAgV2llbGRlZCA6IEFycmF5PFNhdmVkVGhpbmc+O1xyXG4gICAgICAgIC8vICAgICBXb3JuIDogQXJyYXk8U2F2ZWRUaGluZz47XHJcbiAgICAgICAgLy8gICAgIENhcnJpZWQgOiBBcnJheTxTYXZlZFRoaW5nPjtcclxuICAgICAgICAvLyAgICAgUGxheWVyIDogU2F2ZWRQbGF5ZXI7XHJcbiAgICAgICAgLy8gICAgIFJvdW5kcyA6IG51bWJlcjtcclxuICA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wgbmV3IFNheUJvbGQoXCJQcmVzcyBhbnkga2V5IHRvIHJldHVybi5cIikpO1xyXG4gICAgICAgIGxldCBzYXlFbGVtZW50cyA9IGF3YWl0IEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5nZXRTYXlFbGVtZW50c0FzQ29udGVudChzYXkpO1xyXG4gICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludCguLi5zYXlFbGVtZW50cyk7XHJcblxyXG4gICAgICAgIGxldCBuZXh0S2V5ID0gQ29udHJvbHMuS2V5SGFuZGxlci5nZXROZXh0S2V5KCk7XHJcblxyXG4gICAgICAgIHByb21pc2UudGhlbigoZmlsZSkgPT4ge1xyXG4gICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLnN0b3BHaXZpbmdOZXh0S2V5KG5leHRLZXkpO1xyXG4gICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIudW5wcmludCguLi5zYXlFbGVtZW50cyk7XHJcbiAgICAgICAgICAgIGxvYWRHYW1lKGdldEZyb21GaWxlKGZpbGUpKTsgLy8gSWYgbm8gZmlsZSB3YXMgY2hvc2VuIHRoZW4gY2hhbmdlIGlzbid0IHRyaWdnZXJlZCwgc28gaXQncyBuZXZlciB1bmRlZmluZWQuLi5cclxuICAgICAgICAgICAgZmluaXNoZWRBbnkoKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgbmV4dEtleS50aGVuKChrZXlDb2RlIDogS2V5Q29kZSkgPT4ge1xyXG4gICAgICAgICAgICBQbGF5QmVnaW5zLkxPQURfRkFJTEVEID0gdHJ1ZTtcclxuICAgICAgICAgICAgZmluaXNoZWRBbnkoKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgYXdhaXQgcmVhbFByb21pc2U7XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIGdldFNheUZvclNsb3QgKHNsb3ROdW1iZXIgOiBud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B8IHN0cmluZykgPSBcIlVuZGVmaW5lZFwiO1xyXG4gICAgcHVibGljIG5hbWUgOiBzdHJpbmc7XHJcbiAgICBwdWJsaWMgY29uZmlybVBpY2tlZCA6ICgoKSA9PiB2b2lkKSA9ICgpID0+IHt9O1xyXG5cclxuICAgIGNvbnN0cnVjdG9yIChpZCA6IHN0cmluZykge1xyXG4gICAgICAgIHN1cGVyKHtcclxuICAgICAgICAgICAgaWQgOiBcIlBlcmtfXCIgKyBpZCxcclxuICAgICAgICAgICAgdmFsdWUgOiBmYWxzZVxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIHRoaXMubmFtZSA9IGlkO1xyXG5cclxuICAgICAgICBQZXJrLnN0b3JlUGVyayh0aGlzKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgaXNFbmFibGVkICh2YWx1ZU9ubHk/IDogYm9vbGVhbikgOiBib29sZWFuIHtcclxuICAgICAgICBpZiAodmFsdWVPbmx5ICE9IHRydWUpIHtcclxuICAgICAgICAgICAgbGV0IGZvcmNlZCA9IHRoaXMuZm9yY2VkU3RhdHVzKHRoaXMpO1xyXG4gICAgICAgICAgICBpZiAoZm9yY2VkICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIDxib29sZWFuPiBmb3JjZWQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHRoaXMudmFsdWU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzRm9yY2VkICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5mb3JjZWRTdGF0dXModGhpcykgIT0gdW5kZWZpbmVkO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXREZXNjcmlwdGlvbiAoKSB7XHJcbiAgICAgICAgaWYgKHR5cGVvZiB0aGlzLmRlc2NyaXB0aW9uID09IFwiZnVuY3Rpb25cIikge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kZXNjcmlwdGlvbih0aGlzKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kZXNjcmlwdGlvbjtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBwZXJrcyA6IHtbaWQgOiBzdHJpbmddIDogUGVya30gPSB7fTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHN0b3JlUGVyayAocGVyayA6IFBlcmspIHtcclxuICAgICAgICBQZXJrLnBlcmtzW3BlcmsuaWRdID0gcGVyaztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldFBlcmsgKGlkIDogc3RyaW5nKSB7XHJcbiAgICAgICAgcmV0dXJuIFBlcmsucGVya3NbaWRdO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgZ2V0UGVya3MgKCkgOiBBcnJheTxQZXJrPiB7XHJcbiAgICAgICAgbGV0IHBlcmtzID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgaWQgaW4gUGVyay5wZXJrcykge1xyXG4gICAgICAgICAgICBwZXJrcy5wdXNoKFBlcmsucGVya3NbaWRdKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcGVya3Muc29ydCgoYSA6IFBlcmssIGIgOiBQZXJrKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBuYSA9IGEubmFtZS50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgICAgICBsZXQgbmIgPSBiLm5hbWUudG9VcHBlckNhc2UoKTtcclxuICAgICAgICAgICAgaWYgKG5hIDwgbmIpIHJldHVybiAtMTtcclxuICAgICAgICAgICAgaWYgKG5hID4gbmIpIHJldHVybiAxO1xyXG4gICAgICAgICAgICByZXR1cm4gMDtcclxuICAgICAgICB9KTtcclxuICAgICAgICByZXR1cm4gcGVya3M7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyB1cGRhdGVQZXJrcygpIH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UgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIm1haW5QYWdlXCIpO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogQWRkcyB0aGUgYmx1ciBlZmZlY3QgdG8gdGhlIHNjcmVlblxyXG4gICAgICovXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gc3RhcnRUdXJuICgpIHtcclxuICAgICAgICBtYWluUGFnZS5jbGFzc0xpc3QuYWRkKFwidHVyblwiKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJlbW92ZSB0aGUgYmx1ciBlZmZlY3QgZnJvbSB0aGUgc2NyZWVuXHJcbiAgICAgKi9cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBlbmRUdXJuICgpIHtcclxuICAgICAgICBtYWluUGFnZS5jbGFzc0xpc3QucmVtb3ZlKFwidHVyblwiKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIEFyZSB3ZSBjdXJyZW50bHkgaW4gYSB0dXJuP1xyXG4gICAgICogQHJldHVybnMge2Jvb2xlYW59XHJcbiAgICAgKi9cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBpc0luVHVybiAoKSB7XHJcbiAgICAgICAgcmV0dXJuIG1haW5QYWdlLmNsYXNzTGlzdC5jb250YWlucyhcInR1cm5cIik7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIGxldCBtZW51T3V0c2lkZW9mVHVybiA9IGZhbHNlO1xyXG4gICAgbGV0IG1lbnVzID0gMDtcclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gc3RhcnRNZW51ICgpIHtcclxuICAgICAgICBpZiAoIWlzSW5UdXJuKCkpIHtcclxuICAgICAgICAgICAgbWVudU91dHNpZGVvZlR1cm4gPSB0cnVlO1xyXG4gICAgICAgICAgICBzdGFydFR1cm4oKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgbWFpblBhZ2UuY2xhc3NMaXN0LmFkZChcIm1haW5tZW51XCIpO1xyXG4gICAgICA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U7XHJcbiAgICAgICAgICAgIGV2Q29kZSA9IFwiQWxcIiArIGV2Q29kZTtcclxuICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gPSBcIkFcIiArIHJlcHJlc2VudGF0aW9uO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoZXYuY3RybEtleSkge1xyXG4gICAgICAgICAgICBuYW1lID0gXCJDb250cm9sICsgXCIgKyBuYW1lO1xyXG4gICAgICAgICAgICBldkNvZGUgPSBcIkN0XCIgKyBldkNvZGU7XHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uID0gXCJDXCIgKyByZXByZXNlbnRhdGlvbjtcclxuICAgICAgICB9XHJcbiAgICAgICAgbGV0IGtleUNvZGUgOiBLZXlDb2RlID0gIHtcclxuICAgICAgICAgICAgZXZDb2RlIDogZXZDb2RlLFxyXG4gICAgICAgICAgICBuYW1lIDogbmFtZSxcclxuICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gOiByZXByZXNlbnRhdGlvblxyXG4gICAgICAgIH07XHJcbiAgICAgICAgcmV0dXJuIGtleUNvZGU7XHJcbiAgICB9XHJcblxyXG4gICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoXCJtb3VzZWRvd25cIiwgZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgbGV0IGtleUNvZGUgOiBLZXlDb2RlID0ge1xyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiQ2xpY2tcIixcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJDbGlja1wiLFxyXG4gICAgICAgICAgICBuYW1lIDogXCJDbGlja1wiXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IHByb21pc2UgPSBwcm9taXNlU3RhY2suc2hpZnQoKTtcclxuICAgICAgICBpZiAocHJvbWlzZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgcHJvbWlzZShrZXlDb2RlKTtcclxuICAgICAgICAgICAgcHJvbWlzZU9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biAgICAgICAgICAgICAgICBTYXlJbWFnZS5pbWFnZVZpZXdlci5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgaW1hZ2VzID0gRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLmN1cnJlbnRUdXJuVGFiLmdldEVsZW1lbnRzQnlDbGFzc05hbWUoXCJjb250ZW50SW1hZ2VcIik7XHJcbiAgICAgICAgICAgICAgICBpZiAoaW1hZ2VzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAoPEhUTUxFbGVtZW50PiBpbWFnZXNbaW1hZ2VzLmxlbmd0aCAtIDFdKS5jbGljaygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGxldCBlbGU7XHJcblxyXG4gICAgICAgIEVsZW1lbnRzLmdldExpbmtFbGVtZW50cygpLnNvbWUoKGVsZW1lbnQgOiBIVE1MRWxlbWVudCkgPT4ge1xyXG4gICAgICAgICAgICBsZXQga2V5YWJsZXMgPSBlbGVtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoXCJrZXlhYmxlXCIpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGtleWFibGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoKDxIVE1MRWxlbWVudD4ga2V5YWJsZXNbaV0pLmRhdGFzZXRbJ3Nob3J0Y3V0Y29kZSddID09IGtleUNvZGUuZXZDb2RlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZWxlID0ga2V5YWJsZXNbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBpZiAoZWxlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBlbGUuY2xpY2soKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gY3JlYXRlS2V5Q29kZXMgKGNvZGVzIDogQXJyYXk8c3RyaW5nPiwga2V5cyA6IEFycmF5PHN0cmluZz4sIG1vZHM/IDogQXJyYXk8Ym9vbGVhbj4pIHtcclxuICAgICAgICBsZXQgYXJyID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgbW9kID0gMDsgbW9kIDwgNDsgbW9kKyspIHtcclxuICAgICAgICAgICAgaWYgKG1vZCA9PSAwIHx8IG1vZHNbbW9kXSA9PSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvZGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBrZXlzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXByZXNlbnRhdGlvbiA9IGtleXNbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGV2Q29kZSA9IGNvZGVzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2QgPT0gMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gXCJTaGlmdCArIFwiICsgbmFtZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZDb2RlID0gXCJTaFwiICsgZXZDb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXByZXNlbnRhdGlvbiA9IFwiU1wiICsgcmVwcmVzZW50YXRpb247XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2QgPT0gMikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gXCJBbHQgKyBcIiArIG5hbWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2Q29kZSA9IFwiQWxcIiArIGV2Q29kZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gPSBcIkFcIiArIHJlcHJlc2VudGF0aW9uO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAobW9kID09IDMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSA9IFwiQ29udHJvbCArIFwiICsgbmFtZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZDb2RlID0gXCJDdFwiICsgZXZDb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXByZXNlbnRhdGlvbiA9IFwiQ1wiICsgcmVwcmVzZW50YXRpb247XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBrZXlDb2RlOiBLZXlDb2RlID0ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBldkNvZGU6IGV2Q29kZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVwcmVzZW50YXRpb246IHJlcHJlc2VudGF0aW9uLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lIDogbmFtZVxyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgYXJyLnB1c2goa2V5Q29kZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGFycjtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgdmFyIHNjcm9sbEtleUNvZGUgPSBuZXcgU3RvcmVkTWVtb3J5KFwic2Nyb2xsS2V5Q29kZVwiLCA8S2V5Q29kZT4ge1xyXG4gICAgICAgIGV2Q29kZSA6IFwiU3BhY2VcIixcclxuICAgICAgICByZXByZXNlbnRhdGlvbiA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ZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVXZXN0XCIsXHJcbiAgICAgICAgPEtleUNvZGU+IHtcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJLZXlaXCIsXHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uIDogXCJaXCJcclxuICAgICAgICB9XHJcbiAgICApO1xyXG5cclxuICAgIGV4cG9ydCB2YXIga2V5Q29kZVVwID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVVcFwiLFxyXG4gICAgICAgIDxLZXlDb2RlPiB7XHJcbiAgICAgICAgICAgIGV2Q29kZSA6IFwiS2V5QVwiLFxyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiQVwiXHJcbiAgICAgICAgfVxyXG4gICAgKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIGtleUNvZGVEb3duID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVEb3duXCIsXHJcbiAgICAgICAgPEtleUNvZGU+IHtcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJLZXlEXCIsXHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uIDogXCJEXCJcclxuICAgICAgICB9XHJcbiAgICApO1xyXG5cclxuICAgIC8vIFRPRE86IE1ha2UgdGhpcyBzYWZlciBieSBjcmVhdGluZyBpdCB1c2luZyBSb29tLkRJUkVDVElPTlMuXHJcbiAgICB2YXIgZGlyZWN0aW9uQ29kZUJ5SW5kZXggPSBba2V5Q29kZU5vcnRoLCB1bmRlZmluZWQsIGtleUNvZGVFYXN0LCB1bmRlZmluZWQsXHJcbiAgICAgICAga2V5Q29kZVNvdXRoLCB1bmRlZmluZWQsIGtleUNvZGVXZXN0LCB1bmRlZmluZWQsIGtleUNvZGVVcCwga2V5Q29kZURvd25dO1xyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBnZXREaXJlY3Rpb25Db2RlIChkaXJlY3Rpb24gOiBEaX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zZW4gPSBhdmFpbGFibGUyLmxlbmd0aCA+IDAgPyBhdmFpbGFibGUyIDpcclxuICAgICAgICAgICAgYXZhaWxhYmxlMy5sZW5ndGggPiAwID8gYXZhaWxhYmxlMyA6IHVuZGVmaW5lZDtcclxuICAgICAgICBpZiAoY2hvc2VuICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gY2hvc2VuLnNwbGljZSgwLCAxKVswXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gZ2V0VGhpcmRLZXlDb2RlICgpIHtcclxuICAgICAgICBsZXQgY2hvc2VuID0gYXZhaWxhYmxlMy5sZW5ndGggPiAwID8gYXZhaWxhYmxlMyA6IHVuZGVmaW5lZDtcclxuICAgICAgICBpZiAoY2hvc2VuICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gY2hvc2VuLnNwbGljZSgwLCAxKVswXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJldHVybnMgYSBwcm9taXNlIG9mIGEga2V5IHByZXNzLlxyXG4gICAgICogSWYgYWZ0ZXIgdGltZW91dCBzZWNvbmRzIGEga2V5IHdhcyBub3QgcHJlc3NlZCwgdGhlIHByb21pc2UgZmFpbHMuXHJcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gdGltZW91dFxyXG4gICAgICovXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gZ2V0TmV4dEtleSAodGltZW91dD8gOiBudW1iZXIpIDogUHJvbWlzZTxLZXlDb2RlPiB7XHJcbiAgICAgICAgbGV0IHRpbWVvdXROdW1iZXI7XHJcbiAgICAgICAgbGV0IHByb21pc2UgPSA8UHJvbWlzZTxLZXlDb2RlPj4gKG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICAgICAgcHJvbWlzZVN0YWNrLnB1c2gocmVzb2x2ZSk7XHJcblxyXG4gICAgICAgICAgICBpZiAodGltZW91dCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRpbWVvdXROdW1iZXIgPSBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBLZXlIYW5kbGVyLnJlamVjdFByb21pc2UocmVzb2x2ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KCk7XHJcbiAgICAgICAgICAgICAgICB9LCB0aW1lb3V0ICogMTAwMCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgIHByb21pc2UudGhlbigoKSA9PiB7XHJcbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lb3V0TnVtYmVyKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgcmV0dXJuIHByb21pc2U7XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHN0b3BHaXZpbmdOZXh0S2V5IChvcmlnaW5hbFByb21pc2UgOiBQcm9taXNlPEtleUNvZGU+KSB7XHJcbiAgICAgICAgbGV0IGluZGV4ID0gcHJvbWlzZU9yaWdpbmFsU3RhY2suaW5kZXhPZihvcmlnaW5hbFByb21pc2UpO1xyXG4gICAgICAgIGlmIChpbmRleCAhPSAtMSkge1xyXG4gICAgICAgICAgICByZWplY3RQcm9taXNlKHByb21pc2VTdGFja1tpbmRleF0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufSIsIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi9TYXkudHNcIiAvPlxyXG4vLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi4vLi4vLi4vQ29udHJvbHMvTW9kdWxlcy9LZXlIYW5kbGVyLnRzXCIgLz5cclxuLy8vIDxyZWZlcmVuY2UgcGF0aD1cI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biAgICAgICAgaW1nLmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCAoKSA9PiB7XHJcbiAgICAgICAgICAgIFNheUltYWdlLnNob3dJblZpZXdlcih0aGlzKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5hcHBseUNvZGUoaW1nLCBDb250cm9scy5LZXlIYW5kbGVyLmltYWdlS2V5Q29kZS5nZXRWYWx1ZSgpKTtcclxuXHJcbiAgICAgICAgcmV0dXJuIGltZztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0UHJpbnRlZEVsZW1lbnQgKCkge1xyXG4gICAgICAgIHJldHVybiBbdGhpcy5nZXRJbWFnZUVsZW1lbnQoKV07XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBkb0xvYWRUaW1lQ2hlY2soKSB7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBTYXlJbWFnZS5pbWFnZU5hbWVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGxldCBpbWFnZSA9IFNheUltYWdlLmltYWdlTmFtZXNbaV07XHJcbiAgICAgICAgICAgIGlmICghaW1hZ2UuaXNJbWFnZURlZmluZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKFNldHRpbmdzLmhhcmREZWJ1Zykge1xyXG4gICAgICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzRXJyb3IoXCJJbWFnZSBcXFwiXCIgKyBpbWFnZS5pbWdOYW1lICsgXCJcXFwiIHdhcyBub3QgZm91bmQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkltYWdlIFxcXCJcIiArIGltYWdlLmltZ05hbWUgKyBcIlxcXCIgd2FzIG5vdCBmb3VuZC5cIik7XHJcbiAgICAgICAgICAgIH1cclxuICA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Ym9sZE9iamVjdHMgPSBbXTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSB0aGlzLnNlcXVlbmNlUnVubmVyICsgMTsgaSA8IHRoaXMuc2VxdWVuY2UubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgY2FuZGlkYXRlID0gdGhpcy5zZXF1ZW5jZVJ1bm5lcltpXTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY2FuZGlkYXRlID09IFNheS5iKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBib2xkT2JqZWN0cy5wdXNoKHRoaXMuc2VxdWVuY2Uuc3BsaWNlKGksIDEpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoYm9sZE9iamVjdHMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBib2xkID0gbmV3IFNheUJvbGQoLi4uYm9sZE9iamVjdHMpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKHRoaXMuc2VxdWVuY2VSdW5uZXIgKyAxLCAwLCBib2xkKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEgPT0gU2F5LkNPQ0spIHtcclxuICAgICAgICAgICAgICAgIGlmIChIdW1hbm9pZFBlbmlzICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2NrID0gSHVtYW5vaWRQZW5pcy5nZXRTeW5vbnltKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50UGFyYWdyYXBoLnB1c2goZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoY29jaykpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gIGVsc2UgaWYgKHNlcSA9PSBTYXkuUFVTU1kpIHtcclxuICAgICAgICAgICAgICAgIGlmIChIdW1hbm9pZFZhZ2luYSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgdmFnaW5hID0gSHVtYW5vaWRWYWdpbmEuZ2V0U3lub255bSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFBhcmFncmFwaC5wdXNoKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHZhZ2luYSkpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VxID09IFNheS5MSU5FX0JSRUFLKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmRvTGluZUJyZWFrKCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VxID09IFNheS5QQVJBR1JBUEhfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuZG9QYXJhZ3JhcGhCcmVhaygpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNlcSA9PSBTYXkuUlVOX1BBUkFHUkFQSCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5za2lwYnJlYWtzID0gdHJ1ZTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEgPT0gU2F5LlJVTl9QQVJBR1JBUEhfT0ZGKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnNraXBicmVha3MgPSBmYWxzZTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2Ygc2VxID09IFwiZnVuY3Rpb25cIikge1xyXG4gICAgICAgICAgICAgICAgbGV0IGZPYmogPSAoPChzOiBTYXkpID0+IGFueT4gc2VxKSh0aGlzKTtcclxuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZPYmopKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgayA9IGZPYmoubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZS5zcGxpY2UodGhpcy5zZXF1ZW5jZVJ1bm5lciArIDEsIDAsIGZPYmpba10pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZk9iaiAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlcXVlbmNlLnNwbGljZSh0aGlzLnNlcXVlbmNlUnVubmVyICsgMSwgMCwgZk9iaik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB0aGlzLnNlcXVlbmNlLnNwbGljZSh0aGlzLnNlcXVlbmNlUnVubmVyLCAxKTtcclxuICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2VSdW5uZXItLTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEuY29uc3RydWN0b3IgPT0gdGhpcy5jb25zdHJ1Y3Rvcikge1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgayA9ICg8U2F5PiBzZXEpLnNlcXVlbmNlLmxlbmd0aCAtIDE7IGsgPj0gMDsgay0tKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZS5zcGxpY2UodGhpcy5zZXF1ZW5jZVJ1bm5lciArIDEsIDAsICg8U2F5PiBzZXEpLnNlcXVlbmNlW2tdKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKHRoaXMuc2VxdWVuY2VSdW5uZXIsIDEpO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZVJ1bm5lci0tO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNlcSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCBlbGVtZW50cyA9IGF3YWl0IHRoaXMuZ2V0RWxlbWVudEZvcih0aGlzLnNlcXVlbmNlUnVubmVyLCBzZXEpO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbGVtZW50cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50c1tpXSA9PT0gU2F5LkRPX0xJTkVfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kb0xpbmVCcmVhaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZWxlbWVudHNbaV0gPT09IFNheS5ET19QQVJBR1JBUEhfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kb1BhcmFncmFwaEJyZWFrKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50UGFyYWdyYXBoLnB1c2goZWxlbWVudHNbaV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gVE9ETzogUmVtb3ZlIGxpbmUgYnJlYWsgKyB0ZXh0IGluZGVudGVyIGlmIHRoZXkgYXJlIHRoZSBsYXN0IGluIHRoZSBzYXlcclxuICAgICAgICBpZiAodGhpcy5jdXJyZW50UGFyYWdyYXBoLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgdGhpcy5wYXJhZ3JhcGhzLnB1c2godGhpcy5jdXJyZW50UGFyYWdyYXBoKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiB0aGlzLnBhcmFncmFwaHM7XHJcbiAgICB9XHJcblxyXG4g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5cclxuICAgICAgICBmb3IgKGxldCBpID0gMCwgcGFyYWdyYXBoID0gcGFyYWdyYXBoc1tpXTsgcGFyYWdyYXBoICE9IHVuZGVmaW5lZDsgcGFyYWdyYXBoID0gcGFyYWdyYXBoc1srK2ldKSB7XHJcbiAgICAgICAgICAgIGxldCBwYXJlbnQgPSA8SFRNTEVsZW1lbnQ+IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQodGFnTmFtZSk7XHJcbiAgICAgICAgICAgIGlmIChjbGFzc0xpc3QubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgcGFyZW50LmNsYXNzTGlzdC5hZGQoLi4uY2xhc3NMaXN0KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgZm9yIChsZXQgayA9IDAsIGVsZSA9IHBhcmFncmFwaFtrXTsgZWxlIT0gdW5kZWZpbmVkOyBlbGUgPSBwYXJhZ3JhcGhbKytrXSkge1xyXG4gICAgICAgICAgICAgICAgcGFyZW50LmFwcGVuZENoaWxkKGVsZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxlbWVudHMucHVzaChwYXJlbnQpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHRoaXMuY2VudGVyZWQpIHtcclxuICAgICAgICAgICAgICAgIHBhcmVudC5jbGFzc0xpc3QuYWRkKFwiY2VudGVyZWRcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBlbGVtZW50cztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0SFRNTENvbnRlbnQgKCkgOiBQcm9taXNlPEFycmF5PEhUTUxFbGVtZW50Pj4ge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmdldEhUTUwoXCJwXCIsIFtcImNvbnRlbnRcIl0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBpc1Byb3BlckVsZW1lbnQgKG8pIDogYm9vbGVhbiB7XHJcbi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cHRpb24gKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmRlc2NyaXB0aW9uO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRWYWx1ZURlc2NyaXB0aW9uICgpIHtcclxuICAgICAgICBsZXQgZGVzYyA9IHRoaXMudmFsdWVEZXNjcmlwdGlvbih0aGlzKTtcclxuICAgICAgICBpZiAoZGVzYyBpbnN0YW5jZW9mIFNheSkge1xyXG4gICAgICAgICAgICByZXR1cm4gZGVzYztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gbmV3IFNheShkZXNjKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHRvZ2dsZSAoKSB7XHJcbiAgICAgICAgaWYgKHRoaXMuY2hhbmdlYWJsZSkge1xyXG4gICAgICAgICAgICB0aGlzLnN0b3JlVmFsdWUoIXRoaXMuZ2V0VmFsdWUoKSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBpc0FsbG93ZWQoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuZ2V0VmFsdWUoKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIE1NID0gbmV3IENvbnRlbnRUeXBlKHtcclxuICAgICAgICBjaGFuZ2VhYmxlIDogZmFsc2UsIC8vIFRoZXJlIHdpbGwgYmUgdG9vIGxpdHRsZSBjb250ZW50IGF0IGZpcnN0IGZvciB1cyB0byBibG9jayBwYXJ0IG9mIGl0IGZvciBubyBnb29kIHJlYXNvbiwgbWF5YmUgYXQgc29tZSBwb2ludFxyXG4gICAgICAgIGRlc2NyaXB0aW9uIDogXCJIb21vc2V4dWFsIChNL00pIHNleHVhbCBldmVudHNcIixcclxuICAgICAgICBpZCA6IFwiTU1cIixcclxuICAgICAgICBkZWZhdWx0VmFsdWUgOiB0cnVlXHJcbiAgICB9KTtcclxuXHJcblxyXG4gICAgcHVibGljI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ID0gZ2V0TWFya2VyKCk7XHJcbiAgICAgICAgZ2V0U2F5RWxlbWVudHNBc0NvbnRlbnQoc2F5KS50aGVuKHZhbHVlID0+IHtcclxuICAgICAgICAgICAgaW5zZXJ0QmVmb3JlKHZhbHVlLCBub2RlKTtcclxuICAgICAgICAgICAgdW5wcmludChub2RlKTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIENyZWF0ZXMgYSBzYXkgZm9yIHNheVZhbHVlcyBhbmQgdGhlbiBwcmludHMgaXQgYXMgY29udGVudC5cclxuICAgICAqIEBwYXJhbSBzYXlWYWx1ZXNcclxuICAgICAqL1xyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHNpbXBsZVByaW50ICguLi5zYXlWYWx1ZXMgOiBBcnJheTxhbnk+KSB7XHJcbiAgICAgICAgcHJpbnRBc0NvbnRlbnQobmV3IFNheSguLi5zYXlWYWx1ZXMpKTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gcHJpbnRBc0Vycm9yIChtc2cgOiBTYXkgfCBzdHJpbmcpIHtcclxuICAgICAgICBpZiAobXNnIGluc3RhbmNlb2YgU2F5KSB7XHJcbiAgICAgICAgICAgIG1zZy5nZXRIVE1MKFwiZGl2XCIsIFtcImVycm9yXCJdLCB0cnVlKS50aGVuKHZhbHVlID0+IHtcclxuICAgICAgICAgICAgICAgIHByaW50KC4uLnZhbHVlKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgbGV0IGRpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XHJcbiAgICAgICAgICAgIGRpdi5jbGFzc0xpc3QuYWRkKFwiZXJyb3JcIik7XHJcbiAgICAgICAgICAgIGRpdi5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShtc2cpKTtcclxuICAgICAgICAgICAgcHJpbnQoZGl2KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIGNsZWFyICgpIHtcclxuICAgICAgICB3aGlsZSAoY3VycmVudFR1cm5UYWIuZmlyc3RDaGlsZCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgY3VycmVudFR1cm5UYWIucmVtb3ZlQ2hpbGQoY3VycmVudFR1cm5UYWIuZmlyc3RDaGlsZCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIENvbnRyb2xzLktleUhhbmRsZXIucmVzZXQoKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIEluY2x1ZGVzIHRoZSBnaXZlbiBlbGVtZW50cyBhcyBjb250ZW50LlxyXG4gICAgICogVGhpcyBpcyB0aGUgb25seSBjb3JyZWN0IHdheSBvZiBwcmludGluZyBlbGVtZW50cy5cclxuICAgICAqIEBwYXJhbSBlbGVtZW50c1xyXG4gICAgICovXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gcHJpbnQgKC4uLmVsZW1lbnRzIDogQXJyYXk8Tm9kZT4pIHtcclxuICAgICAgICBpZihlbGVtZW50cy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIGVsZW1lbnRzLmZvckVhY2goKGVsZW1lbnQpID0+IHtcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRUdXJuVGFiLmFwcGVuZENoaWxkKGVsZW1lbnQpO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHNjcm9sbFRvKGxhc3RSZWFkT2Zmc2V0KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIGdldE1hcmtlciAoKSB7XHJcbiAgICAgICAgbGV0IG5vZGUgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShcIlwiKTtcclxuICAgICAgICBjdXJyZW50VHVyblRhYi5hcHBlbmRDaGlsZChub2RlKTtccl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ZSA9IG5ldyBTYXkodGhpcy5yb29tKTtcclxuICAgICAgICAgICAgYXdhaXQgc2F5TmFtZS5nZXRQdXJlRWxlbWVudHMoKS50aGVuKHZhbHVlID0+IHtcclxuICAgICAgICAgICAgICAgIHZhbHVlLmZvckVhY2goZWxlbWVudCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcm9vbU5hbWUuYXBwZW5kQ2hpbGQoZWxlbWVudCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICBFbGVtZW50cy5Ib3ZlckluZm8ubWFrZUhvdmVyYWJsZSh0aGlzLm1haW5EaXYsIHZhbHVlKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyB1cGRhdGUgKCkge1xyXG4gICAgICAgIGlmICh0aGlzLnJvb20gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGlmIChXb3JsZFN0YXRlLnBsYXllci5nZXRSb29tKCkgPT0gdGhpcy5yb29tKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LmFkZChcImN1cnJlbnRcIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LnJlbW92ZShcImN1cnJlbnRcIik7XHJcbiAgICAgICAgICAgIH1cclxuXHJcblxyXG4gICAgICAgICAgICBsZXQgaXNSZW1lbWJlcmVkID0gYXdhaXQgV29ybGRTdGF0ZS5pc1Jvb21SZW1lbWJlcmVkKHRoaXMucm9vbSk7XHJcbiAgICAgICAgICAgIGlmICghaXNSZW1lbWJlcmVkKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LmFkZChcInVua25vd25cIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIC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gICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJzaGUgXCI7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5nZW5kZXJWYWx1ZUNvcnJlY3RlZCA8IDM1KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGUgXCI7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgcGVyc29uIGlzIGFuZHJvZ3lub3VzLi4uXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdlbmRlci5oYXNQZW5pc0J1bGdlIHx8IGdlbmRlci5oYXNQZW5pcykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJoZSBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwic2hlIFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcInRoZXkgXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogSWYgd2UgZXZlciBoYXZlIGdlbmRlcmVkIG5vbi1odW1hbm9pZHMsIHRoZXkgbXVzdCBiZSBhZGRlZCBoZXJlLlxyXG4gICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaXQgXCI7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh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ZXh0ID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJcIjtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAobmV4dCBpbnN0YW5jZW9mIEh1bWFub2lkKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgZ2VuZGVyID0gbmV4dC5nZXRHZW5kZXJWYWx1ZSgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGdlbmRlci5nZW5kZXJWYWx1ZUNvcnJlY3RlZCA+IDY1KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGVyIFwiO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChnZW5kZXIuZ2VuZGVyVmFsdWVDb3JyZWN0ZWQgPCAzNSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpbSBcIjtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBwZXJzb24gaXMgYW5kcm9neW5vdXMuLi5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2VuZGVyLmhhc1BlbmlzQnVsZ2UgfHwgZ2VuZGVyLmhhc1BlbmlzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpbSBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGVyIFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSB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XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpcyBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGVycyBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJ0aGVpciBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAvLyBUT0RPOiBJZiB3ZSBldmVyIGhhdmUgZ2VuZGVyZWQgbm9uLWh1bWFub2lkcywgdGhleSBtdXN0IGJlIGFkZGVkIGhlcmUuXHJcbiAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJpdHMgXCI7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh0aGlzLnVwcGVyY2FzZSAmJiBzYXkuY3VycmVudFBhcmFncmFwaC5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IHRoaXMubm9kZS5ub2RlVmFsdWUuY2hhckF0KDApLnRvVXBwZXJDYXNlKClcclxuICAgICAgICAgICAgICAgICAgICArIHRoaXMubm9kZS5ub2RlVmFsdWUuc3Vic3RyKDEsIHRoaXMubm9kZS5ub2RlVmFsdWUubGVuZ3RoIC0gMSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIFt0aGlzLm5vZGVdO1xyXG4gICAgfVxyXG59IiwiLy8vIDxyZWZlcmVuY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AgICAgICAgbGV0IG5leHQgPSBzYXkuc2VxdWVuY2Vbc2F5LnNlcXVlbmNlUnVubmVyICsgMV07XHJcbiAgICAgICAgaWYgKHRoaXMuYWx3YXlzUHJpbnQpIHtcclxuICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwidGhlIFwiO1xyXG4gICAgICAgIH0gZWxzZSBpZiAobmV4dCA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiXCI7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKG5leHQgaW5zdGFuY2VvZiBUaGluZykge1xyXG4gICAgICAgICAgICAgICAgaWYgKCEoPFRoaW5nPiBuZXh0KS5wcm9wZXJseU5hbWVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwidGhlIFwiO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJcIjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcIlwiO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmICh0aGlzLm5vZGUubm9kZVZhbHVlICE9IFwiXCIpIHtcclxuICAgICAgICAgICAgaWYgKHRoaXMudXBwZXJjYXNlICYmIHNheS5jdXJyZW50UGFyYWdyYXBoLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gdGhpcy5ub2RlLm5vZGVWYWx1ZS5jaGFyQXQoMCkudG9VcHBlckNhc2UoKVxyXG4gICAgICAgICAgICAgICAgICAgICsgdGhpcy5ub2RlLm5vZGVWYWx1ZS5z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eW91ciBjbG90aGluZy5cIik7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgbGV0IHJlYWxEaWNrID0gcGVuaXMuZ2V0U2l6ZVRleHQoKTtcclxuICAgICAgICAgICAgbGV0IGZha2VEaWNrID0gSHVtYW5vaWRQZW5pcy5nZXRTaXplVGV4dChidWxnZXMuY3JvdGNoKTtcclxuICAgICAgICAgICAgcHJlc2VudGF0aW9uLmFkZChcIiBZb3UgaGF2ZSBcIiwgbmV3IFNheUFuKCksIHJlYWxEaWNrICsgXCIgZGlja1wiKTtcclxuICAgICAgICAgICAgaWYgKHBlbmlzLmdldEFjdHVhbFNpemUoKSAhPSBidWxnZXMuY3JvdGNoICYmIHJlYWxEaWNrICE9IGZha2VEaWNrKSB7XHJcbiAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24uYWRkKFwiLCB3aGljaCBsb29rcyBsaWtlIGl0IGlzIFwiICsgZmFrZURpY2sgKyBcIiBkdWUgdG8geW91ciBjbG90aGluZy5cIilcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGlmICghcGVuaXMuaXNVbmNvdmVyZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbi5hZGQoXCIsIHdoaWNoIGlzIGNvdmVyZWQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24uYWRkKFwiLlwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gaWYgKHBlbmlzID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgIC8vICAgICBpZiAoYnVsZ2VzLmNyb3RjaCA+IDApIHtcclxuICAgICAgICAvLyAgICAgICAgIHByZXNlbnRhdGlvbi5hZGQoU2F5LlBBUkFHUkFQSF9CUkVBSywgXCJZb3UgaGF2ZSBc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GVvZiBBY3Rpb24+IGNDbGFzcykuY2hlY2spO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICgoPHR5cGVvZiBBY3Rpb24+IGNDbGFzcykuY2FycnkgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBjYXJyeVJ1bGVib29rcy5wdXNoKCg8dHlwZW9mIEFjdGlvbj4gY0NsYXNzKS5jYXJyeSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY0NsYXNzID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKGNDbGFzcyk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKipcclxuICAgICAgICAgKiBDaGVjayBpZiBhY3Rpb24gZ29lcyB0aHJvdWdoXHJcbiAgICAgICAgICovXHJcbiAgICAgICAgbGV0IHJlc3VsdCA9IGF3YWl0IEFjdGlvbi5jaGVjay5leGVjdXRlKHtcclxuICAgICAgICAgICAgbm91biA6IHRoaXNcclxuICAgICAgICB9LCAuLi5jaGVja1J1bGVib29rcyk7XHJcblxyXG4gICAgICAgIC8vIFRoZXJlIGFyZSBub3cgbXVsdGlwbGUgcmVzdWx0cyEgQSBmYWxzZSByZXN1bHQgbWVhbnMgYSBmYWlsIENoZWNrISBCdXQgaXQgY2FuIGFsc28gcmV0dXJuIGEgbmV3IGFjdGlvbiFcclxuICAgICAgICBpZiAocmVzdWx0ID09IGZhbHNlKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9IGVsc2UgaWYocmVzdWx0IGluc3RhbmNlb2YgQWN0aW9uKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUuZGVidWcoUnVsZWJvb2suZ2V0SW5kZW50YXRpb24oKSArIFwiW0FDVElPTl0gSW5zdGVhZCBvZi4uLlwiKTtcclxuICAgICAgICAgICAgYXdhaXQgcmVzdWx0LmV4ZWN1dGUoKTtcclxuICAgICAgICAgICAgdGhpcy5zYXkuYWRkKHJlc3VsdC5zYXkpO1xyXG4gICAgICAgICAgICB0aGlzLm5vdW5zID0gcmVzdWx0Lm5vdW5zO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKipcclxuICAgICAgICAgKiBDYXJyeSBPdXRcclxuICAgICAgICAgKi9cclxuICAgICAgICBhd2FpdCBBY3Rpb24uY2FycnkuZXhlY3V0ZSh7XHJcbiAgICAgICAgICAgIG5vdW4gOiB0aGlzXHJcbiAgICAgICAgfSwgLi4uY2FycnlSdWxlYm9va3MpO1xyXG5cclxuICAgICAgICByZXR1cm4gdGhpcy5zYXk7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0IGFjdG9yKCk6IFRoaW5nIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5fYWN0b3I7XHJcbiAgICB9XHJcblxyXG4gICAgc2V0IGFjdG9yKHZhbHVlOiBUaGluZykge1xyXG4gICAgICAgIHRoaXMuX2FjdG9yID0gdmFsdWU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldE5vdW4gKG4gOiBudW1iZXIpIDogYW55IHtcclxuICAgICAgICBpZiAodGhpcy5ub3Vucy5sZW5ndGggPiBuKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0aGlzLm5vdW5zW25dO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzZXROb3VuIChuIDogbnVtYmVyLCBub3VuIDogYW55KSB7XHJcbiAgICAgICAgd2hpbGUgKHRoaXMubm91bnMubGVuZ3RoIDwgbikge1xyXG4gICAgICAgICAgICB0aGlzLm5vdW5zLnB1c2godW5kZWZpbmVkKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5ub3Vuc1tuXSA9IG5vdW47XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBOZWVkcyB0byByZXR1cm4gYSBzdHJpbmcgZXhw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aXMudW5zZXRSaWdodChsZWZ0KTtcclxuXHJcbiAgICAgICAgICAgIC8vIHNvbWV0aGluZyBvbiB0aGUgcmlnaHQgY2FuJ3QgYmUgb24gdGhlIGxlZnRcclxuICAgICAgICAgICAgdGhpcy51bnNldExlZnQocmlnaHQpO1xyXG5cclxuICAgICAgICAgICAgLy8gc29tZXRoaW5nIG9uIHRoZSByaWdodCBjYW4gb25seSBoYXZlIG9uZSBsZWZ0XHJcbiAgICAgICAgICAgIHRoaXMudW5zZXRSaWdodChyaWdodCk7XHJcblxyXG4gICAgICAgICAgICBsZXQgc3RyaW5nID0gUmVsYXRpb24uY3JlYXRlU3RyaW5nKGxlZnQsIHJpZ2h0KTtcclxuICAgICAgICAgICAgaWYgKHN0cmluZyAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMudmFsdWVzSGFzaFtzdHJpbmddID0gdmFsdWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdGhpcy5tYW55TWFwLnNldChyaWdodCwgbGVmdCk7XHJcbiAgICAgICAgICAgIGlmICh0aGlzLm9uZU1hcC5nZXQobGVmdCkgPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm9uZU1hcC5zZXQobGVmdCwgW3JpZ2h0XSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm9uZU1hcC5nZXQobGVmdCkucHVzaChyaWdodCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldExlZnQgKHJpZ2h0IDogYW55KSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMubWFueU1hcC5nZXQocmlnaHQpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRBbnlMZWZ0ICgpIHtcclxuICAgICAgICBsZXQgbGVmdCA9IFtdO1xyXG4gICAgICAgIHRoaXMub25lTW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odCA9IHRoaXMub25lTWFwLmdldChsZWZ0KTtcclxuICAgICAgICAgICAgYWxsUmlnaHQuc3BsaWNlKGFsbFJpZ2h0LmluZGV4T2YocmlnaHQpLCAxKTtcclxuICAgICAgICAgICAgdGhpcy5tYW55TWFwLmRlbGV0ZShyaWdodCk7XHJcbiAgICAgICAgICAgIGlmIChhbGxSaWdodC5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5vbmVNYXAuZGVsZXRlKGxlZnQpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGxldCBzdHJpbmcgPSBSZWxhdGlvbi5jcmVhdGVTdHJpbmcobGVmdCwgcmlnaHQpO1xyXG4gICAgICAgICAgICBpZiAoc3RyaW5nICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgZGVsZXRlKHRoaXMudmFsdWVzSGFzaFtzdHJpbmddKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdW5zZXRMZWZ0IChsZWZ0IDogYW55KSB7XHJcbiAgICAgICAgbGV0IGFsbFJpZ2h0ID0gdGhpcy5vbmVNYXAuZ2V0KGxlZnQpO1xyXG4gICAgICAgIGlmIChhbGxSaWdodCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgYWxsUmlnaHQuZm9yRWFjaCgocmlnaHQgOiBhbnkpID0+IHtcclxuICAgICAgICAgICAgICAgIHRoaXMubWFueU1hcC5kZWxldGUocmlnaHQpO1xyXG4gICAgICAgICAgICAgICAgbGV0IHN0cmluZyA9IFJlbGF0aW9uLmNyZWF0ZVN0cmluZyhsZWZ0LCByaWdodCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoc3RyaW5nICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSh0aGlzLnZhbHVlc0hhc2hbc3RyaW5nXSk7XHJcbiAgICAgICAgICAgICA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cHRpb25zLmRlc2NyaXB0aW9uICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBpZiAob3B0aW9ucy5kZXNjcmlwdGlvbiBpbnN0YW5jZW9mIFNheSkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5kZXNjcmlwdGlvbiA9IG9wdGlvbnMuZGVzY3JpcHRpb247XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmRlc2NyaXB0aW9uID0gbmV3IFNheShvcHRpb25zLmRlc2NyaXB0aW9uKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKG9wdGlvbnMudW5pcXVlKSB7XHJcbiAgICAgICAgICAgIFRoaW5nLnN0b3JlVW5pcXVlKHRoaXMpO1xyXG4gICAgICAgICAgICB0aGlzLnVuaXF1ZSA9IHRydWU7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgVGhpbmcuc3RvcmVOb25VbmlxdWUodGhpcyk7XHJcbiAgICAgICAgICAgIHRoaXMuY2xvbmVPcHRpb25zID0gb3B0aW9ucztcclxuICAgICAgICAgICAgdGhpcy5jbG9uZSA9IChpbmNsdWRlQ2hhbmdlcz8gOiBib29sZWFuKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBsZXQgY29ucyA9IDxhbnk+IGV2YWwoKDxhbnk+IHRoaXMuY29uc3RydWN0b3IpLm5hbWUpO1xyXG4gICAgICAgICAgICAgICAgbGV0IG5ld1RoaW5nID0gPFRoaW5nPiBuZXcgY29ucyh0aGlzLmNsb25lT3B0aW9ucyk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKGluY2x1ZGVDaGFuZ2VzID09IHVuZGVmaW5lZCB8fCBpbmNsdWRlQ2hhbmdlcykge1xyXG4gICAgICAgICAgICAgICAgICAgIG5ld1RoaW5nLnNldENoYW5nZXModGhpcy5nZXRDaGFuZ2VzKCkpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBuZXdUaGluZztcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChvcHRpb25zLmltYWdlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBpZiAob3B0aW9ucy5pbWFnZSBpbnN0YW5jZW9mIFNheUltYWdlKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmltYWdlID0gb3B0aW9ucy5pbWFnZTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuaW1hZ2UgPSBuZXcgU2F5SW1hZ2Uob3B0aW9ucy5pbWFnZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHRoaXMuc2hpbnkgPSBvcHRpb25zLnNoaW55ID09IHRydWU7XHJcblxyXG4gICAgICAgIHRoaXMuYWRkR2V0QWx0ZXJhdGlvbnMoKHRoaW5nIDogVGhpbmcpID0+IHtcclxuICAgICAgICAgICAgZnVuY3Rpb24gZ2V0Q2xvc2VzdFJvb20gKGN1cnJlbnRSb29tIDogUm9vbVJhbmRvbSwgcm9vbXMgOiBBcnJheTxSb29tUmFuZG9tPikge1xyXG4gICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRSb29tIGluc3RhbmNlb2YgUm9vbVJhbmRvbSAmJiByb29tcy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcm9vbXMuc29ydCgoYSA6IFJvb21SYW5kb20sIGIgOiBSb29tUmFuZG9tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghKGEgaW5zdGFuY2VvZiBSb29tUmFuZG9tKSkgcmV0dXJuIC0xO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIShiIGluc3RhbmNlb2YgUm9vbVJhbmRvbSkpIHJldHVybiAxO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGEgPSBhLmdldERpc3RhbmNlVG8oPFJvb21SYW5kb20+IGN1cnJlbnRSb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRiID0gYi5nZXREaXN0YW5jZVRvKDxSb29tUmFuZG9tPiBjdXJyZW50Um9vbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkYSAtIGRiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIExvY2F0aW9uIDogcm9vbXNbMF0uZ2V0TmFtZSgpXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAoVGhpbmcuRW5jbG9zZWRSZWxhdGlvbi5nZXRMZWZ0KHRoaW5nKSA9PSB0aGluZy5nZXRSb29tKCkgJiYgdGhpbmcuZ2V0Um9vbSgpICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaW5nLmdldFJvb20oKS5mb2RkZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpbmcuaXNQbGF5ZXIoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwdXQgYXQgY2xvc2VzdCByZW1lbWJlcmVkIHJvb21cclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJvb21zID0gV29ybGRTdGF0ZS5nZXRSZW1lbWJlcmVkUm9vbXNBc1Jvb21zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjdXJyZW50Um9vbSA9IHRoaW5nLmdldFJvb20oKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdldENsb3Nlc3RSb29tKDxSb29tUmFuZG9tPiBjdXJyZW50Um9vbSwgPEFycmF5PFJvb21SYW5kb20+PiByb29tcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcHV0IGF0IGNsb3Nlc3Qgcm9vbVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcm9vbXMgPSB0aGluZy5nZXRSb29tKCkuZ2V0Q29ubmVjdGVkUm9vbXMoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGN1cnJlbnRSb29tID0gdGhpbmcuZ2V0Um9vbSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZm91bmRSb29tID0gZ2V0Q2xvc2VzdFJvb20oPFJvb21SYW5kb20+IGN1cnJlbnRSb29tLCA8QXJyYXk8Um9vbVJhbmRvbT4+IHJvb21zKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZvdW5kUm9vbSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmb3VuZFJvb207XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb29tcyA9ICg8UmVnaW9uPiBSZWdpb24uSW5SZWxhdGlvbi5nZXRMZWZ0KHRoaW5nLmdldFJvb20oKSkpLmdldFJvb21zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0Q2xvc2VzdFJvb20oPFJvb21SYW5kb20+IGN1cnJlbnRSb29tLCA8QXJyYXk8Um9vbVJhbmRvbT4+IHJvb21zKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgTG9jYXRpb246IHRoaW5nLmdldFJvb20oKS5nZXROYW1lKClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy5hZGRTZXRBbHRlcmF0aW9ucygodGhpbmcgOiBUaGluZywgY2hhbmdlcykgPT4ge1xyXG4gICAgICAgICAgICBpZiAoY2hhbmdlcy5Mb2NhdGlvbiAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCByb29tID0gUm9vbS5nZXRSb29tKGNoYW5nZXMuTG9jYXRpb24pO1xyXG4gICAgICAgICAgICAgICAgaWYgKHJvb20gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcm9vbS5wbGFjZSh0aGluZyk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJVbmFibGUgdG8gcGxhY2UgXCIsIHRoaW5nLCBcIiBhdCByb29tIFwiLCBjaGFuZ2VzLkxvY2F0aW9uKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhZGRHZXRBbHRlcmF0aW9ucyAobmV3R2V0KSB7XHJcbiAgICAgICAgdGhpcy5nZXRBbHRlcmF0aW9ucy5wdXNoKG5ld0dldCk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBUaGlzIGFkZHMgYSBmdW5jdGlvbiB0byBydW4gb3ZlciB3aGVuIGxvYWRpbmcgZnJvbSBhIHNhdmUgZmlsZS5cclxuICAgICAqIEFsd2F5cyByZW1lbWJlciB0aGF0IHNhdmUgZmlsZXMgYXJlIE5PVCBTQUZFLiBJZGVhbGx5IHdlIHNob3VsZCBjaGVjayBmb3IgaW52YWxpZCBpbmZvcm1hdGlvbixcclxuICAgICAqIGJ1dCBhdCBsZWFzdCBjaGVjayB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ZWZ0KHRoaXMpO1xyXG4gICAgICAgIGlmIChwYXJ0T2YgaW5zdGFuY2VvZiBSb29tKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBwYXJ0T2Y7XHJcbiAgICAgICAgfSBlbHNlIGlmIChwYXJ0T2YgaW5zdGFuY2VvZiBUaGluZykge1xyXG4gICAgICAgICAgICByZXR1cm4gcGFydE9mLmdldFJvb20oKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHJlbW92ZUZyb21Sb29tICgpIHtcclxuICAgICAgICB0aGlzLmdldFJvb20oKS5yZW1vdmUodGhpcyk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzVmlzaWJsZVRvICh0aGluZyA6IFRoaW5nKSB7XHJcbiAgICAgICAgLy8gRWl0aGVyIGluIHRoZSBzYW1lIHJvb20gb3IgcGFydCBvZiAvd2llbGRlZCAvIGNhcnJpZWQgYnkgcGVyc29uXHJcbiAgICAgICAgcmV0dXJuICh0aGlzLmdldFJvb20oKSA9PSB0aGluZy5nZXRSb29tKCkgJiYgdGhpcy52aXNpYmxlKTtcclxuICAgICAgICAvLyBUT0RPIDogVXBkYXRlIHRoaXMgY29kZSBmb3IgdGhlIGNhc2VzIHdoZXJlIGEgY3JlYXR1cmUgaXMgbm90IHZpc2libGUgYnV0IHRoZSBvYnNlcnZlciBjYW4gc2VlIHRoZW0gYW55d2F5XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzUGxheWVyICgpIHtcclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFkZFBhcnRzICguLi5wYXJ0cyA6IEFycmF5PFRoaW5nPikge1xyXG4gICAgICAgIHBhcnRzLmZvckVhY2gocGFydCA9PiB7XHJcbiAgICAgICAgICAgIFRoaW5nLlBhcnRSZWxhdGlvbi5zZXRSZWxhdGlvbih0aGlzLCBwYXJ0KTtcclxuICAgICAgICB9KTtcclxuICAgIH1c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iQ2hlY2sgVGFraW5nIC0gV2hvIGhhcyBpdCwgcmVhbGx5P1wiLFxyXG4gICAgICAgIHByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxyXG4gICAgICAgIGNvZGUgOiAocnVsZWJvb2sgOiBSdWxlYm9va1J1bm5lcjxBY3Rpb25UYWtlPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgYWN0aW9uID0gPEFjdGlvbkdvPiBydWxlYm9vay5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgYWN0b3IgPSBhY3Rpb24uYWN0b3I7XHJcbiAgICAgICAgICAgIGxldCB0aGluZyA9ICg8VGhpbmc+YWN0aW9uLmdldE5vdW4oMCkpO1xyXG4gICAgICAgICAgICBsZXQgb3duZXIgPSA8VGhpbmc+IHRoaW5nLmdldEVuY2xvc2VkT25lKCk7XHJcblxyXG4gICAgICAgICAgICBpZiAob3duZXIgPT0gYWN0b3Ipe1xyXG4gICAgICAgICAgICAgICAgaWYgKG93bmVyID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgYWxyZWFkeSBoYXZlIGl0LlwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pXHJcbik7XHJcblxyXG5BY3Rpb25UYWtlLmNoZWNrLmFkZFJ1bGUoXHJcbiAgICBuZXcgUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiQ2hlY2sgVGFraW5nIC0gRG9udXQgc3RlYWxcIixcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uVGFrZT4pID0+IHtcclxuICAgICAgICAgICAgbGV0IGFjdGlvbiA9IDxBY3Rpb25Hbz4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgbGV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PT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBjYW4ndCB0YWtlIHRoYXQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSlcclxuKTtcclxuXHJcbkFjdGlvblRha2UuY2FycnkuYWRkUnVsZShcclxuICAgIEFjdGlvblRha2UuZGVmYXVsdENhcnJ5VGFraW5nUnVsZVxyXG4pO1xyXG5cclxuRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5IeXBlcmxpbmtpbmdSdWxlYm9vay5hZGRSdWxlKG5ldyBSdWxlKFxyXG4gICAge1xyXG4gICAgICAgIG5hbWUgOiBcIkh5cGVybGluayAtIFRha2VcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxyXG4gICAgICAgIGNvZGUgOiAocnVsZWJvb2sgOiBSdWxlYm9va1J1bm5lcjxUaGluZz4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gPFRoaW5nPiBydWxlYm9vay5ub3VuO1xyXG5cclxuICAgICAgICAgICAgaWYgKCF0aGluZy5hbmltYXRlZCAmJiAhdGhpbmcuZml4ZWRJblBsYWNlICYmIHRoaW5nLmdldFJvb20oKSA9PSBXb3JsZFN0YXRlLnBsYXllci5nZXRSb29tKCkgJiYgdGhpbmcuZ2V0RW5jbG9zZWRPbmUoKSBpbnN0YW5jZW9mIFJvb20pIHtcclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkh5cGVybGlua0hhbmRsZXIuYWRkQXZhaWxhYmxlQWN0aW9uKFwiVGFrZVwiLCBuZXcgQWN0aW9uVGFrZShXb3JsZFN0YXRlLnBsYXllciwgdGhpbmcpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAg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ElHSEVTVCxcclxuICAgICAgICBwcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfSElHSCxcclxuICAgICAgICBuYW1lIDogXCJDaGFuZ2UgUm9vbSB0byBEaXJlY3Rpb25cIixcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uR28+IHJ1bGVib29rLm5vdW47XHJcblxyXG4gICAgICAgICAgICAvLyBTb21lb25lIGFza2VkIGZvciBhIHJvb20uLi5cclxuICAgICAgICAgICAgaWYgKGFjdGlvbi5nZXROb3VuKDApIGluc3RhbmNlb2YgUm9vbVJhbmRvbSkge1xyXG4gICAgICAgICAgICAgICAgbGV0IGFjdG9yID0gYWN0aW9uLmFjdG9yO1xyXG4gICAgICAgICAgICAgICAgbGV0IGNSb29tID0gYWN0b3IuZ2V0Um9vbSgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNSb29tIGluc3RhbmNlb2YgUm9vbVJhbmRvbSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkUm9vbSA9IGFjdGlvbi5nZXROb3VuKDApO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoY1Jvb20gPT0gZFJvb20pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjdG9yLmlzUGxheWVyKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGFyZSBhbHJlYWR5IHRoZXJlIVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc3RvcCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgY29kZTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPSAocm9vbTogUm9vbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFdvcmxkU3RhdGUuaXNSb29tUmVtZW1iZXJlZChyb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IGNSb29tLmdldEFTdGFyQmVzdERpcmVjdGlvblRvKGRSb29tLCBjb2RlKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoZGlyZWN0aW9uID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0b3IuaXNQbGF5ZXIoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgZG9uJ3QgcmVtZW1iZXIgaG93IHRvIGdldCB0aGVyZS5cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zZXROb3VuKDAsIGRpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBydWxlQ2hlY2tJc3RoZXJlZGlyZWN0aW9uYW5kcm9vbSA9IEFjdGlvbkdvLmNoZWNrLmNyZWF0ZUFuZEFkZFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIkNoZWNrIEdvaW5nIC0gaXMgdGhlcmUgYSBkaXJlY3Rpb24/IERvZXMgaXQgbGVhZCBhbnl3aGVyZT9cIixcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uR28+IHJ1bGVib29rLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBjUm9vbSA9IGFjdGlvbi5hY3Rvci5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgIGlmIChjUm9vbSA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsgLy8gUnVsZSBmYWlscywgYWN0b3IgaXMgb3V0IG9mIHdvcmxkXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IGFjdGlvbi5nZXROb3VuKDApO1xyXG4gICAgICAgICAgICBpZiAoZGlyZWN0aW9uID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOyAvLyBSdWxlIGZhaWxzLCBubyBkaXJlY3Rpb25cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBsZXQgbmV4dFJvb20gPSBjUm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dO1xyXG4gICAgICAgICAgICBpZiAobmV4dFJvb20gPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7IC8vIFJ1bGUgZmFpbHMsIGNhbid0IGdvIGRpcmVjdGlvbiB0aGF0IGRvZXNuJ3QgaGF2ZSBhIHJvb21cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgYWN0aW9uLnJvb21Hb25lRnJvbSA9IGFjdGlvbi5hY3Rvci5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgIGFjdGlvbi5yb29tR29uZVRvID0gbmV4dFJvb207XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXR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CkgKyBcIi5cIik7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHBvc2l0ZU5hbWUgPSBEaXJlY3Rpb25OYW1lc1tcclxuICAgICAgICAgICAgICAgICAgICAgICAgT3Bwb3NpdGVEaXJlY3Rpb25bZGlyZWN0aW9uXVxyXG4gICAgICAgICAgICAgICAgICAgIF07XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQobmV3IFNheVRoZSgpLCBhY3RvciwgXCIgYXJyaXZlcyBmcm9tIHRoZSBcIiArIG9wcG9zaXRlTmFtZS50b0xvd2VyQ2FzZSgpICsgXCIuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBydWxlQ2FycnlSZW1lbWJlclJvb21zID0gQWN0aW9uR28uY2FycnkuY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiR29pbmcgLSBSZW1lbWJlciB0aGUgaW52b2x2ZWQgcm9vbXNcIixcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uR28+IHJ1bGVib29rLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBhY3RvciA9IGFjdGlvbi5hY3RvcjtcclxuICAgICAgICAgICAgbGV0IHJvb21Hb25lSW50byA9IGFjdGlvbi5hY3Rvci5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgIGxldCBkaXJlY3Rpb24gPSBhY3Rpb24uZ2V0Tm91bigwKTtcclxuICAgICAgICAgICAgbGV0IHJvb21Hb25lRnJvbSA9IHJvb21Hb25lSW50by5jb25uZWN0aW9uc1tPcHBvc2l0ZURpcmVjdGlvbltEaXJlY3Rpb25bZGlyZWN0aW9uXV1dO1xyXG5ccl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JcbiAgICAgICAgaWYgKHJvb20gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGN1cnJlbnRSb29tTmFtZS5ub2RlVmFsdWUgPSByb29tLmdldFByaW50ZWROYW1lKCk7XHJcblxyXG4gICAgICAgICAgICBsZXQgZGVzY3JpcHRpb24gPSByb29tLmRlc2NyaXB0aW9uLmdldEhUTUwoXCJwXCIsIFtcInJvb21EZXNjcmlwdGlvblwiXSk7XHJcbiAgICAgICAgICAgIGF3YWl0IGRlc2NyaXB0aW9uLnRoZW4odmFsdWUgPT4ge1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDAsIHAgPSB2YWx1ZVtpXTsgcCAhPSB1bmRlZmluZWQ7IHAgPSB2YWx1ZVsrK2ldKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudFJvb21EZXNjcmlwdGlvbi5hcHBlbmRDaGlsZChwKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICBsZXQgdGhpbmdzID0gcm9vbS5nZXRDb250YWluZWRBbmRWaXNpYmxlKCk7XHJcbiAgICAgICAgICAgIGlmICh0aGluZ3MubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHRoaW5nTGlzdCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJwXCIpO1xyXG4gICAgICAgICAgICAgICAgdGhpbmdMaXN0LmNsYXNzTGlzdC5hZGQoXCJyb29tRGVzY3JpcHRpb25cIik7XHJcblxyXG4gICAgICAgICAgICAgICAgYXdhaXQgUHJpbnRpbmdWaXNpYmxlVGhpbmdzUnVsZWJvb2suZXhlY3V0ZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgbm91biA6IDxWaXNpYmxlVGhpbmdzT3B0aW9ucz4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGluZ3MgOiB0aGluZ3MsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lciA6IHRoaW5nTGlzdFxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIGN1cnJlbnRSb29tRGVzY3JpcHRpb24uYXBwZW5kQ2hpbGQodGhpbmdMaXN0KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgZm9yIChsZXQgaW5kZXggPSAwLCB2YWx1ZSA9IHJvb20uY29ubmVjdGlvbnNbaW5kZXhdOyBpbmRleCA8IHJvb20uY29ubmVjdGlvbnMubGVuZ3RoOyB2YWx1ZSA9IHJvb20uY29ubmVjdGlvbnNbKytpbmRleF0pIHtcclxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgcCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJwXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIHAuY2xhc3NMaXN0LmFkZChcInJvb21FeGl0XCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGxpbmsuY2xhc3NMaXN0LmFkZChcInJvb21EaXJlY3Rpb25cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgbGluay5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShEaXJlY3Rpb25OYW1lc1tEaXJlY3Rpb25baW5kZXhdXSkpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBDb250cm9scy5MaW5rcy5tYWtlTGluayhsaW5rLCBuZXcgQWN0aW9uR28oV29ybGRTdGF0ZS5wbGF5ZXIsIGluZGV4KSk7XHJcbiAgICAgICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5hcHBseUNvZGUobGluaywgQ29udHJvbHMuS2V5SGFuZGxlci5nZXREaXJlY3Rpb25Db2RlQnlJbmRleChpbmRleCkpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBwLmFwcGVuZENoaWxkKGxpbmspO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aW9uUmVzdWx0ID0gXCI6IFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChXb3JsZFN0YXRlLmlzUm9vbVJlbWVtYmVyZWQodmFsdWUpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpcmVjdGlvblJlc3VsdCArPSB2YWx1ZS5nZXRQcmludGVkTmFtZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpcmVjdGlvblJlc3VsdCArPSBcIkEgbmV3IHBsYWNlXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBwLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKGRpcmVjdGlvblJlc3VsdCkpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50Um9vbUV4aXRzLmFwcGVuZENoaWxkKHApO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBpbnRlcmZhY2UgVmlzaWJsZVRoaW5nc09wdGlvbnMge1xyXG4gICAgICAgIGNvbnRhaW5lciA6IEhUTUxFbGVtZW50LFxyXG4gICAgICAgIHRoaW5ncyA6IEFycmF5PFRoaW5nPlxyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogTm91biA9IFZpc2libGVUaGluZ3NPcHRpb25zXHJcbiAgICAgKiBAdHlwZSB7UnVsZWJvb2t9XHJcbiAgICAgKi9cclxuICAgIGV4cG9ydCB2YXIgUHJpbnRpbmdWaXNpYmxlVGhpbmdzUnVsZWJvb2sgPSBuZXcgUnVsZWJvb2soXCJQcmludGluZyB0aGUgbmFtZSBvZiB2aXNpYmxlIHRoaW5ncyBpbiBhIHJvb21cIik7XHJcblxyXG4gICAgZXhwb3J0IHZhciBQcmludEludHJvVG9WaXNpYmxlVGhpbmdzUnVsZSA9IG5ldyBSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJQcmludCBcXFwiWW91IGNhbiBzZWVcXFwiIHRleHRcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdILFxyXG4gICAgICAgIGNvZGUgOiAocnVsZWJvb2sgOiBSdWxlYm9va1J1bm5lcjxWaXNpYmxlVGhpbmdzT3B0aW9ucz4pID0+ICB7XHJcbiAgICAgICAgICAgIGxldCBub3VuID0gPFZpc2libGVUaGluZ3NPcHRpb25zPiBydWxlYm9vay5ub3VuO1xyXG4gICAgICAgICAgICBub3VuLmNvbnRhaW5lci5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShcIllvdSBjYW4gc2VlIFwiKSk7XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbiAgICBQcmludGluZ1Zpc2libGVUaGluZ3NSdWxlYm9vay5hZGRSdWxlKFByaW50SW50cm9Ub1Zpc2libGVUaGluZ3NSdWxlKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIFByaW50VmlzaWJsZVRoaW5nc1J1bGUgPSBuZXcgUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiUHJpbnQgYWxsIHZpc2libGUgdGhpbmdzXCIsXHJcbiAgICAgICAgY29kZSA6IGFzeW5jIChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPFZpc2libGVUaGluZ3NPcHRpb25zPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgbm91biA9IDxWaXNpYmxlVGhpbmdzT3B0aW9ucz4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBub3VuLnRoaW5ncy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gbm91bi50aGluZ3NbaV07XHJcbiAgICAgICAgICAgICAgICBsZXQgbGluayA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJhXCIpO1xyXG4gICAgICAgICAgICAgICAgbGluay5jbGFzc0xpc3QuYWRkKFwicm9vbU9iamVjdFwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgc2F5IDogU2F5XHJcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUgaW5zdGFuY2VvZiBUaGluZyAmJiB2YWx1ZS51bmlxdWUpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkgPSBuZXcgU2F5KG5ldyBTYXlUaGUoZmFsc2UpLCB2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheSA9IG5ldyBTYXkobmV3IFNheUFuKGZhbHNlKSwgdmFsdWUpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgYXdhaXQgc2F5LmdldFB1cmVFbGVtZW50cygpLnRoZW4odmFsdWUyID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMCwgZWxlbWVudCA9IHZhbHVlMltpXTsgZWxlbWVudCAhPSB1bmRlZmluZWQ7IGVsZW1lbnQgPSB2YWx1ZTJbKytpXSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5rLmFwcGVuZENoaWxkKGVsZW1lbnQpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIENvbnRyb2xzLkxpbmtzLm1ha2VMaW5rKGxpbmssIG5ldyBBY3Rpb25FeGFtaW5lKFdvcmxkU3RhdGUucGxheWVyLCB2YWx1ZSkpO1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5hcHBseUNvZGUobGluaywgQ29udHJvbHMuS2V5SGFuZGxlci5nZXRGaXJzdEtleUNvZGUoKSk7XHJcblxyXG4gICAgICAgICAgICAgICAgbm91bi5jb250YWluZXIuYXBwZW5kQ2hpbGQobGluayk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKChpICsgMSkgPCBub3VuLnRoaW5ncy5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICBub3VuLmNvbnRhaW5lci5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShcIiwgXCIpKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG4gICAgUHJpbnRpbmdWaXNpYmxlVGhpbmdzUnVsZWJvb2suYWRkUnVsZShQcmludFZpc2libGVUaGluZ3NSdWxlKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIFByaW50T3V0cm9Ub1Zpc2libGVUaGluZ3NSdWxlID0gbmV3IFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIlByaW50IFxcXCIuLi4gaGVyZVxcXCIgdGV4dFwiLFxyXG4gICAgICAgIGZpcnN0UHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX0xPVyxcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8VmlzaWJsZVRoaW5nc09wdGlvbnM+KSA9PiAge1xyXG4gICAgICAgICAgICBsZXQgbm91biA9IDxWaXNpYmxlVGhpbmdzT3B0aW9ucz4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgbm91bi5jb250YWluZXIuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoXCIgaGVyZS5cIikpO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG4gICAgUHJpbnRpbmdWaXNpYmxlVGh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29pbnMoKTtcclxuICAgICAgICAgICAgICAgIGlmICh0aGluZ0NvaW5zID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVib29rLnNraXBSdWxlKEFjdGlvblRha2UuZGVmYXVsdENhcnJ5VGFraW5nUnVsZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICg8Q29pblBvdWNoPiBhY3RvclBvdWNoZXNbMF0pLmFkZENvaW5zKHRoaW5nQ29pbnMpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaW5nLnJlbW92ZUNvaW5zKHRoaW5nLmdldENvaW5zKCkpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgZW1wdHkgXCIsIG5ldyBTYXlUaGUoKSwgdGhpbmcsIFwiIGludG8geW91ciBcIiwgYWN0b3JQb3VjaGVzWzBdLCBcIi4gWW91ciBcIiwgYWN0b3JQb3VjaGVzWzBdLCBcIiBub3cgaGFzIFwiICsgYWN0b3JQb3VjaGVzWzBdLmdldENvaW5zKCkudG9TdHJpbmcoKSArIFwiIGNvaW5zLlwiKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChuZXcgU2F5VGhlKCksIGFjdG9yLCBcIiBlbXB0aWVzIFwiLCBuZXcgU2F5VGhlKCksIHRoaW5nLCBcIiBpbnRvIFwiLCBTYXkuaGlzSGVyc0l0cyhhY3RvciksIGFjdG9yUG91Y2hlc1swXSwgXCIuXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gZ2l2ZSB0aGVtIHRoZSBvbCcgc3dpdGNoYXJvb1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBteUNvaW5zID0gYWN0b3JQb3VjaGVzWzBdLmdldENvaW5zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0b3JQb3VjaGVzWzBdLnJlbW92ZUNvaW5zKG15Q29pbnMpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaW5nLmFkZENvaW5zKG15Q29pbnMpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBlbXB0eSB5b3VyIFwiLCBhY3RvclBvdWNoZXNbMF0sIFwiIGludG8gXCIsIG5ldyBTYXlUaGUoKSwgdGhpbmcsIFwiLlwiLCBTYXkuUEFSQUdSQVBIX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRyb3AgPSBuZXcgQWN0aW9uRHJvcChhY3RvciwgYWN0b3JQb3VjaGVzWzBdKTtcclxuICAgICAgICAgICAgICAgICAgICBhd2FpdCBkcm9wLmV4ZWN1dGUoKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRoaW5nLkVuY2xvc2VkUmVsYXRpb24uZ2V0TGVmdChhY3RvclBvdWNoZXNbMF0pID09IGFjdG9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgY2FuJ3QgZ2V0IHJpZCBvZiB5b3VyIFwiLCBhY3RvclBvdWNoZXNbMF0sIFwiIVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb25kaXRpb25zIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uVGFrZT4pID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuICgoPEFjdGlvblRha2U+IHJ1bGVib29rLm5vdW4pLmdldE5vdW4oMCkgaW5zdGFuY2VvZiBDb2luUG91Y2gpO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59XHJcblxyXG5BY3Rpb25UYWtlLmNhcnJ5LmFkZFJ1bGUoQ29pblBvdWNoLmNhcnJ5T3V0VGFraW5nQ29pblBvdWNoZXMpO1xyXG5cclxuU2F5LmFmdGVyUHJpbnRpbmcuYWRkUnVsZShuZXcgUnVsZShcclxuICAgIHtcclxuICAgICAgICBuYW1lIDogXCJJbmNsdWRlIGNvbnRlbnRzIG9mIENvaW4gUG91Y2ggd2hpbGUgUHJpbnRpbmcgVmlzaWJsZSBUaGluZ3MgaW4gYSBSb29tXCIsXHJcbiAgICAgICAgY29kZSA6IChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPFNheT4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHNheSA9IDxTYXk+IHJ1bGVib29rLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBwb3VjaCA9IDxDb2luUG91Y2g+IHNheS5jdXJyZW50Tm91bjtcclxuICAgICAgICAgICAgc2F5LmN1cnJlbnROb3VuRWxlbWVudHMucHVzaChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShcIiB3aXRoIFwiICsgcG91Y2guZ2V0Q29pbnMoKS50b1N0cmluZygpICsgXCIgY29pbnNcIikpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29uZGl0aW9ucyA6IChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPFNheT4pID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIEVsZW1lbnRzLlJvb21IYW5kbGVyLlByaW50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cmV0dXJuIDA7XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIHVwZGF0ZUludmVudG9yeSAoKSB7XHJcbiAgICAgICAgbGV0IHBsYXllciA9IFdvcmxkU3RhdGUucGxheWVyO1xyXG5cclxuICAgICAgICBlbXB0eSgpO1xyXG5cclxuICAgICAgICBsZXQgd2llbGRlZCA9IFRoaW5nLldpZWxkUmVsYXRpb24uZ2V0UmlnaHQocGxheWVyKS5zb3J0KHRoaW5nU29ydCk7XHJcbiAgICAgICAgbGV0IHdvcm4gPSBUaGluZy5XZWFyUmVsYXRpb24uZ2V0UmlnaHQocGxheWVyKS5zb3J0KHRoaW5nU29ydCk7XHJcbiAgICAgICAgbGV0IGNhcnJpZWQgPSBUaGluZy5DYXJyeVJlbGF0aW9uLmdldFJpZ2h0KHBsYXllcikuc29ydCh0aGluZ1NvcnQpO1xyXG5cclxuICAgICAgICBpZiAod2llbGRlZC5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIHByaW50SGVhZGVyKFwiV2llbGRlZFwiKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB3aWVsZGVkLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBwcmludFRoaW5nKHdpZWxkZWRbaV0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAod29ybi5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIHByaW50SGVhZGVyKFwiV29yblwiKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB3b3JuLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBwcmludFRoaW5nKHdvcm5baV0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoY2FycmllZC5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIHByaW50SGVhZGVyKFwiQ2FycmllZFwiKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjYXJyaWVkLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBwcmludFRoaW5nKGNhcnJpZWRbaV0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBsZXQgcG91Y2ggPSA8QXJyYXk8Q29pblBvdWNoPj4gVGhpbmcuQ2FycnlSZWxhdGlvbi5nZXRSaWdodFR5cGUoV29ybGRTdGF0ZS5wbGF5ZXIsIENvaW5Qb3VjaCk7XHJcbiAgICAgICAgaWYgKHBvdWNoLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgbGV0IHAgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwicFwiKTtcclxuICAgICAgICAgICAgcC5jbGFzc0xpc3QuYWRkKFwiaW52ZW50b3J5R29sZFwiKTtcclxuICAgICAgICAgICAgbGV0IHMgOiBTYXk7XHJcbiAgICAgICAgICAgIGlmIChwb3VjaFswXS5nZXRDb2lucygpID4gMCkge1xyXG4gICAgICAgICAgICAgICAgcyA9IG5ldyBTYXkoXCJUaGVyZSBhcmUgXCIgKyBwb3VjaFswXS5nZXRDb2lucygpLnRvU3RyaW5nKCkgKyBcIiBjb2lucyBpbiB5b3VyIFwiLCBwb3VjaFswXSwgXCIuXCIpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcyA9IG5ldyBTYXkoXCJUaGVyZSBhcmUgbm8gY29pbnMgaW4geW91ciBcIiwgcG91Y2hbMF0sIFwiLlwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBhd2FpdCBzLmdldFB1cmVFbGVtZW50cygpLnRoZW4oZWxlbWVudHMgPT4ge1xyXG4gICAgICAgICAgICAgICAgZWxlbWVudHMuZm9yRWFjaChlbGVtZW50ID0+I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2hhbmdlIFJvb20gdG8gRGlyZWN0aW9uXCIsXHJcbiAgICBjb2RlIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uUmV0cmFjZT4pID0+IHtcclxuICAgICAgICBsZXQgYWN0aW9uID0gPEFjdGlvbkdvPiBydWxlYm9vay5ub3VuO1xyXG5cclxuICAgICAgICAvLyBTb21lb25lIGFza2VkIGZvciBhIHJvb20uLi5cclxuICAgICAgICBpZiAoYWN0aW9uLmdldE5vdW4oMCkgaW5zdGFuY2VvZiBSb29tKSB7XHJcbiAgICAgICAgICAgIGxldCBhY3RvciA9IGFjdGlvbi5hY3RvcjtcclxuICAgICAgICAgICAgbGV0IGNSb29tID0gYWN0b3IuZ2V0Um9vbSgpO1xyXG4gICAgICAgICAgICBpZiAoY1Jvb20gPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGV0IGRSb29tID0gYWN0aW9uLmdldE5vdW4oMCk7XHJcblxyXG4gICAgICAgICAgICBpZiAoY1Jvb20gPT0gZFJvb20pIHtcclxuICAgICAgICAgICAgICAgIGlmIChhY3Rvci5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgYXJlIGFscmVhZHkgdGhlcmUhXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgYWN0aW9uLnN0b3AoKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgbGV0IGNvZGU7XHJcblxyXG4gICAgICAgICAgICBpZiAoYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgIGNvZGUgPSAocm9vbSA6IFJvb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICByZ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RzKCk7XHJcblxyXG4gICAgICAgIGZvciAobGV0IHkgPSBtYXAuaGlnaGVzdFk7IHkgPj0gbWFwLmxvd2VzdFk7IHktLSkge1xyXG4gICAgICAgICAgICBsZXQgcm93ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcclxuICAgICAgICAgICAgcm93LmNsYXNzTGlzdC5hZGQoXCJtYXBSb3dcIik7XHJcbiAgICAgICAgICAgIGZvciAobGV0IHggPSBtYXAubG93ZXN0WDsgeCA8PSBtYXAuaGlnaGVzdFg7IHgrKykge1xyXG4gICAgICAgICAgICAgICAgbGV0IHJvb20gPSBtYXAuZ2V0Um9vbSh4LCB5KTtcclxuICAgICAgICAgICAgICAgIGxldCByb29tTm9kZSA9IG5ldyBSb29tTm9kZShyb29tKTtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHJvb21Ob2RlLmNyZWF0ZVJvb21OYW1lRmxvYXRlcigpO1xyXG5cclxuICAgICAgICAgICAgICAgIGxldCByb29tRGl2ID0gcm9vbU5vZGUuZ2V0RWxlbWVudCgpO1xyXG4gICAgICAgICAgICAgICAgcm93LmFwcGVuZENoaWxkKHJvb21EaXYpO1xyXG5cclxuICAgICAgICAgICAgICAgIGVsZW1lbnRzW3gudG9TdHJpbmcoKSArIFwiO1wiICsgeS50b1N0cmluZygpXSA9IHJvb21Ob2RlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIG1hcFRhcmdldC5hcHBlbmRDaGlsZChyb3cpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgYXdhaXQgdXBkYXRlT2xkTWFwKCk7XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIHVwZGF0ZU9sZE1hcCAoKSB7XHJcbiAgICAgICAgbGV0IG1hcCA9IGxhc3RNYXA7XHJcbiAgICAgICAgZm9yIChsZXQgeSA9IG1hcC5oaWdoZXN0WTsgeSA+PSBtYXAubG93ZXN0WTs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ICAgICAgICAgICAgICBjYXNlIDQ6IHJldHVybiAoXCJDaXJjdXMgU3Ryb25nXCIgKyAoKDxIdW1hbm9pZD4gV29ybGRTdGF0ZS5wbGF5ZXIpLmlzTWFsZSgpID8gXCJtYW5cIiA6IFwid29tYW5cIikpO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAzOiByZXR1cm4gXCJCZWFjaCBCdWxseVwiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAyOiByZXR1cm4gKFwiQXZlcmFnZSBcIiArICgoPEh1bWFub2lkPiBXb3JsZFN0YXRlLnBsYXllcikuaXNNYWxlKCkgPyBcIkpvZVwiIDogXCJKYW5lXCIpKTtcclxuICAgICAgICAgICAgICAgIGNhc2UgMTogcmV0dXJuIFwiV2V0IE5vb2RsZVwiO1xyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDogcmV0dXJuIFwiT3V0IG9mIGJvdW5kcy5cIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICk7XHJcbiAgICBleHBvcnQgbGV0IEFnaWxpdHkgPSBuZXcgQXR0cmlidXRlKFxyXG4gICAgICAgIFwiQWdpbGl0eVwiLFxyXG4gICAgICAgIHZhbHVlID0+IHtcclxuICAgICAgICAgICAgc3dpdGNoICh2YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgY2FzZSA1OiByZXR1cm4gXCJDYXRsaWtlXCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDQ6IHJldHVybiBcIkd5bW5hc3RcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMzogcmV0dXJuIFwiQWNjdXJhdGVcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMjogcmV0dXJuIFwiQ29tbW9uXCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDE6IHJldHVybiBcIkFjY2lkZW50LXByb25lXCI7XHJcbiAgICAgICAgICAgICAgICBkZWZhdWx0OiByZXR1cm4gXCJPdXQgb2YgYm91bmRzLlwiO1xyXG4g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ZD4gV29ybGRTdGF0ZS5wbGF5ZXIpLmlzTWFsZSgpID8gXCJtYW5cIiA6IFwid29tYW5cIikpO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAyOiByZXR1cm4gXCJOb3QgZXZlbiB0cnlpbmdcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMTogcmV0dXJuIFwiVW5wbGVhc2FudFwiO1xyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDogcmV0dXJuIFwiT3V0IG9mIGJvdW5kcy5cIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICk7XHJcblxyXG4gICAgZXhwb3J0IGxldCBDb3JydXB0aW9uID0gbmV3IEF0dHJpYnV0ZShcclxuICAgICAgICBcIkNvcnJ1cHRpb25cIixcclxuICAgICAgICB2YWx1ZSA9PiB7XHJcbiAgICAgICAgICAgIHJldHVybiBcIk5vdCBkZWZpbmVkXCJcclxuICAgICAgICB9LFxyXG4gICAgICAgIDAsIDEwMFxyXG4gICAgKTtcclxuXHJcblxyXG4gICAgZXhwb3J0IGxldCBHZW5kZXJJZGVudGl0eSA9IG5ldyBBdHRyaWJ1dGUoXHJcbiAgICAgICAgXCJHZW5kZXIgSWRlbnRpdHlcIixcclxuICAgICAgICB2YWx1ZSA9PiB7XHJcbiAgICAgICAgICAgIGlmICh2YWx1ZSA+PSA3NSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiWW91IHN0cm9uZ2x5IGZlZWwsIGFuZCBhY3QsIGxpa2UgYSB3b21hbi5cIjtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh2YWx1ZSA+PSA2MCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiWW91IGZlZWwsIGFuZCBhY3QsIGxpa2UgYSB3b21hbi5cIjtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh2YWx1ZSA+PSA0MCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiWW91IGRvbid0IGZlZWwgbm9yIGFjdCBsaWtlIGFueSBwYXJ0aWN1bGFyIGdlbmRlci5cIjtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh2YWx1ZSA+PSAyMCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiWW91IGZlZWwsIGFuZCBhY3QsIGxpa2UgYSBtYW4uXCI7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJZb3Ugc3Ryb25nbHkgZmVlbCwgYW5kIGFjdCwgbGlrZSBhIG1hbi5cIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgNTAsIDEwMFxyXG4gICAgKTtcclxuXHJcblxyXG4gICAgZXhwb3J0IGxldCBEZWdlbmVyYXRpb24gPSBuZXcgQXR0cmlidXRlKFxyXG4gICAgICAgIFwiRGVnZW5lcmF0aW9uXCIsXHJcbiAgICAgICAgdmFsdWUgPT4ge1xyXG4gICAgICAgICAgICBpZiAodmFsdWUgPj0gNzUpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBcIlNleCBpcyBhYm91dCB0aGUgb25seSB0aGluZyBvbiB5b3VyIG1pbmQsIGFuZCB5b3UgZG9uJ3QgZXZlbiB0cnkgdG8gaGlkZSBpdCBhbnltb3JlLlwiO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHZhbHVlID49IDYwKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJTb21ldGltZXMgeW91IGNhbid0IGhpZGUgaG93IG5hdWdodHkgeW91J2QgbGlrZSB0byBiZS5cIjtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh2YWx1ZSA+PSA0MCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiXCI7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodmFsdWUgPj0gMjApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBcIllvdXIgY29tcG9zdXJlIGlzIHBydWRpc2ggYW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AgICAgICAgICAgc2tpbGxzLnB1c2goU2tpbGwuU2tpbGxzW2tleV0pO1xyXG4gICAgICAgIH1cclxuICAgICAgICBza2lsbHMuc29ydCgoYSA6IFNraWxsLCBiIDogU2tpbGwpID0+IHtcclxuICAgICAgICAgICAgbGV0IG5hID0gYS5pZC50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgICAgICBsZXQgbmIgPSBiLmlkLnRvVXBwZXJDYXNlKCk7XHJcbiAgICAgICAgICAgIGlmIChuYSA+IG5iKSByZXR1cm4gMTtcclxuICAgICAgICAgICAgaWYgKG5hIDwgbmIpIHJldHVybiAtMTtcclxuICAgICAgICAgICAgcmV0dXJuIDA7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgcmV0dXJuIHNraWxscztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldFNraWxsIChpZCA6IHN0cmluZykge1xyXG4gICAgICAgIHJldHVybiBTa2lsbC5Ta2lsbHNbaWRdO1xyXG4gICAgfVxyXG59XHJcblxyXG5tb2R1bGUgU2tpbGxzIHtcclxuICAgIGV4cG9ydCBsZXQgU3Vydml2YWwgPSBuZXcgU2tpbGwoXHJcbiAgICBcIlN1cnZpdmFsXCIsXHJcbiAgICAodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgc3dpdGNoICh2YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgY2FzZSA1OiByZXR1cm4gXCJcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgNDogcmV0dXJuIFwiXCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDM6IHJldHVybiBcIlwiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAyOiByZXR1cm4gXCJcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMTogcmV0dXJuIFwiQWxlcnQgQ2hpaHVhaHVhXCI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICApO1xyXG59IiwiLy8gQSBjb250YWluZXIgaGF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W9ucygocGVyc29uIDogUGVyc29uLCBjaGFuZ2VzKSA9PiB7XHJcbiAgICAgICAgICAgIC8vIExldCdzIG5vdCBkbyB0aGlzIGZvciBOUENzLiBJdCBjYW4gYnJlYWsgcGF0Y2hlcy5cclxuICAgICAgICAgICAgaWYgKHBlcnNvbi5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoY2hhbmdlcy5TdGF0cyAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBuYW1lIGluIGNoYW5nZXMuU3RhdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF0dHIgPSBBdHRyaWJ1dGUuZ2V0QXR0cmlidXRlKG5hbWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXR0ciAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0U3RhdChhdHRyLCBjaGFuZ2VzLlN0YXRzW25hbWVdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmIChjaGFuZ2VzLlNraWxscyAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBuYW1lIGluIGNoYW5nZXMuU2tpbGxzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdHRyID0gU2tpbGwuZ2V0U2tpbGwobmFtZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhdHRyICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRTa2lsbChhdHRyLCBjaGFuZ2VzLlNraWxsc1tuYW1lXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbi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VmFsdWU6IFNheSA9IGF3YWl0IGFjdGlvbi5leGVjdXRlKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChcclxuICAgICAgICAgICAgICAgICAgICAgICAgKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlzaWJsZSB8fFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGVyc29uLmlzVmlzaWJsZVRvKFdvcmxkU3RhdGUucGxheWVyKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICApICYmIHByaW50VmFsdWUgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzQ29udGVudChwcmludFZhbHVlKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBleHBvcnQgdmFyIGluY3JlbWVudFR1cm5Db3VudGVyUnVsZSA9IEV2ZXJ5VHVybi5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBmaXJzdFByaW9yaXR5OiBSdWxlLlBSSU9SSVRZX0xPV0VTVCxcclxuICAgICAgICBwcmlvcml0eTogUnVsZS5QUklPUklUWV9MT1dFU1QsXHJcbiAgICAgICAgbmFtZTogXCJJbmNyZW1lbnQgVHVybiBDb3VudGVyXCIsXHJcbiAgICAgICAgY29kZTogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBXb3JsZFN0YXRlLmluY3JlbWVudFdvcmxkVHVybigpO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59IiwiLyoqXHJcbiAqIEN1cnJlbnQgcGxhbnM6XHJcbiAqIE1ha2UgY2hlY2tzIGhpZ2hlciBsZXZlbC4gSXQgc2hvdWxkIGJlIHNpbXBsZSB0byB3cml0ZSwgZXZlbiBpZiB0aGUgdW5kZX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cclxuICAgIHB1YmxpYyBnZXRDb250YWluZWQgKCkgOiBBcnJheTxUaGluZz4ge1xyXG4gICAgICAgIHJldHVybiA8QXJyYXk8VGhpbmc+PiBUaGluZy5JbnNpZGVSb29tUmVsYXRpb24uZ2V0UmlnaHQodGhpcyk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldENvbnRhaW5lZEFuZFZpc2libGVUbyAob2JzZXJ2ZXIgOiBUaGluZykgOiBBcnJheTxUaGluZz4ge1xyXG4gICAgICAgIGxldCBjb250YWluZWQgPSB0aGlzLmdldENvbnRhaW5lZCgpO1xyXG4gICAgICAgIGxldCByZXN1bHQgPSBbXTtcclxuXHJcbiAgICAgICAgY29udGFpbmVkLmZvckVhY2goKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIGlmICh2YWx1ZS52aXNpYmxlICYmIHZhbHVlICE9PSBvYnNlcnZlcikge1xyXG4gICAgICAgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJldHVybiByZXN1bHQ7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBESVJFQ1RJT05TIDogQXJyYXk8RGlyZWN0aW9uPiA9ICgoKSA9PiB7XHJcbiAgICAgICAgbGV0IGRpcmVjdGlvbnMgOiBBcnJheTxEaXJlY3Rpb24+ID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBPYmplY3Qua2V5cyhEaXJlY3Rpb24pLmxlbmd0aCAvIDI7IGkrKykge1xyXG4gICAgICAgICAgICBkaXJlY3Rpb25zLnB1c2goaSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBkaXJlY3Rpb25zO1xyXG4gICAgfSkoKTtcclxuXHJcbiAgICBwdWJsaWMgZ2V0Q29udGFpbmVkQW5kVmlzaWJsZSAoKSA6IEFycmF5PFRoaW5nPiB7XHJcbiA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IuY29ubmVjdGlvbnNbb3Bwb3NpdGVEaXJlY3Rpb25dID0gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdW5tYXBSb29tIChkaXJlY3Rpb24gOiBEaXJlY3Rpb24pIHtcclxuICAgICAgICBpZiAodGhpcy5jb25uZWN0aW9uc1tkaXJlY3Rpb25dICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBsZXQgciA9IHRoaXMuY29ubmVjdGlvbnNbZGlyZWN0aW9uXTtcclxuICAgICAgICAgICAgdGhpcy5jb25uZWN0aW9uc1tkaXJlY3Rpb25dID0gdW5kZWZpbmVkO1xyXG4gICAgICAgICAgICByLnVubWFwUm9vbShPcHBvc2l0ZURpcmVjdGlvbltkaXJlY3Rpb25dKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFByaW50ZWROYW1lICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5uYW1lO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRDb25uZWN0ZWRSb29tcyAoKSA6IEFycmF5PFJvb20+IHtcclxuICAgICAgICBsZXQgcm9vbXMgPSBbXTtcclxuICAgICAgICB0aGlzLmNvbm5lY3Rpb25zLmZvckVhY2gocm9vbSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChyb29tICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcm9vbXMucHVzaChyb29tKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIHJldHVybiByb29tcztcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFRoaXMgcmV0dXJucyB0aGUgYmVzdCBkaXJlY3Rpb24gdG8gZm9sbG93IGlmIGdvaW5nIGZyb20gdGhlIGN1cnJlbnQgcm9vbSB0byBhbm90aGVyIHJvb20uXHJcbiAgICAgKiBUSElTIENPREUgSVMgUkVBTExZIEVYUEVOU0lWRSBBTkQgU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20uRElSRUNUSU9OUy5sZW5ndGggZGlyZWN0aW9ucyB0byBtYWtlIGFub3RoZXIgY2FsbCwgZXRjLlxyXG4gICAgICAgICAqXHJcbiAgICAgICAgICogQHR5cGUge251bWJlcn1cclxuICAgICAgICAgKi9cclxuICAgICAgICBsZXQgbWF4U3RlcHMgPSAxMDtcclxuICAgICAgICBtYXhTdGVwcyA9IG1heFN0ZXBzID4gV29ybGRTdGF0ZS5nZXRNYXhpbXVtUmVtZW1iZXJlZFJvb21zKCkgPyBtYXhTdGVwcyA6IFdvcmxkU3RhdGUuZ2V0TWF4aW11bVJlbWVtYmVyZWRSb29tcygpO1xyXG5cclxuICAgICAgICBsZXQgcmVjdXJzaXZlQmVzdFBhdGggPSAoY1BhdGggOiBBcnJheTxSb29tPiwgY1Jvb20gOiBSb29tLCBkZXN0aW5hdGlvbiA6IFJvb20pID0+IHtcclxuICAgICAgICAgICAgLy8gSWdub3JlIFwiYmFkXCIgcm9vbXNcclxuICAgICAgICAgICAgaWYgKCF2YWxpZGl0eUNvZGUoY1Jvb20pKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLy8gUHJldmVudCB0aGUgY29kZSBmcm9tIHN0cmF5aW5nIHRvbyBmYXJcclxuICAgICAgICAgICAgaWYgKGNSb29tID09IGRlc3RpbmF0aW9uKSB7XHJcbiAgICAgICAgICAgICAgICBtYXhTdGVwcyA9IG1heFN0ZXBzID4gY1BhdGgubGVuZ3RoID8gY1BhdGgubGVuZ3RoIDogbWF4U3RlcHM7IC8vIFN0b3AgY29uc2lkZXJpbmcgd29yc2Ugcm91dGVzXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gY1BhdGg7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY1BhdGgubGVuZ3RoID4gbWF4U3RlcHMpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgcGF0aHMgPSBbXTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGluZGV4IGluIFJvb20uRElSRUNUSU9OUykge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkaXJlY3Rpb24gPSBSb29tLkRJUkVDVElPTlNbaW5kZXhdO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBuZXh0Um9vbSA9IGNSb29tLmNvbm5lY3Rpb25zW2RpcmVjdGlvbl07XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5leHRSb29tICE9IHVuZGVmaW5lZCAmJiBjUGF0aC5pbmRleE9mKG5leHRSb29tKSA9PSAtMSAmJiB2YWxpZGl0eUNvZGUobmV4dFJvb20pKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXRoID0gcmVjdXJzaXZlQmVzdFBhdGgoY1BhdGguY29uY2F0KFtuZXh0Um9vbV0pLCBuZXh0Um9vbSwgZGVzdGluYXRpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGF0aCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhzLnB1c2gocGF0aCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBsZXQgc2hvcnRlc3RJbmRleCA9IDA7XHJcbiAgICAgICAgICAgICAgICBwYXRocy5mb3JFYWNoKCh2YWx1ZSwgaW5kZXgsIGFycmF5KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmxlbmd0aCA8IHBhdGhzW3Nob3J0ZXN0SW5kZXhdLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzaG9ydGVzdEluZGV4ID0gaW5kZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gcGF0aHNbc2hvcnRlc3RJbmRleF07XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBsZXQgcGF0aHMgPSBBcnJheShSb29tLkRJUkVDVElPTlMubGVuZ3RoKTtcclxuICAgICAgICBsZXQgc2hvcnRlc3RJbmRleDtcclxuICAgICAgICBmb3IgKGxldCBpbmRleCBpbiBSb29tLkRJUkVDVElPTlMpIHtcclxuICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IFJvb20uRElSRUNUSU9OU1tpbmRleF07XHJcbiAgICAgICAgICAgIGxldCBuZXh0Um9vbSA9IHRoaXMuY29ubmVjdGlvbnNbZGlyZWN0aW9uXTtcclxuICAgICAgICAgICAgaWYgKG5leHRSb29tICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcGF0aHNbZGlyZWN0aW9uXSA9IHJlY3Vyc2l2ZUJlc3RQYXRoKFt0aGlzLCBuZXh0Um9vbV0sIG5leHRSb29tLCByb29tKTtcclxuICAgICAgICAgICAgICAgIGlmIChwYXRoc1tkaXJlY3Rpb25dICE9IHVuZGVmaW5lZCAmJiAoc2hvcnRlc3RJbmRleCA9PSB1bmRlZmluZWQgfHwgcGF0aHNbc2hvcnRlc3RJbmRleF0ubGVuZ3RoID4gcGF0aHNbZGlyZWN0aW9uXS5sZW5ndGgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2hvcnRlc3RJbmRleCA9IGRpcmVjdGlvbjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gc2hvcnRlc3RJbmRleDtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldERpcmVjdGlvblhZWiAoZGlyZWN0aW9uIDogRGlyZWN0aW9uKSB7XHJcbiAgICAgICAgdmFy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aXMuc29yZW5lc3MgLT0gKHRoaXMuc29yZW5lc3NQZXJUdXJuICogKGNUdXJuIC0gdGhpcy5sYXN0U29yZW5lc3NVcGRhdGUpKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zb3JlbmVzcyA8IDApIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNvcmVuZXNzID0gMDtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGlzLmxhc3RTb3JlbmVzc1VwZGF0ZSA9IGNUdXJuO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgY2hhbmdlU29yZW5lc3MgKHNvcmVuZXNzIDogbnVtYmVyKSB7XHJcbiAgICAgICAgdGhpcy51cGRhdGVTb3JlbmVzcygpO1xyXG4gICAgICAgIHRoaXMuc29yZW5lc3MgKz0gc29yZW5lc3M7XHJcbiAgICAgICAgaWYgKHRoaXMuc29yZW5lc3MgPCAwKSB7XHJcbiAgICAgICAgICAgIHRoaXMuc29yZW5lc3MgPSAwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0U29yZW5lc3MgKCkge1xyXG4gICAgICAgIHRoaXMudXBkYXRlU29yZW5lc3MoKTtcclxuICAgICAgICByZXR1cm4gdGhpcy5zb3JlbmVzcztcclxuICAgIH1cclxuXHJcblxyXG4gICAgcHVibGljIGdldFdlaWdodGVkU29yZW5lc3MoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuZ2V0U29yZW5lc3MoKSAqIHRoaXMuc29yZW5lc3NXZWlnaHQ7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNvcmVuZXNzV2VpZ2h0ICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5zb3JlbmVzc1dlaWdodDtcclxuICAgIH1cclxuXHJcbiAgICAvLyBUaGVzZSBhcmUgdGhlIHNsb3RzIHRoZSB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3ZlcmluZy5sZW5ndGg7IGsrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBpZHggPSB0aGlzLnZpc2libGVTbG90cy5pbmRleE9mKGNvdmVyaW5nW2tdKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaWR4ID49IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy52aXNpYmxlU2xvdHMuc3BsaWNlKGlkeCwgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnZpc2libGVTbG90cy5sZW5ndGggPT0gMCkgYnJlYWs7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzVW5jb3ZlcmVkICgpIHtcclxuICAgICAgICB0aGlzLnVwZGF0ZVZpc2liaWxpdHkoKTtcclxuICAgICAgICByZXR1cm4gdGhpcy52aXNpYmxlU2xvdHMubGVuZ3RoID09IHRoaXMuc2xvdHMubGVuZ3RoICYmIHRoaXMuc2xvdHMubGVuZ3RoID4gMDtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdXBkYXRlU3RhdHVzICgpIHtcclxuICAgICAgICB0aGlzLnVwZGF0ZVZpc2liaWxpdHkoKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldFNvcmVuZXNzICh0aGluZyA6IFRoaW5nKSB7XHJcbiAgICAgICAgbGV0IGJvZHlwYXJ0cyA9IFRoaW5nLlBhcnRSZWxhdGlvbi5nZXRSaWdodFR5cGUodGhpbmcsIEJvZHlwYXJ0KTtcclxuICAgICAgICBsZXQgc29yZW5lc3MgPSAwO1xyXG4gICAgICAgIGJvZHlwYXJ0cy5mb3JFYWNoKChib2R5cGFydCA6IEJvZHlwYXJ0KSA9PiB7XHJcbiAgICAgICAgICAgIHNvcmVuZXNzICs9IGJvZHlwYXJ0LmdldF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IGdldFNsdXR0aW5lc3MgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmdldEdlbmRlclZhbHVlKCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRHZW5kZXJGcm9tU2l6ZSAoc2l6ZSA6IG51bWJlcikge1xyXG4gICAgICAgIGlmIChzaXplIDw9IDApIHtcclxuICAgICAgICAgICAgcmV0dXJuIDIwO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoc2l6ZSA8PSAzKSB7XHJcbiAgICAgICAgICAgIHJldHVybiAyMCAqIHNpemU7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgcmV0dXJuIDgwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgYXJyYW5nZUdlbmRlclZhbHVlIChndiA6IG51bWJlcikge1xyXG4gICAgICAgIGlmIChndiA8PSAyMCkge1xyXG4gICAgICAgICAgICB0aGlzLnNpemUgPSAwO1xyXG4gICAgICAgICAgICB0aGlzLnNpbGljb25lID0gMDtcclxuICAgICAgICAgICAgdGhpcy5taWxrID0gMDtcclxuICAgICAgICB9IGVsc2UgaWYgKGd2IDwgODApIHtcclxuICAgICAgICAgICAgdGhpcy5zaXplID0gTWF0aC5yb3VuZChndiAvIDIwKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLnNpemUgPSA0O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufSIsIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi8uLi9Cb2R5cGFydC50c1wiIC8+XHJcbi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi8uLi9IdW1hbm9pZC9IdW1hbm9pZC50c1wiIC8+XHJcbi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi9TZXhTdGljay50c1wiIC8+XHJcbi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi9TZXhIb2xlLnRzXCIgLz5cclxuLy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GlvbnMoKHRoaW5nLCBjaGFuZ2VzKSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMuc2l6ZSA9IGNoYW5nZXMuU2l6ZTtcclxuICAgICAgICAgICAgdGhpcy5zaWxpY29uZSA9IGNoYW5nZXMuU2lsaWNvbmU7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNpemUgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnNpemUgKyB0aGlzLnNpbGljb25lO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRTaXplVGV4dCAoKSB7XHJcbiAgICAgICAgcmV0dXJuIEh1bWFub2lkQnV0dC5nZXRTaXplVGV4dCh0aGlzLmdldFNpemUoKSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRTaXplVGV4dCAoc2l6ZSA6IG51bWJlcikge1xyXG4gICAgICAgIGxldCBuYW1lcyA9IFtcImZsYXRcIiwgXCJ0aW55XCIsIFwicm91bmRcIiwgXCJwbHVtcFwiXTsgLy8gVE9ETzogZmluaXNoIHRoaXNcclxuICAgICAgICBpZiAoc2l6ZSA+PSBuYW1lcy5sZW5ndGgpIHtcclxuICAgICAgICAgICAgcmV0dXJuIFwiZ2FyZ2FudHVhblwiO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHJldHVybiBuYW1lc1tzaXplXTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEdlbmRlclZhbHVlICgpIHtcclxuICAgICAgICByZXR1cm4gSHVtYW5vaWRCcmVhc3RzLmdldEdlbmRlckZyb21TaXplKHRoaXMuZ2V0U2l6ZSgpKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldEdlbmRlckZyb21TaXplIChzaXplIDogbnVtYmVyKSB7XHJcbiAgICAgICAgaWYgKHNpemUgPD0gMCkge1xyXG4gICAgICAgICAg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biAgICB9XHJcblxyXG4gICAgcHVibGljIGdldERlc2NyaXB0aW9uICgpIHtcclxuICAgICAgICBsZXQgb3duZXIgPSA8UGVyc29uPiB0aGlzLmdldFBhcnRPbmUoKTtcclxuICAgICAgICBsZXQgZ3JlZW4gPSAob3duZXIuZ2V0U3RhdChBdHRyaWJ1dGVzLkNvcnJ1cHRpb24pID4gNTApO1xyXG5cclxuICAgICAgICBsZXQgc2F5ID0gbmV3IFNheShcIllvdXIgc2tpbiBpcyBcIik7XHJcblxyXG4gICAgICAgIGlmICh0aGlzLnNraW5Tb2Z0bmVzcyA+IDcpIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcInBlcmZlY3RseSBzbW9vdGhcIik7XHJcbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLnNraW5Tb2Z0bmVzcyA+IDQpIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcInNtb290aFwiKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBzYXkuYWRkKFwicm91Z2hcIik7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBzYXkuYWRkKFwiIGFuZCBcIik7XHJcblxyXG4gICAgICAgIGlmICh0aGlzLnNraW5IYWlyaW5lc3MgPiA4KSB7XHJcbiAgICAgICAgICAgIHNheS5hZGQoXCJoYWlyeSwgbGlrZSBhIGdvcmlsbGEnc1wiKVxyXG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5za2luSGFpcmluZXNzID4gNikge1xyXG4gICAgICAgICAgICBzYXkuYWRkKFwiaGFpcnlcIilcclxuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuc2tpbkhhaXJpbmVzcyA+IDMpIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcInNvbWV3aGF0IGhhaXJsZXNzXCIpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHNheS5hZGQoXCJjb21wbGV0ZWx5IGhhaXJsZXNzXCIpO1xyXG4gICAgICAgIH1cclxu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lzLnZpc2libGVPbiA9IFtdO1xyXG4gICAgICAgIHRoaXMudmlzaWJsZU9uLnB1c2goLi4udGhpcy5zbG90cyk7XHJcbiAgICAgICAgbGV0IHdlYXJlciA9IFRoaW5nLldlYXJSZWxhdGlvbi5nZXRMZWZ0KHRoaXMpO1xyXG4gICAgICAgIGlmICh3ZWFyZXIgPT0gdW5kZWZpbmVkKSByZXR1cm47XHJcblxyXG4gICAgICAgIGxldCBjbG90aHMgPSBUaGluZy5XZWFyUmVsYXRpb24uZ2V0UmlnaHQod2VhcmVyKTtcclxuICAgICAgICBsZXQgY292ZXJlZFNsb3RzID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjbG90aHMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgbGV0IHdvcm4gPSBjbG90aHNbaV07XHJcbiAgICAgICAgICAgIGlmICgod29ybiAhPSB0aGlzKSAmJiB3b3JuLmxheWVyID4gdGhpcy5sYXllcikge1xyXG4gICAgICAgICAgICAgICAgY292ZXJlZFNsb3RzLnB1c2goLi4ud29ybi5nZXRDb3ZlcmluZ1Nsb3RzKCkpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICB0aGlzLnZpc2libGVPbiA9IHRoaXMudmlzaWJsZU9uLmZpbHRlcih2aXNpYmxlID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIGNvdmVyZWRTbG90cy5pbmRleE9mKHZpc2libGUpID09IC0xO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmlzVmlzaWJsZSA9IHRoaXMudmlzaWJsZU9uLmxlbmd0aCA+IDA7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldENvdmVyaW5nU2xvdHMgKCkge1xyXG4gICAgICAgIGlmICh0aGlzLnRyYW5zcGFyZW50U2xvdHMubGVuZ3RoID09IDApIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2xvdHMuc2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9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgbm91biA9IGFjdGlvbi5nZXRDbG90aGluZygpO1xyXG4gICAgICAgICAgICBpZiAoIShub3VuIGluc3RhbmNlb2YgQ2xvdGhpbmcpKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0aW9uLmFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgY2FuIG9ubHkgcmVtb3ZlIENsb3RoaW5nLlwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgY2hlY2tJc0hlbGQgPSBBY3Rpb25SZW1vdmUuY2hlY2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiSXMgbm91biB3b3JuXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfSElHSCxcclxuICAgICAgICBjb2RlIDogYXN5bmMgKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPEFjdGlvblJlbW92ZT4pID0+IHtcclxuICAgICAgICAgICAgbGV0IGFjdGlvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgbm91biA9IGFjdGlvbi5nZXRDbG90aGluZygpO1xyXG4gICAgICAgICAgICBpZiAoIVRoaW5nLldlYXJSZWxhdGlvbi5pc1JpZ2h0KGFjdGlvbi5hY3Rvciwgbm91bikpIHtcclxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb24uYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBhcmUgbm90IHdlYXJpbmcga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CJJcyBub3VuIGEgY2xvdGhpbmdcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxyXG4gICAgICAgIGNvZGUgOiAocnVubmVyIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uV2Vhcj4pID0+IHtcclxuICAgICAgICAgICAgbGV0IGFjdGlvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgbm91biA9IGFjdGlvbi5nZXRDbG90aGluZygpO1xyXG4gICAgICAgICAgICBpZiAoIShub3VuIGluc3RhbmNlb2YgQ2xvdGhpbmcpKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0aW9uLmFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgY2FuIG9ubHkgd2VhciBDbG90aGluZy5cIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGNoZWNrSXNIZWxkID0gQWN0aW9uV2Vhci5jaGVjay5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJJcyBub3VuIGhlbGRcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdILFxyXG4gICAgICAgIGNvZGUgOiBhc3luYyAocnVubmVyIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uV2Vhcj4pID0+IHtcclxuICAgICAgICAgICAgbGV0IGFjdGlvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgbm91biA9IGFjdGlvbi5nZXRDbG90aGluZygpO1xyXG4gICAgICAgICAgICBpZiAoIVRoaW5nLkNhcnJ5UmVsYXRpb24uaXNSaWdodChhY3Rpb24uYWN0b3IsIG5vdW4pKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0aW9uLmFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCIoZmlyc3QgdGFraW5nIHRoZSBcIiwgbm91biwgXCIpXCIsIFNheS5MSU5FX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGxldCB0YWtpbmdBY3Rpb24gPSBuZXcgQWN0aW9uVGFrZShhY3Rpb24uYWN0b3IsIG5vdW4pO1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgdGFraW5nQWN0aW9uLmV4ZWN1dGUoKTtcclxuICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKHRha2luZ0FjdGlvbi5zYXkpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFUaGluZy5DYXJyeVJlbGF0aW9uLmlzUmlnaHQoYWN0aW9uLmFjdG9yLCBub3VuKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgY2FycnlEZWZhdWx0ID0gQWN0aW9uV2Vhci5jYXJyeS5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJTZXQgQ2xvdGhpbmcgYXMgV29yblwiLFxyXG4gICAgICAgIGZpcnN0UHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX01FRElVTSxcclxuICAgICAgICBjb2RlIDogKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPEFjdGlvbldlYXI+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IG5vdW4gPSBhY3Rp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WQuU0VYX01BTEUpIHtcclxuICAgICAgICAgICAgICAgICAgICBodW1hbm9pZC5hZGRNYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhbmdlcy5IdW1hbm9pZEdlbmRlciA9PSBIdW1hbm9pZC5TRVhfRkVNQUxFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaHVtYW5vaWQuYWRkRmVtYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaHVtYW5vaWQuYWRkTWFsZVBhcnRzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgaHVtYW5vaWQuYWRkRmVtYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyB1cGRhdGVCb2R5cGFydHMgKCkge1xyXG4gICAgICAgIGxldCBwYXJ0cyA9IDxBcnJheTxCb2R5cGFydD4+IFRoaW5nLlBhcnRSZWxhdGlvbi5nZXRSaWdodFR5cGUodGhpcywgQm9keXBhcnQpO1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGFydHMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgcGFydHNbaV0udXBkYXRlU3RhdHVzKCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyB1cGRhdGVDbG90aGluZyAoKSB7XHJcbiAgICAgICAgbGV0IGNsb3RoZXMgPSA8QXJyYXk8Q2xvdGhpbmc+PiBUaGluZy5XZWFyUmVsYXRpb24uZ2V0UmlnaHRUeXBlKHRoaXMsIENsb3RoaW5nKTtcclxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNsb3RoZXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgY2xvdGhlc1tpXS51cGRhdGVTdGF0dXMoKTt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dHMuaW5kZXhPZihIdW1hbm9pZC5TTE9UX0JVVFQpICE9IC0xKSB7XHJcbiAgICAgICAgICAgICAgICBidXR0cy5wdXNoKGNsb3RoKTtcclxuICAgICAgICAgICAgICAgIGlmIChjbG90aC50cmFuc3BhcmVudFNsb3RzLmluZGV4T2YoSHVtYW5vaWQuU0xPVF9CVVRUKSA9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaXNCdXR0VmlzaWJsZSA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChjbG90aC5zbG90cy5pbmRleE9mKEh1bWFub2lkLlNMT1RfQ1JPVENIX0ZST05UKSAhPSAtMSkge1xyXG4gICAgICAgICAgICAgICAganVua3MucHVzaChjbG90aCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoY2xvdGgudHJhbnNwYXJlbnRTbG90cy5pbmRleE9mKEh1bWFub2lkLlNMT1RfQ1JPVENIX0ZST05UKSA9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaXNDcm90Y2hWaXNpYmxlID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy51cGRhdGVCcmVhc3RTaXplcyhicmFzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUNyb3RjaFNpemVzKGp1bmtzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUJ1dHRTaXplcyhidXR0cyk7XHJcblxyXG4gICAgICAgIHRoaXMuY2FjaGVkQnVsZ2VzID0ge1xyXG4gICAgICAgICAgICBicmVhc3RzIDogdGhpcy5icmVhc3RWaXNpYmxlU2l6ZSxcclxuICAgICAgICAgICAgYnV0dCA6IHRoaXMuYnV0dFZpc2libGVTaXplLFxyXG4gICAgICAgICAgICBjcm90Y2ggOiB0aGlzLmNyb3RjaFZpc2libGV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GFydFJlbGF0aW9uLmdldFJpZ2h0VHlwZU9uZSh0aGlzLCBIdW1hbm9pZFRlc3RpY2xlcyk7XHJcbiAgICAgICAgdGhpcy5jcm90Y2hWaXNpYmxlU2l6ZSA9IDA7XHJcbiAgICAgICAgaWYgKHBlbmlzICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICB0aGlzLmNyb3RjaFZpc2libGVTaXplICs9IHBlbmlzLmdldEJ1bGdlU2l6ZSgpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodGVzdGljbGVzICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICB0aGlzLmNyb3RjaFZpc2libGVTaXplICs9IHRlc3RpY2xlcy5nZXRCdWxnZVNpemUoKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHRoaXMuY3JvdGNoVmlzaWJsZVNpemUgPSBNYXRoLmZsb29yKHRoaXMuY3JvdGNoVmlzaWJsZVNpemUgKiAxMCkgLyAxMDtcclxuXHJcbiAgICAgICAgY2xvdGhzLmZvckVhY2goKHdvcm4gOiBDbG90aGluZykgPT4ge1xyXG4gICAgICAgICAgICBpZiAod29ybi50aWdodENyb3RjaFNpemUgPj0gMCAmJiB0aGlzLmNyb3RjaFZpc2libGVTaXplID4gd29ybi50aWdodENyb3RjaFNpemUpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuaXNDcm90Y2hUaWdodCA9IHRydWU7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh3b3JuLm1heENyb3RjaFNpemUgPj0gMCAmJiB0aGlzLmNyb3RjaFZpc2libGVTaXplID4gd29ybi5tYXhDcm90Y2hTaXplKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNyb3RjaFZpc2libGVTaXplID0gd29ybi5tYXhDcm90Y2hTaXplO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICB0aGlzLmNyb3RjaFZpc2libGVTaXplICs9IHdvcm4uY3J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ICAgfVxyXG5cclxuICAgICAgICBpZiAocGxheWVyR2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgaWYgKHBsYXllckdlbmRlci5oYXNQZW5pcyB8fCBwbGF5ZXJHZW5kZXIuaGFzUGVuaXNCdWxnZSkge1xyXG4gICAgICAgICAgICAgICAgLy8gU2hlbWFsZSBTdGF0dXMgKFRpdHMgKyBQZW5pcylcclxuICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJzaGVtYWxlXCIpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBsYXllckdlbmRlci5oYXNWYWdpbmEpIHtcclxuICAgICAgICAgICAgICAgIC8vIGlzIGEgd29tYW5cclxuICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJ3b21hblwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIC8vIE5vIHRpdHNcclxuICAgICAgICAgICAgaWYgKHBsYXllckdlbmRlci5oYXNQZW5pcykge1xyXG4gICAgICAgICAgICAgICAgLy8gU2ltcGx5IG1hbGVcclxuICAgICAgICAgICAgICAgIGlmIChwbGF5ZXJHZW5kZXIuZ2VuZGVyVmFsdWVDb3JyZWN0ZWQgPCA2MCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJtYW5cIik7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJ0cmFwXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBsYXllckdlbmRlci5oYXNQZW5pc0J1bGdlKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBQb3NzaWJsZSBTaGVtYWxlIHN0YXR1cyAtIGhhcyBidWxnZSBhbmQgdGl0cyBtYXliZSBnZXQgYmV0dGVyIHRlcm1zIHNvbWV0aW1lXHJcbiAgICAgICAgICAgICAgICBpZiAocGxheWVyR2VuZGVyLmdlbmRlclZhbHVlQ29ycmVjdGVkIDwgNjApIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwibWFuXCIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwidHJhcFwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChwbGF5ZXJHZW5kZXIuaGFzVmFnaW5hKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBpcyBhIHdvbWFuXHJcbiAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwid29tYW5cIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBwcmVzZW50YXRpb247XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBTTE9UX0hBSVIgPSAwO1xyXG4gICAgcHVibGljIHN0YXRpYyBTTE9UX0hFQURHRUFSID0gMTtcclxuICAgIHB1YmxpYyBzdGF0aWMgU0xPVF9GQUNFID0gMjtcclxuICAgIHB1YmxpYyBzdGF0aWMgU0xPVF9FQVJTID0gMztcclxuICAgIHB1YmxpYyBzdGF0aWMgU0xPVF9FWUVTID0gNDtcclxuICAgIHB1YmxpYyBzdGF0aWMgU0xPVF9OT1NFID0gNTtcclxuICAgIHB1YmxpYyBzdGF0aWMgU0xPVF9NT1VUSCA9IDY7XHJcbiAgICBwdWJsaWMgc3RhdGljIFNMT1RfTkVDSyA9IDc7XHJcbiAgICBwdWJsaWMgc3RhdGljIFNMT1RfU0hPVUxERVJTID0gODtcclxuICAgIHB1YmxpYyBzdGF0aWMgU0xPVF9BUk1TID0gOTtcclxuICAgIHB1YmxpYyBzdGF0aWMgU0xPVF9IQU5EUyA9IDEwO1xyXG4gICAgcHVibG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ICAgIGlmIChjb3ZlcmVkUGVyYyA+IDAuNykge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheS5hZGQoXCIsIGFsdGhvdWdoIGl0J3MgY292ZXJlZFwiKVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb3ZlcmVkUGVyYyA8IDAuMikge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheS5hZGQoXCIsIHByb3VkbHkgZGlzcGxheWVkIGZvciBhbGwgdG8gc2VlXCIpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiLlwiKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChib2R5cGFydFNsdXR0aW5lc3NGaW5hbCA8IDMwKSB7XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiWW91IGhhdmUgdmVyeSBsaXR0bGUgc2V4LWFwcGVhbCwgbWF5YmUgeW91IGFyZSBhIGtpdGNoZW4gdGFibGU/XCIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvdmVyZWRQZXJjID4gMC43KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChcIiBBdCBsZWFzdCB5b3UgY292ZXJlZCBpdCB1cC5cIilcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY292ZXJlZFBlcmMgPCAwLjIpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKFwiIE1heWJlIHlvdSBjb3VsZCBjb3ZlciBpdCB1cCBhIGJpdC5cIilcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgc2F5LmFkZChTYXkuUEFSQUdSQVBIX0JSRUFLKTtcclxuXHJcblxyXG5cclxuICAgICAgICBsZXQgc3RhdHMgPSBuZXcgU2F5TGVmdFJpZ2h0KCk7XHJcblxyXG4gICAgICAgIHN0YXRzLmFkZExlZnQobmV3IFNheUJvbGQoXCJTdHJlbmd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XG4gICAgICAgICAgICBsZXQgbWFwcyA9IDxBcnJheTxNYXBOb3RlPj4gVGhpbmcuQ2FycnlSZWxhdGlvbi5nZXRSaWdodFR5cGUocGxheWVyLCBNYXBOb3RlKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBtYXBzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAobWFwc1tpXS5jb250YWlucyhydW5uZXIubm91bikpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIGV4cG9ydCBhc3luYyBmdW5jdGlvbiBpc1Jvb21SZW1lbWJlcmVkIChyb29tIDogUm9vbSkgOiBQcm9taXNlPGJvb2xlYW4+IHtcclxuICAgICAgICBsZXQgcmVzdWx0ID0gYXdhaXQgUmVtZW1iZXJpbmdSb29tUnVsZWJvb2suZXhlY3V0ZSh7bm91biA6IHJvb219KTtcclxuICAgICAgICByZXR1cm4gcmVzdWx0ID09IHRydWU7IC8vIGNhbiByZXR1cm4gXCJ1bmRlZmluZWRcIlxyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBnZXRSZW1lbWJlcmVkUm9vbXMgKCkge1xyXG4gICAgICAgIHJldHVybiByZW1lbWJlcmVkUm9vbXMudmFsdWU7XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIGdldFJlbWVtYmVyZWRSb29tc0FzUm9vbXMgKCkgOiBBcnJheTxSb29tPiB7XHJcbiAgICAgICAgbGV0IHJvb21zID0gW107XHJcbiAgICAgICAgcmVtZW1iZXJlZFJvb21zLnZhbHVlLmZvckVhY2gocm9vbU5hbWUgPT4ge1xyXG4gICAgICAgICAgICBsZXQgcm9vbSA9IFJvb20uZ2V0Um9vbShyb29tTmFtZSk7XHJcbiAgICA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pID09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbWVtYmVyZWRGb2RkZXIucHVzaCh2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgaWR4ID0gcmVtZW1iZXJlZFJvb21zLnZhbHVlLmluZGV4T2YodmFsdWUuZ2V0TmFtZSgpKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaWR4ICE9IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbWVtYmVyZWRSb29tcy52YWx1ZS5zcGxpY2UoaWR4LCAxKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmVtZW1iZXJlZFJvb21zLnZhbHVlLnVuc2hpZnQodmFsdWUuZ2V0TmFtZSgpKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIHRydW5jYXRlUm9vbXMoKTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gc2F2ZVN0YXRlICgpIHtcclxuICAgICAgICBsZXQgdGhpbmdzID0ge1xyXG4gICAgICAgICAgICBjYXJyaWVkOiBbXSxcclxuICAgICAgICAgICAgd29ybjogW10sXHJcbiAgICAgICAgICAgIHdpZWxkZWQ6IFtdXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgVGhpbmdzIDogdGhpbmdzXHJcbiAgICAgICAgfTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgbGV0IENvcnJlY3RSZW1lbWJlcmVkUm9vbXNSdWxlID0gUGxheUJlZ2lucy5ydWxlYm9vay5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJDb3JyZWN0IHJlbWVtYmVyZWQgcm9vbXNcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9MT1dFU1QsXHJcbiAgICAgICAgcHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX01FRElVTSxcclxuICAgICAgICBjb2RlIDogKCkgPT4ge1xyXG4gICAgICAgICAgICBsZXQgYWxsUm9vbXMgPSByZW1lbWJlcmVkUm9vbXMudmFsdWU7XHJcbiAgICAgICAgICAgIGxldCBjdXJyZW50Um9vbSA9IFdvcmxkU3RhdGUucGxheWVyLmdldFJvb20oKTtcclxuICAgICAgICAgICAgaWYgKGFsbFJvb21zLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICByZW1lbWJlcmVkUm9vbXMudmFsdWUgPSBbY3VycmVudFJvb20uZ2V0TmFtZSgpXTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBsZXQgbmV3Um9vbXMgPSBbXTtcclxuXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIHJlY3Vyc2l2ZWx5QWRkUm9vbXMgKHJvb20gOiBSb29tKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAocm9vbSBpbnN0YW5jZW9mIFJvb21SYW5kb20pIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocm9vbS5mb2RkZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVtZW1iZXJlZEZvZGRlci5wdXNoKHJvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByb29tLmNvbm5lY3Rpb25zLmZvckVhY2goKG5ld1Jvb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY3Vyc2l2ZWx5QWRkUm9vbXMobmV3Um9vbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYWxsUm9vbXMuaW5kZXhPZihyb29tLmdldE5hbWUoKSkgIT0gLTEgJiYgbmV3Um9vbXMuaW5kZXhPZihyb29tLmdldE5hbWUoKSkgPT0gLTEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmV3Um9vbXMucHVzaChyb29tLmdldE5hbWUoKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvb20uY29ubmVjdGlvbnMuZm9yRWFjaCgobmV3Um9vbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjdXJzaXZlbHlBZGRSb29tcyhuZXdSb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICByZWN1cnNpdmVseUFkZFJvb21zKGN1cnJlbnRSb29tKTtcclxuICAgICAgICAgICAgcmVtZW1iZXJlZFJvb21zLnZhbHVlID0gbmV3Um9vbXM7XHJcbiAgICAgICAgfVxyXG4gICAgfSlcclxufSIsIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCJSZWxhdGlvbnMvUmVsYXRpb25PbmVUb01hbnkudHNcIiAvPlxyXG5jbGFzcyBSZWdpb24ge1xyXG4gICAgcHVibGljIG5hbWUgOiBzdHJpbmc7XHJcblxyXG4gICAgcHVibGljIGNvbnN0cnVjdG9yIChuYW1lIDogc3RyaW5nKSB7XHJcbiAgICAgICAgdGhpcy5uYW1lID0gbmFtZTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIFJlZ2lvblJvb20gPSBuZXcgUmVsYXRpb25PbmVUb01hbnkoKTtcclxuICAgIHB1YmxpYyBzdGF0aWMgUmVnaW9uUmVnaW9uID0gbmV3IFJlbGF0aW9uT25lVG9NYW55KCk7XHJcbiAgICBwdWJsaWMgc3RhdGljIEluUmVsYXRpb24gPSBuZXcgUmVsYXRpb25IYW5kbGVyU3RyaWN0T25lVG9NYW55KFJlZ2lvbi5SZWdpb25SZWdpb24sIFJlZ2lvbi5SZWdpb25Sb29tKTtcclxuXHJcbiAgICBwdWJsaWMgcGxhY2UgKC4uLnJvb21zIDogQXJyYXk8Um9vbSB8IFJlZ2lvbj4pIHtcclxuICAgICAgICByb29tcy5mb3JFYWNoKHJvb20gPT4ge1xyXG4gICAgICAgICAgICBpZiAocm9vbSBpbnN0YW5jZW9mIFJvb20pIHtcclxuICAgICAgICAgICAgICAgIFJlZ2lvbi5SZWdpb25Sb29tLnNldFJlbGF0aW9uKHRoaXMsIHJvb20pO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgUmVnaW9uLlJlZ2lvblJlZ2lvbi5zZXRSZWxhdGlvbih0aGlzLCByb29tKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRSb29tcyAoKSB7XHJcbiAgICAgICAgbGV0IHJvb21zID0gPEFycmF5PFJvb20+PiBSZWdpb24uUmVnaW9uUm9vbS5nZXRSaWdodCh0aGlzKTtcclxuICAgICAgICBSZWdpb24uUmVnaW9uUmVnaW9uLmdldFJpZ2h0KHRoaXMpLmZvckVhY2goKHJlZ2lvbiA6IFJlZ2lvbikgPT4ge1xyXG4gICAgICAgICAgICAoPEFycmF5PFJvb20+PiBSZWdpb24uUmVnaW9uUm9vbS5nZXRSaWdodChyZWdpb24pKS5mb3JFYWNoKChyb29tIDogUm9vbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgcm9vbXMucHVzaChyb29tKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgcmV0dXJuIHJvb21zO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBjb250YWluc1Jvb20gKHJvb20gOiBSb29tKSB7XHJcbiAgICAgICAgbGV0IGRpcmVjdGx5Q29udGFpbmVkID0gUmVnaW9uLlJlZ2lvblJvb20uZ2V0TGV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HJcbiAgICAgICAgaWYgKHRoaXMucG9zaXRpb24gPj0gdGhpcy5hcnJheS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgICAgICB9XHJcbiAgICAgICAgbGV0IHJhbmRvbUluZGV4ID0gTWF0aC5mbG9vcih0aGlzLnJuZygpICogKHRoaXMuYXJyYXkubGVuZ3RoIC0gdGhpcy5wb3NpdGlvbikpICsgdGhpcy5wb3NpdGlvbjtcclxuICAgICAgICBsZXQgbG9jYWxDb3B5ID0gdGhpcy5hcnJheVt0aGlzLnBvc2l0aW9uXTtcclxuICAgICAgICB0aGlzLmFycmF5W3RoaXMucG9zaXRpb25dID0gdGhpcy5hcnJheVtyYW5kb21JbmRleF07XHJcbiAgICAgICAgdGhpcy5hcnJheVtyYW5kb21JbmRleF0gPSBsb2NhbENvcHk7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYXJyYXlbdGhpcy5wb3NpdGlvbisrXTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFRoZXJlIHNob3VsZCBiZSBubyByZWFzb24gdG8gdXNlIHRoaXMgd2l0aCB0aGUgXCJnZXRPbmVcIiBjb2RlIGFib3ZlLlxyXG4gICAgICogQHJldHVybnMge1RbXX1cclxuICAgICAqL1xyXG4gICAgcHVibGljIGdldFNodWZmbGVkICgpIDogQXJyYXk8VD4ge1xyXG4gICAgICAgIGxldCBhcnJheSA9IHRoaXMuYXJyYXkuc2xpY2UoMCk7XHJcbiAgICAgICAgdmFyIG0gPSBhcnJheS5sZW5ndGgsIHQsIGk7XHJcbiAgICAgICAgd2hpbGUgKG0pIHtcclxuICAgICAgICAgICAgaSA9IE1hdGguZmxvb3IodGhpcy5ybmcoKSAqIG0tLSk7XHJcbiAgICAgICAgICAgIHQgPSBhcnJheVttXTtcclxuICAgICAgICAgICAgYXJyYXlbbV0gPSBhcnJheVtpXTtcclxuICAgICAgICAgICAgYXJyYXlbaV0gPSB0O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIGFycmF5O1xyXG4gICAgfVxyXG59IiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL0FJLnRzXCIgLz5cclxubW9kdWxlIEFJUnVsZXMge1xyXG4gICAgZXhwb3J0IHZhciBQaWNrU2hpbnkgPSBBSS5ydWxlcy5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJQaWNrIFNoaW5pZXNcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogQUlSdWxlcy5QUklPUklUWV9BQ1RJTkdfT05fUExBQ0UsXHJcbiAgICAgICAgY29uZGl0aW9ucyA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxQZXJzb24+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwZXJzb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgcmV0dXJuIHBlcnNvbi5BSS5waWNrc1NoaW5pZXM7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb2RlIDogKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPFBlcnNvbj4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgcm9vbSA9IHBlcnNvbi5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgIGxldCB2aXNpYmxlVGhpbmdzID0gcm9vbS5nZXRDb250YWluZWRBbmRWaXNpYmxlVG8ocGVyc29uKTtcclxuXHJcbiAgICAgICAgICAgIGlmICh2aXNpYmxlVGhpbmdzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdmlzaWJsZVRoaW5ncy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghdmlzaWJsZVRoaW5nc1tpXS5maXhlZEluUGxhY2UgJiYgdmlzaWJsZVRoaW5nc1tpXS5nZXRTaGlueSgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgQWN0aW9uVGFrZShwZXJzb24sIHZpc2libGVUaGluZ3NbaV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59IiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL0FJLnRzXCIgLz5cclxubW9kdWxlIEFJUnVsZXMge1xyXG4gICAgZXhwb3J0IHZhciBXYW5kZXIgPSBBSS5ydWxlcy5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJXYW5kZXJcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogQUlSdWxlcy5QUklPUklUWV9BQ1RJTkdfT05fSURMRSxcclxuICAgICAgICBjb25kaXRpb25zIDogKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPFBlcnNvbj4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICByZXR1cm4gcGVyc29uLkFJLndhbmRlcmVyICYmIChNYXRoLnJhbmRvbSgpICogMTAwKSA+IHBlcnNvbi5BSS53YW5kZXJDaGFuY2U7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb2RlIDogKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPFBlcnNvbj4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgcm9vbSA9IDxSb29tUmFuZG9tPiBwZXJzb24uZ2V0Um9vbSgpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHBlcnNvbi5BSS53YW5kZXJzT24gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBzdGljayB0byByZWdpb24gd2hpbGUgd2FuZGVyaW5nXHJcbiAgICAgICAgICAgICAgICBpZiAocGVyc29uLkFJLndhbmRlcnNPbi5jb250YWluc1Jvb20ocm9vbSkpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBBbHJlZHkgaW4gcmVnaW9uLCBzbyBqdXN0IHdhbmRlciBvZmYgaW5zaWRlIGl0XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbm5lY3Rpb25zID0gcm9vbS5jb25uZWN0aW9ucy5zbGljZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZWFsQ29ubmVjdGlvbnMgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbm5lY3Rpb25zLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25uZWN0aW9uc1tpXSAhPSB1bmRlZmluZWQgJiYgcGVyc29uLkFJLndhbmRlcnNPbi5jb250YWluc1Jvb20oY29ubmVjdGlvbnNbaV0pKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFsQ29ubmVjdGlvbnMucHVzaChpKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aW9uID0gKChuZXcgU2h1ZmZsZXIocmVhbENvbm5lY3Rpb25zKSkuZ2V0T25lKCkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgQWN0aW9uR28ocGVyc29uLCBkaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyByZXR1cm4gdG8gcmVnaW9uXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlZ2lvblJvb21zID0gcGVyc29uLkFJLndhbmRlcnNPbi5nZXRSb29tcygpLmZpbHRlcigoYSA6IFJvb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGEgaW5zdGFuY2VvZiBSb29tUmFuZG9tICYmIGEucGxhY2VkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIElkZWFsbHkgd2UnZCBhY3R1YWxseSBtYWtlIGEgcGF0aCB0byBpdCBhbmQgY2hlY2sgdGhlIGRpc3RhbmNlLCBzaW5jZSBtYXplcyBjYW4gbWFrZSBpdCBiZSBsb25nZXIgdGhhbiBpdCByZWFsbHkgaXNcclxuICAgICAgICAgICAgICAgICAgICAvLyBCdXQgdGhpcyBpcyBxdWljayBhbmQgZGlydHkgZW5vdWdoLiBBbmQgc2luY2UgcmVnaW9ucyBhcmUgY2xvc2VseSBwYWNrZWQsIGV2ZW4gaWYgdGhpcyBpcyBub3QgcmVhbGx5IHRoZSBjbG9zZXN0IHJvb20sIHRoZSBOUEMgd2lsbCBlbmQgdXBcclxuICAgICAgICAgICAgICAgICAgICAvLyBlbnRlcmluZyB0aGUgcmVnaW9uIGVhcmxpZXIgYnkgYWNjaWRlbnQuXHJcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uUm9vbXMuc29ydCgoYSA6IFJvb21SYW5kb20sIGIgOiBSb29tUmFuZG9tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkaXN0ID0gYS5nZXREaXN0YW5jZVRvKGIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGlzdCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtZGlzdDsgLy8gVGhpcyBtZWFucyB0aGF0IHRoZSBsYXRlc3QgZWxlbWVudCB3aWxsIGJlIHRoZSBjbG9zZXN0LlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9I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aW5nU29ydCk7XHJcbiAgICAgICAgICAgIGxldCBjYXJyaWVkID0gVGhpbmcuQ2FycnlSZWxhdGlvbi5nZXRSaWdodChwbGF5ZXIpLnNvcnQoRWxlbWVudHMuSW52ZW50b3J5SGFuZGxlci50aGluZ1NvcnQpO1xyXG5cclxuICAgICAgICAgICAgbGV0IGJ1dHRvbnM7XHJcbiAgICAgICAgICAgIGxldCBjaG9zZW5Qcm9taXNlID0gbmV3IFByb21pc2UoKGFzeW5jIHJlc29sdmUgPT4ge1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5yZXNldCgpO1xyXG4gICAgICAgICAgICAgICAgbGV0IHNheSA9IG5ldyBTYXkoKTtcclxuICAgICAgICAgICAgICAgIGlmICh3aWVsZGVkLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKG5ldyBTYXlCb2xkKFwiV2llbGRlZDpcIiksIFNheS5MSU5FX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHdpZWxkZWQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChhd2FpdCBBY3Rpb25JbnZlbnRvcnkuY3JlYXRlQnV0dG9uKHdpZWxkZWRbaV0sIHJlc29sdmUpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKHdvcm4ubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzYXkuc2VxdWVuY2UubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKFNheS5QQVJBR1JBUEhfQlJFQUspO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKG5ldyBTYXlCb2xkKFwiV29ybjpcIiksIFNheS5MSU5FX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHdvcm4ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChhd2FpdCBBY3Rpb25JbnZlbnRvcnkuY3JlYXRlQnV0dG9uKHdvcm5baV0sIHJlc29sdmUpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKGNhcnJpZWQubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzYXkuc2VxdWVuY2UubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKFNheS5QQVJBR1JBUEhfQlJFQUspO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKG5ldyBTYXlCb2xkKFwiQ2FycmllZDpcIiksIFNheS5MSU5FX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNhcnJpZWQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChhd2FpdCBBY3Rpb25JbnZlbnRvcnkuY3JlYXRlQnV0dG9uKGNhcnJpZWRbaV0sIHJlc29sdmUpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKHNheS5zZXF1ZW5jZS5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKHVuZGVmaW5lZCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgYnV0dG9ucyA9IGF3YWl0IHNheS5nZXRIVE1MQ29udGVudCgpO1xyXG4gICAgICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50KC4uLihidXR0b25zKSk7XHJcbiAgICAgICAgICAgIH0pKTtcclxuXHJcbiAgICAgICAgICAgIGxldCBjaG9zZW5UaGluZyA9IGF3YWl0IGNob3NlblByb21pc2U7XHJcbiAgICAgICAgICAgIGlmIChjaG9zZW5UaGluZyAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci51bnByaW50KC4uLmJ1dHRvbnMpO1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5yZXNldCgpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBBY3Rpb25FeGFtaW5lKFdvcmxkU3RhdGUucGxheWVyLCBjaG9zZW5UaGluZyk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBydWxlYm9vay5ub3VuLnNheS5hZGQoXCJZb3UgaGF2ZSBub3RoaW5nLlwiKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59XHJcblxyXG5FbGVtZW50cy5IeXBlcmxpbmtIYW5kbGVyLkNvbW1vbkFjdGlvbnNSdWxlYm9vay5hZGRSdWxlKG5ldyBSdWxlKHtcclxuICAgIG5hbWUgOiBcIkFkZCBUYWtlIEludmVudG9yeSBDb21tYW5kIFJ1bGVcIixcclxuICAgIGZpcnN0UHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX0xPV0VTVCxcclxuICAgIHByaW9yaXR5IDogUnVsZS5QUklPUklUWV9NRURJVU0sXHJcbiAgICBjb2RlIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8dm9pZD4pID0+IHtcclxuICAgICAgICBFbGVtZW50cy5IeXBlcmxpbmtIYW5kbGVyLmFkZENvbW1vb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ID0gdGhpcy5nZXRVbm1hdGNoZWQoY2QpO1xyXG4gICAgICAgIGlmICgoYWxsb3dQYXJ0aWFsIHx8IGNoZWNrLnVubWF0Y2hlZC5sZW5ndGggPT0gMCkgJiYgY2hlY2subWF0Y2hpbmcubGVuZ3RoID09IDApIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfSBlbHNlIGlmIChjaGVjay5tYXRjaGluZy5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNoZWNrLnVubWF0Y2hlZC5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgaWYgKCEoY2hlY2sudW5tYXRjaGVkW2ldIGluc3RhbmNlb2YgQ29udGVudE1hcmtlcikpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgoPENvbnRlbnRNYXJrZXI+IGNoZWNrLnVubWF0Y2hlZFtpXSkuaXNJbXBvcnRhbnQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFVubWF0Y2hlZCAoY2QgOiBDb250ZW50RGlmZmVyZW50aWFsKSA6IENvbnRlbnREaWZmZXJlbnRpYWxDb21wYXJpc29uUmVzdWx0IHtcclxuICAgICAgICBsZXQgdW5tYXRjaGVkID0gY2Qubm91bnMuc2xpY2UoKTtcclxuICAgICAgICBsZXQgbWF0Y2hpbmcgPSB0aGlzLm5vdW5zLnNsaWNlKCk7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IG1hdGNoaW5nLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGsgPSB1bm1hdGNoZWQubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChDb250ZW50RGlmZmVyZW50aWFsLmNvbXBhcmVOb3VucyhtYXRjaGluZ1tpXSwgdW5tYXRjaGVkW2tdKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHVubWF0Y2hlZC5zcGxpY2UoaywgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hpbmcuc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIG1hdGNoaW5nIDogbWF0Y2hpbmcsXHJcbiAgICAgICAgICAgIHVubWF0Y2hlZCA6IHVubWF0Y2hlZFxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNjb3JlICgpIHtcclxuICAgICAgICBsZXQgaGlnaGVzdCA9IDA7XHJcbiAgICAgICAgbGV0IGNvdW50ID0gdGhpcy5ub3Vucy5sZW5ndGg7XHJcblxyXG4gICAgICAgIHRoaXMubm91bnMuZm9yRWFjaCgobm91bikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgbGV2ZWwgPSBDb250ZW50RGlmZmVyZW50aWFsLmdldE5vdW5MZXZlbChub3VuKTtcclxuICAgICAgICAgICAgaWYgKGhpZ2hlc3QgPCBsZXZlbCkge1xyXG4gICAgICAgICAgICAgICAgaGlnaGVzdCA9IGxldmVsO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJldHVybiBoaWdoZXN0ICsgKGNvdW50IC8gMTAwKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldE5vdW5MZXZlbCAobm91biA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nIHwgQ29udGVudERpZmZlcmVudGlhbCB8IENvbnRlbnRNYXJrZXIpIHtcclxuICAgICAgICBpZiAobm91biA9PSB1bmRlZmluZWQgfHwgbm91biA9PSBudWxsKSB7XHJcbiAgICAgICAgICAgIHJldHVybiAwO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIG5vdW4gPT0gXCJmdW5jdGlvblwiKSB7XHJcbiAgICAgICAgICAgIGlmICg8YW55Pm5vdW4ucHJvdG90eXBlIGluc3RhbmNlb2YgVGhpbmcpIHtcclxuICAgICAgICAgICAgICAgIGxldCBzcGVjaWZpdHkgPSAyOyAvLyBWYWd1ZSBUaGluZ1xyXG4gICAgICAgICAgICAgICAgbGV0IHBhcmVudENsYXNzID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKG5vdW4pO1xyXG4gICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudENsYXNzICE9IFRoaW5nKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc3BlY2lmaXR5ICs9IDAuMTtcclxuICAgICAgICAgICAgICAgICAgICBwYXJlbnRDbGFzcyA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihwYXJlbnRDbGFzcyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gc3BlY2lmaXR5O1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIDIuNTsgLy8gSXQncyBub3QgYSBcIlRoaW5nXCIsIHNvIGl0J3MgcHJvYmFibHkgYSB3ZWlyZCBjbGFzcywgd2hpY2ggaXMga2luZCBvZiBzcGVjaWZpY1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIGlmIChub3VuIGluc3RhbmNlb2YgVGhpbmcpIHtcclxuICAgICAgICAgICAgcmV0dXJuIDQ7IC8vIFNwZWNpZmljIHRoaW5nXHJcbiAgICAgICAgfSBlbHNlIGlmIChub3VuIGluc3RhbmNlb2YgQ29udGVudERpZmZlcmVudGlhbCkge1xyXG4gICAgICAgICAgICByZXR1cm4gMTsgLy8gTWlub3IgdGhpbmdcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gMC41O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGNvbXBhcmVOb3VucyAoYSA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nIHwgQ29udGVudERpZmZlcmVudGlhbCB8IENvbnRlbnRNYXJrZXIsIGIgOiBUaGluZyB8IHR5cGVvZiBUaGluZyB8IENvbnRlbnREaWZmZXJlbnRpYWwgfCBDb250ZW50TWFya2VyKSB7XHJcbiAgICAgICAgaWYgKGEgPT0gdW5kZWZpbmVkIHx8IGEgPT0gbnVsbCkge1xyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKHR5cGVvZiBhID09IFwiZnVuY3Rpb25cIikge1xyXG4gICAgICAgICAgICAvLyBiIG11c3QgaW5oZXJpdCBhIG9yIGJlIGFcclxuICAgICAgICAgICAgcmV0dXJuIGIgPT0gYSB8fCBiIGluc3RhbmNlb2YgYSB8fCAodHlwZW9mIGIgPT0gXCJmdW5jdGlvblwiICYmICg8YW55PmIpLnByb3RvdHlwZSBpbnN0YW5jZW9mIGEpXHJcbiAgICAgICAgfSBlbHNlIGlmIChhIGluc3RhbmNlb2YgVGhpbmcpIHtcclxuICAgICAgICAgICAgLy8gYiBtdXN0IGJlIGFcclxuICAgICAgICAgICAgcmV0dXJuIGIgPT0gYTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGEgPT09IGI7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBpc01hdGNoIChtYXRjaEZyb20gOiBBcnJheTxDb250ZW50RGlmZmVyZW50aWFsPiwgbWF0Y2hBZ2FpbnN0IDogQXJyYXk8Q29udGVudERpZmZlcmVudGlhbD4pIHtcclxuICAgICAgICBsZXQgdW5tYXRjaGVkID0gbWF0Y2hBZ2FpbnN0LnNsaWNlKCk7XHJcbiAgICAgICAgbGV0IG1hdGNoaW5nID0gbWF0Y2hGcm9tLnNsaWNlKCk7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IG1hdGNoaW5nLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGsgPSB1bm1hdGNoZWQubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChtYXRjaGluZ1tpXS5pc01hdGNoKHVubWF0Y2hlZFtrXSkpIHtcclxuICAgICAgICAgICAgICAgICAgICB1bm1hdGNoZWQuc3BsaWNlKGssIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hdGNoaW5nLnNwbGljZShpLCAxKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodW5tYXRjaGVkLmxlbmd0aCA9PSAwICYmIG1hdGNoaW5nLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodW5tYXRjaGVkLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBvbmx5IHRoaW5nIG1pc3NpbmcgYXJlIHVuaW1wb3J0YW50IENvbnRlbnRNYXJrZXJzXHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbWF0Y2hpbmcubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBub3VucyA9IG1hdGNoaW5nW2ldLmdldE5vdW5zKCk7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBrID0gMDsgayA8IG5vdW5zLmxlbmd0aDsgaysrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEobm91bnNba10gaW5zdGFuY2VvZiBDb250ZW50TWFya2VyKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCg8Q29udGVudE1hcmtlcj4gbm91bnNba10pLmlzSW1wb3J0YW50KCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAvLyBOb3RoaW5nIGltcG9ydGFudCBmb3VuZFxyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgfVxyXG59IiwiZW51bSBDb250ZW50R3JvdXBNYXRjaCB7XG4gICAgTk9fTUFUQ0gsXG4gICAgUEFSVElBTF9NQVRDSCxcbiAgICBQRVJGRUNUX01BVENIXG59XG5cbmludGVyZmFjZSBDb250ZW50R3JvdXBNYXRjaFJlc3VsdCB7XG4gICAgdHlwZSA6IENvbnRlbnRHcm91cE1hdGNoO1xuICAgIHVubWF0Y2hlZCA6IEFycmF5PENvbnRlbnRVbml0Pjtcbn1cblxuY2xhc3MgQ29udGVudEdyb3VwIHtcbiAgICBwcml2YXRlIHVuaXRzIDogQXJyYXk8Q29udGVudFVuaXQ+ID0gW107XG4gICAgcHJpdmF0ZSBtYXRjaGluZyA6IEFycmF5PENvbnRlbnRVbml0Pjtcblx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gICAgICAgICB1bm1hdGNoZWQuc3BsaWNlKGssIDEpO1xuICAgICAgICAgICAgICAgICAgICBtYXRjaGluZy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlIDogbWF0Y2hpbmcubGVuZ3RoID4gMCA/IENvbnRlbnRHcm91cE1hdGNoLk5PX01BVENIIDpcbiAgICAgICAgICAgICAgICAgICAgdW5tYXRjaGVkLmxlbmd0aCA9PSAwID8gQ29udGVudEdyb3VwTWF0Y2guUEVSRkVDVF9NQVRDSCA6XG4gICAgICAgICAgICAgICAgICAgICAgICBDb250ZW50R3JvdXBNYXRjaC5QQVJUSUFMX01BVENILFxuICAgICAgICAgICAgdW5tYXRjaGVkIDogdW5tYXRjaGVkXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0U2NvcmUgKCkge1xuICAgICAgICBsZXQgc2NvcmUgPSAwO1xuICAgICAgICB0aGlzLnVuaXRzLmZvckVhY2godW5pdCA9PiB7XG4gICAgICAgICAgICBzY29yZSArPSB1bml0LmdldFNjb3JlKCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBzY29yZTtcbiAgICB9XG5cbiAgICBwdWJsaWMgbWF0Y2hBZ2FpbnN0IChhIDogQXJyYXk8Q29udGVudEdyb3VwPikgOiBBcnJheTxudW1iZXI+IHtcbiAgICAgICAgbGV0IG1hdGNoZXMgPSBbXTtcbiAgICAgICAgdGhpcy5yZXNldCgpO1xuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGxldCBtYXRjaCA9IGFbaV0uaXNNYXRjaCh0aGlzKTtcbiAgICAgICAgICAgIGlmIChtYXRjaC50eXBlICE9IENvbnRlbnRHcm91cE1hd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1xyXG4gICAgICAgIH0gZWxzZSBpZiAobm9kZS50eXBlID09IE5vZGVUeXBlLlRleHQpIHtcclxuICAgICAgICAgICAgbGV0IHNheSA9ICg8RGlhbG9ndWVUZXh0PiBub2RlKS5nZXRTYXkoKTtcclxuICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50QXNDb250ZW50KHNheSk7XHJcbiAgICAgICAgfSBlbHNlIGlmIChub2RlLnR5cGUgPT0gTm9kZVR5cGUuU2V0KSB7XHJcbiAgICAgICAgICAgIGxldCBydW5uaW5nU2V0ID0gKDxEaWFsb2d1ZVNldD4gbm9kZSkucnVuKCk7XHJcbiAgICAgICAgICAgIGlmIChydW5uaW5nU2V0IGluc3RhbmNlb2YgUHJvbWlzZSkge1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgcnVubmluZ1NldDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKGRvQ2hvaWNlcykge1xyXG4gICAgICAgICAgICAvLyBOZXh0IG5vZGUgaXMgZGVjaWRlZCBieSB0aGUgY2hvaWNlc1xyXG4gICAgICAgICAgICBsZXQgYnJhbmNoaW5nRGlhbG9ndWUgPSBuZXcgQnJhbmNoaW5nRGlhbG9ndWUoKTtcclxuICAgICAgICAgICAgbGV0IGNob2ljZXMgPSBub2RlLmNob2ljZXM7XHJcbiAgICAgICAgICAgIGxldCBvcHRpb25zID0gW107XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY2hvaWNlcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgbGV0IGNob2ljZSA9IDxEaWFsb2d1ZUNob2ljZT4gdGhpcy5nZXROb2RlKGNob2ljZXNbaV0pO1xyXG4gICAgICAgICAgICAgICAgbGV0IGJyYW5jaGluZ09wdGlvbiA9IG5ldyBCcmFuY2hpbmdPcHRpb24oY2hvaWNlLmdldFNheSgpLCBjaG9pY2UuaXN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cmluZycgJiYgcnVsZXNbeF0uc2VsZWN0b3JUZXh0ID09IFwiLlwiICsgdGhpcy5iYWNrZ3JvdW5kSW1hZ2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlVuYWJsZSB0byByZWFkIGltYWdlXCIpO1xyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzQ29ubmVjdGFibGVPbiAob3Bwb3NpdGVEaXJlY3Rpb24gOiBudW1iZXIpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5jb25uZWN0YWJsZU9uLmluZGV4T2Yob3Bwb3NpdGVEaXJlY3Rpb24pICE9IC0xO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyB0cmlja3lDb2RlIDogKG9wdGlvbnMgOiBUcmlja3lPcHRpb25zKSA9PiBib29sZWFuO1xyXG5cclxuICAgIHB1YmxpYyBnZXRBbnlEaXJlY3Rpb24gKG9wdGlvbnMgOiBUcmlja2llck9wdGlvbnMpIDogVHJpY2t5T3B0aW9ucyB7XHJcbiAgICAgICAgbGV0IGRpcmVjdGlvblNodWZmbGVyID0gbmV3IFNodWZmbGVyPG51bWJlcj4odGhpcy5jb25uZWN0YWJsZU9uKTtcclxuICAgICAgICBmb3IgKGxldCBkaXJlY3Rpb24gPSBkaXJlY3Rpb25TaHVmZmxlci5nZXRPbmUoKTsgZGlyZWN0aW9uICE9IHVuZGVmaW5lZDsgZGlyZWN0aW9uID0gZGlyZWN0aW9uU2h1ZmZsZXIuZ2V0T25lKCkpIHtcclxuICAgICAgICAgICAgbGV0IG9wcG9zaXRlRGlyZWN0aW9uID0gT3Bwb3NpdGVEaXJlY3Rpb25bRGlyZWN0aW9uW2RpcmVjdGlvbl1dO1xyXG4gICAgICAgICAgICBsZXQgb3RoZXJDb29yZGluYXRlcyA9IG9wdGlvbnMubWFwLmdldENvb3JkaW5hdGVzKG9wdGlvbnMub3RoZXJSb29tKTtcclxuICAgICAgICAgICAgbGV0IHdvdWxkYmVDb29yZGluYXRlcyA9IFJvb20uc2hpZnQob3RoZXJDb29yZGluYXRlcywgb3Bwb3NpdGVEaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICBsZXQgdHJpY2t5T3B0aW9ucyA9IHtcclxuICAgICAgICAgICAgICAgIG90aGVyUm9vbSA6IG9wdGlvbnMub3RoZXJSb29tLFxyXG4gICAgICAgICAgICAgICAgb3RoZXJSb29tRGlyZWN0aW9uIDogb3Bwb3NpdGVEaXJlY3Rpb24sXHJcbiAgICAgICAgICAgICAgICB0cmlja3lSb29tRGlyZWN0aW9uIDogZGlyZWN0aW9uLFxyXG4gICAgICAgICAgICAgICAgbWFwIDogb3B0aW9ucy5tYXAsXHJcbiAgICAgICAgICAgICAgICByZWdpb24gOiBvcHRpb25zLnJlZ2lvbixcclxuICAgICAgICAgICAgICAgIHggOiB3b3VsZGJlQ29vcmRpbmF0ZXNbMF0sXHJcbiAgICAgICAgICAgICAgICB5IDogd291bGRiZUNvb3JkaW5hdGVzWzFdXHJcbiAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICBpZiAodGhpcy5pc1BsYWNlYWJsZSh0cmlja3lPcHRpb25zKSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRyaWNreU9wdGlvbnM7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzUGxhY2VhYmxlIChvcHRpb25zIDogVHJpY2t5T3B0aW9ucykge1xyXG4gICAgICAgIGlmICghdGhpcy5pc0Nvbm5lY3RhYmxlT24ob3B0aW9ucy50cmlja3lSb29tRGlyZWN0aW9uKSB8fCAhb3B0aW9ucy5tYXAuaXNGcmVlKG9wdGlvbnMueCwgb3B0aW9ucy55KSkge1xyXG4gICAgICAgICAgICAvLyBUaGlzIGNhbid0IGNvbm5lY3QgdGhyb3VnaCB0aGF0IVxyXG4gICAgICAgICAgICAvLyBUaGF0IGNvb3JkaW5hdGUgaXNuJ3QgZnJlZSFcclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKG9wdGlvbnMub3RoZXJSb29tID09IHVuZGVmaW5lZCB8fCAhb3B0aW9ucy5vdGhlclJvb20uaXNDb25uZWN0YWJsZU9uKG9wdGlvbnMub3RoZXJSb29tRGlyZWN0aW9uKSkge1xyXG4gICAgICAgICAgICAvLyBUaGVyZSBpcyBubyBvdGhlciByb29tIHRoZXJlP1xyXG4gICAgICAgICAgICAvLyBUaGUgb3RoZXIgcm9vbSBkb2Vzbid0IGxpa2UgaXQgdGhpcyB3YXlcclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gRG8gSSBoYXZlIG15IG93biB0cmlja3kgY29kZT9cclxuICAgICAgICBpZiAodGhpcy50cmlja3lDb2RlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy50cmlja3lDb2RlKG9wdGlvbnMpO1xyXG4gICAgICAgIH1cclxuXHJcblxyXG4gICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXREaXN0YW5jZVRvIChyb29tIDogUm9vbVJhbmRvbSkge1xyXG4gICAgICAgIGxldCBteUNvb3JkaW5hdGVzID0gdGhpcy5sYXN0TWFwLmdldENvb3JkaW5hdGVzKHRoaXMpO1xyXG4gICAgICAgIGxldCBvdGhlckNvb3JkaW5hdGVzID0gdGhpcy5sYXN0TWFwL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VybiBNYXRoLmFicyhjMVswXSAtIGMyWzBdKSArIE1hdGguYWJzKGMxWzFdIC0gYzJbMV0pO1xyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIGxldCBuZWlnaGJvcnMgPSAocm9vbSA6IFJvb21SYW5kb20sIHggOiBudW1iZXIsIHkgOiBudW1iZXIpID0+IHtcclxuICAgICAgICAgICAgbGV0IG5laWdocyA9IFtdO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBkaXJlY3Rpb24gPSAwOyBkaXJlY3Rpb24gPCByb29tLmNvbm5lY3Rpb25zLmxlbmd0aDsgZGlyZWN0aW9uKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBvdGhlclJvb20gPSByb29tLmNvbm5lY3Rpb25zW2RpcmVjdGlvbl07XHJcbiAgICAgICAgICAgICAgICBpZiAob3RoZXJSb29tICE9IHVuZGVmaW5lZCAmJiBvcGVuLmluZGV4T2Yob3RoZXJSb29tKSA9PSAtMSAmJiB2YWxpZFJvb20oPFJvb21SYW5kb20+IG90aGVyUm9vbSkpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyQ29vcmRpbmF0ZXMgPSBSb29tLnNoaWZ0KFt4LCB5XSwgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyID0gW290aGVyUm9vbSwgZGlyQ29vcmRpbmF0ZXMsIGRpc3RhbmNlKGVuZFBvc2l0aW9uLCBkaXJDb29yZGluYXRlcyldO1xyXG4gICAgICAgICAgICAgICAgICAgIG5laWdocy5wdXNoKGRpcik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIG5laWdocy5zb3J0KChhLGIpID0+IHsgcmV0dXJuICg8bnVtYmVyPiBhWzJdKSAtICg8bnVtYmVyPiBiWzJdKTt9KTtcclxuICAgICAgICB9O1xyXG5cclxuXHJcbiAgICAgICAgbGV0IHNob3J0ZXN0UGF0aCA9IHtcclxuICAgICAgICAgICAgbGVuZ3RoIDogbWFwLmdldFJvb21Db3VudCgpXHJcbiAgICAgICAgfTtcclxuICAgICAgICBsZXQgbm9QYXRoID0gc2hvcnRlc3RQYXRoO1xyXG4gICAgICAgIGxldCBjUGF0aCA9IFtdO1xyXG4gICAgICAgIGxldCBmaW5kUGF0aCA9IChteUFycmF5KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCByb29tID0gbXlBcnJheVswXTtcclxuICAgICAgICAgICAgY1BhdGgucHVzaChteUFycmF5KTtcclxuICAgICAgICAgICAgaWYgKHJvb20gPT0gcGF0aEVuZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHNob3J0ZXN0UGF0aC5sZW5ndGggPj0gY1BhdGgubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2hvcnRlc3RQYXRoID0gY1BhdGguc2xpY2UoMCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2hvcnRlc3RQYXRoLmxlbmd0aCA+IChjUGF0aC5sZW5ndGgpKSB7XHJcbiAgICAgICAgICAgICAgICBvcGVuLnB1c2gocm9vbSk7XHJcbiAgICAgICAgICAgICAgICBsZXQgb3RoZXJSb29tcyA9IG5laWdoYm9ycyhyb29tLCBteUFycmF5WzFdWzBdLCBteUFycmF5WzFdWzFdKTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgb3RoZXJSb29tcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1BhdGgubGVuZ3RoICsgMSkgPCBzaG9ydGVzdFBhdGgubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbmRQYXRoKG90aGVyUm9vbXNbaV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIG9wZW4ucG9wKCk7XHJcbiAgICAgIC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zBdKSArIE1hdGguYWJzKGMxWzFdIC0gYzJbMV0pO1xyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIGxldCBpc1Zpc2l0ZWQgPSAocm9vbSkgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4gdmlzaXRlZC5pbmRleE9mKHJvb20pICE9IC0xO1xyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIGxldCBnZXROZWlnaGJvcnMgPSAobm9kZSA6IFJvb21SYW5kb21Ob2RlKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBuZWlnaGJvcnMgOiBBcnJheTxSb29tUmFuZG9tTm9kZT4gPSBbXTtcclxuICAgICAgICAgICAgZm9yIChsZXQgZGlyZWN0aW9uID0gMDsgZGlyZWN0aW9uIDwgbm9kZS5yb29tLmNvbm5lY3Rpb25zLmxlbmd0aDsgZGlyZWN0aW9uKyspIHtcclxuICAgICAgICAgICAgICAgIGlmIChub2RlLnJvb20uY29ubmVjdGlvbnNbZGlyZWN0aW9uXSAhPSB1bmRlZmluZWQgJiYgIWlzVmlzaXRlZChub2RlLnJvb20uY29ubmVjdGlvbnNbZGlyZWN0aW9uXSkgJiYgdmFsaWRSb29tKDxSb29tUmFuZG9tPiBub2RlLnJvb20uY29ubmVjdGlvbnNbZGlyZWN0aW9uXSkpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgY29vcmRpbmF0ZXMgPSBSb29tLnNoaWZ0KG5vZGUuY29vcmRpbmF0ZXMsIGRpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgbmVpZ2hib3JzLnB1c2goe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByb29tIDogPFJvb21SYW5kb20+IG5vZGUucm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA6IGNvb3JkaW5hdGVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkaXN0YW5jZSA6IGRpc3RhbmNlKGNvb3JkaW5hdGVzLCBlbmROb2RlLmNvb3JkaW5hdGVzKVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHZpc2l0ZWQucHVzaCg8Um9vbVJhbmRvbT4gbm9kZS5yb29tLmNvbm5lY3Rpb25zW2RpcmVjdGlvbl0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBuZWlnaGJvcnM7XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IGdldENsb3Nlc3RQYXRoID0gKCkgPT4ge1xyXG4gICAgICAgICAgICBsZXQgc2hvcnRlc3QgPSAwO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMTsgaSA8IG9wZW4ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBsYXN0UG9pbnQgPSBvcGVuW2ldW29wZW5baV0ubGVuZ3RoIC0gMV07XHJcbiAgICAgICAgICAgICAgICBpZiAobGFzdFBvaW50LmRpc3RhbmNlIDwgb3BlbltzaG9ydGVzdF1bb3BlbltzaG9ydGVzdF0ubGVuZ3RoIC0gMV0uZGlzdGFuY2UpIHtcclxuICAgICAgICAgICAgICAgICAgICBzaG9ydGVzdCA9IGk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIHNob3J0ZXN0O1xyXG4gICAgICAgIH07XHJcblxyXG5cclxuICAgICAgICBsZXQgZW5kTm9kZSA9IHtyb29tIDogb3RoZXJSb29tLCBjb29yZGluYXRlcyA6IHRoaXMubGFzdE1hcC5nZXRDb29yZGluYXRlcyhvdGhlclJvb20pLCBkaXN0YW5jZSA6IDB9O1xyXG4gICAgICAgIGxldCBzdGFydENvb3JkaW5hdGVzID0gdGhpcy5sYXN0TWFwLmdldENvb3JkaW5hdGVzKHRoaXMpO1xyXG4gICAgICAgIG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ICAgIC8vIGxhenksIGZpcnN0IHBhdGggaXMgdmVyeSBsaWtlbHkgdG8gYmUgdGhlIGJlc3RcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgbGV0IG5laWdoYm9ycyA9IGdldE5laWdoYm9ycyhteVBhdGhbbXlQYXRoLmxlbmd0aCAtIDFdKTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbmVpZ2hib3JzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgb3Blbi5wdXNoKG15UGF0aC5jb25jYXQoW25laWdoYm9yc1tpXV0pKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gb3Blbi5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKG9wZW5baV0ubGVuZ3RoID49IHNob3J0ZXN0UGF0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIG9wZW4uc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNsb3Nlc3QgPSBnZXRDbG9zZXN0UGF0aCgpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIGNsb3NlZFtzaG9ydGVzdEluZGV4XTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0QVN0YXJCZXN0RGlyZWN0aW9uVG8gKG90aGVyUm9vbSA6IFJvb21SYW5kb20sIHZhbGlkUm9vbT8gOiAocm9vbSA6IFJvb21SYW5kb20pID0+IGJvb2xlYW4pIHtcclxuICAgICAgICBsZXQgcGF0aCA9IHRoaXMuZ2V0QVN0YXJQYXRoVG8ob3RoZXJSb29tLCB2YWxpZFJvb20pO1xyXG4gICAgICAgIGlmIChwYXRoIC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ZXNUb0FkZCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEFueUZyb21DYWNoZSAoZGlyZWN0aW9uIDogbnVtYmVyKSA6IFJvb21SYW5kb20ge1xyXG4gICAgICAgIGxldCBhcnJheSA9IHRoaXMuYXZhaWxhYmxlQ29ubmVjdGlvbnNbZGlyZWN0aW9uXTtcclxuICAgICAgICBpZiAoYXJyYXkubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICBsZXQgcmFuZG9tSW5kZXggPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiAoYXJyYXkubGVuZ3RoKSk7XHJcbiAgICAgICAgICAgIGxldCByYW5kb21Db29yZGluYXRlcyA9IGFycmF5W3JhbmRvbUluZGV4XTtcclxuICAgICAgICAgICAgaWYgKHJhbmRvbUNvb3JkaW5hdGVzICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0Um9vbShyYW5kb21Db29yZGluYXRlcy54LCByYW5kb21Db29yZGluYXRlcy55KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgaXNGcmVlICh4IDogbnVtYmVyLCB5IDogbnVtYmVyKSB7XHJcbiAgICAgICAgcmV0dXJuICh0aGlzLnBvc2l0aW9uVGFibGVbeF0gPT0gdW5kZWZpbmVkIHx8IHRoaXMucG9zaXRpb25UYWJsZVt4XVt5XSA9PT0gdW5kZWZpbmVkKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgYmxvY2sgKHggOiBudW1iZXIsIHkgOiBudW1iZXIpIHtcclxuICAgICAgICBpZiAodGhpcy5pc0ZyZWUoeCwgeSkpIHtcclxuICAgICAgICAgICAgaWYgKHRoaXMucG9zaXRpb25UYWJsZVt4XSA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMucG9zaXRpb25UYWJsZVt4XSA9IHt9O1xyX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G9zaXRlRGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlRnJvbUNhY2hlKHNoaWZ0ZWRNYXAsIG9wcG9zaXRlRGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRSb29tICh4IDogbnVtYmVyLCB5IDogbnVtYmVyKSB7XHJcbiAgICAgICAgaWYgKHRoaXMucG9zaXRpb25UYWJsZVt4XSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgaWYgKHRoaXMucG9zaXRpb25UYWJsZVt4XVt5XSAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5wb3NpdGlvblRhYmxlW3hdW3ldO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldENvb3JkaW5hdGVzIChyb29tIDogUm9vbSkgOiBBcnJheTxudW1iZXI+IHtcclxuICAgICAgICByZXR1cm4gdGhpcy5yb29tTWFwLmdldChyb29tKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0Um9vbUNvdW50ICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5yb29tTWFwLnNpemU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFdpZHRoICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5oaWdoZXN0WCAtIHRoaXMubG93ZXN0WDtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0SGVpZ2h0ICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5oaWdoZXN0WSAtIHRoaXMubG93ZXN0WTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3Rhd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GNvZGUgOiBhc3luYyBydW5uZXIgPT4ge1xyXG4gICAgICAgICAgICBsZXQgcmVnaW9uID0gPFJlZ2lvblJhbmRvbT4gcnVubmVyLm5vdW47XHJcblxyXG4gICAgICAgICAgICBsZXQgcm9vbVNodWZmbGVyID0gbmV3IFNodWZmbGVyKFxyXG4gICAgICAgICAgICAgICAgUmVnaW9uLkluUmVsYXRpb24uZ2V0QWxsUmlnaHRUeXBlcyhyZWdpb24sIFJvb21SYW5kb20pLmZpbHRlcigocm9vbSA6IFJvb21SYW5kb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcm9vbS5yYW5kb21pemFibGUgJiYgIXJvb20ucGxhY2VkICYmXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIChyb29tID09IFdvcmxkU3RhdGUucGxheWVyLmdldFJvb20oKSB8fCAoUmVnaW9uUmFuZG9tLnJuZygpICogMTAwKSA8PSByb29tLmFwcGVhckNoYW5jZSk7XHJcbiAgICAgICAgICAgICAgICB9KSwgUmVnaW9uUmFuZG9tLnJuZ1xyXG4gICAgICAgICAgICApO1xyXG5cclxuICAgICAgICAgICAgZm9yIChsZXQgcm9vbSA9IHJvb21TaHVmZmxlci5nZXRPbmUoKTsgcm9vbSAhPSB1bmRlZmluZWQ7IHJvb20gPSByb29tU2h1ZmZsZXIuZ2V0T25lKCkpIHtcclxuICAgICAgICAgICAgICAgIC8vIFByZXZlbnQgYXZhaWxhYmxlIGNvbm5lY3Rpb25zIGZyb20gZ2V0dGluZyB0b28gbG93XHJcbiAgICAgICAgICAgICAgICAvLyBJZiB3ZSdyZSBwbGFjaW5nIHJvb21zIHdpdGggdG9vIGZldyBhdmFpbGFibGVDb25uZWN0aW9ucywgd2UgbWlnaHQgZW5kIHVwIHJlYWNoaW5nIDAgYXZhaWxhYmxlQ29ubmVjdGlvbnNcclxuICAgICAgICAgICAgICAgIC8vIFdoaWNoIHdvdWxkIG1lYW4gbm8gbW9yZSByb29tcyBjYW4gYmUgcGxhY2VkLlxyXG4gICAgICAgICAgICAgICAgd2hpbGUgKHJlZ2lvbi5tYXAucm9vbXMgPiAwICYmIHJlZ2lvbi5tYXAuZ2V0QXZhaWxhYmxlQ29ubmVjdGlvbnMoKSA8IDQpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZm9kZGVyID0gbmV3IHJlZ2lvbi5mb2RkZXJSb29tQ2xhc3MoKTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgb3B0aW9ucyA9IDxSYW5kb21pemluZ1Jvb21PcHRpb25zPiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcCA6IHJlZ2lvbi5tYXAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvb20gOiBmb2RkZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lvbiA6IHJlZ2lvblxyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvbi5wbGFjZShmb2RkZXIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tCZWZvcmVQbGFjZVJvb20uZXhlY3V0ZSh7bm91biA6IG9wdGlvbnN9KTtcclxuICAgICAgICAgICAgICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uZXhlY3V0ZSh7bm91biA6IG9wdGlvbnN9KTtcclxuICAgICAgICAgICAgICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tBZnRlclBsYWNlUm9vbS5leGVjdXRlKHtub3VuIDogb3B0aW9uc30pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGxldCBvcHRpb25zID0gPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXAgOiByZWdpb24ubWFwLFxyXG4gICAgICAgICAgICAgICAgICAgIHJvb20gOiByb29tLFxyXG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvbiA6IHJlZ2lvblxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIGF3YWl0IFJlZ2lvblJhbmRvbS5ydWxlYm9va0JlZm9yZVBsYWNlUm9vbS5leGVjdXRlKHtub3VuIDogb3B0aW9uc30pO1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgUmVnaW9uUmFuZG9tLnJ1bGVib29rUGxhY2VSb29tLmV4ZWN1dGUoe25vdW4gOiBvcHRpb25zfSk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tBZnRlclBsYWNlUm9vbS5leGVjdXRlKHtub3VuIDogb3B0aW9uc30pO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICghcm9vbS5wbGFjZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnRBc0Vycm9yKG5ldyBTYXkoXCJXYXMgdW5hYmxlIHRvIHBsYWNlIHJvb20gXCIsIHJvb20sIFwiLiBHYW1lIG1pZ2h0IGJlIHVucGxheWFibGUuXCIpKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgcnVsZUFkZEV4dHJhQ29ubmVjdGlvbnMgPSBSZWdpb25SYW5kb20ucnVsZWJvb2tSYW5kb21pemVSZWdpb24uY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfTE9XRVNULFxyXG4gICAgICAgIG5hbWUgOiBcIkFkZCBleHRyYSBjb25uZWN0aW9ucyB0byByb29tcyBpbiByZWdpb25cIixcclxuICAgICAgICBjb2RlIDogcnVubmVyID0+IHtcclxuICAgICAgICAgICAgbGV0IHJlZ2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cmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvdGhlclJvb20gPSByZWdpb24ubWFwLmdldFJvb20ob3RoZXJDb29yZGluYXRlc1swXSwgb3RoZXJDb29yZGluYXRlc1sxXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvdGhlclJvb20gIT0gdW5kZWZpbmVkICYmIG90aGVyUm9vbS5yYW5kb21pemFibGVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG90aGVyUm9vbS5pc0Nvbm5lY3RhYmxlT24oT3Bwb3NpdGVEaXJlY3Rpb25bRGlyZWN0aW9uW2RpcmVjdGlvbl1dKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgKFJlZ2lvblJhbmRvbS5ybmcoKSAqIDEwMCkgPD0gb3RoZXJSb29tLmV4dHJhQ29ubmVjdGlvbkNoYW5jZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcm9vbS5tYXBSb29tKG90aGVyUm9vbSwgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBydWxlUGxhY2VGaXJzdFJvb20gPSBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiUGxhY2luZyBGaXJzdCByb29tIHNvbWV0aGluZ1wiLFxyXG4gICAgICAgIGZpcnN0UHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX0hJR0hFU1QsXHJcbiAgICAgICAgY29kZSA6IHJ1bm5lciA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwbGFjaW5nT3B0aW9ucyA9IDxSYW5kb21pemluZ1Jvb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gICAgcGxhY2luZ09wdGlvbnMucm9vbS5tYXBSb29tKGNvbm5lY3RhYmxlUm9vbSwgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICBwbGFjaW5nT3B0aW9ucy5tYXAubWFwKHBsYWNpbmdPcHRpb25zLnJvb20sIG15Q29vcmRpbmF0ZXNbMF0sIG15Q29vcmRpbmF0ZXNbMV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb25kaXRpb25zIDogcnVubmVyID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIHJ1bm5lci5ub3VuLnJvb20udHJpY2t5Q29kZSA9PSB1bmRlZmluZWQ7XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBydWxlUGxhY2VUcmlja3lSb29tID0gUmVnaW9uUmFuZG9tLnJ1bGVib29rUGxhY2VSb29tLmNyZWF0ZUFuZEFkZFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIlBsYWNpbmcgdHJpY2t5IHJvb20gc29tZXRoaW5nXCIsXHJcbiAgICAgICAgY29kZSA6IHJ1bm5lciA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwbGFjaW5nT3B0aW9ucyA9IDxSYW5kb21pemluZ1Jvb21PcHRpb25zPiBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IHBsYWNlZFJvb21zID0gPEFycmF5PFJvb21SYW5kb20+PiBwbGFjaW5nT3B0aW9ucy5yZWdpb24uZ2V0Um9vbXMoKS5maWx0ZXIoKHJvb20pID0+IHtcclxuICAgICAgICAgICAgICAgIHJldHVybiByb29tIGluc3RhbmNlb2YgUm9vbVJhbmRvbSAmJiByb29tLnBsYWNlZDtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICBpZiAocGxhY2VkUm9vbXMubGVuZ3RoID09IDApIHtcclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzRXJyb3IoXCJVbmFibGUgdG8gcGxhY2Ugcm9vbSBcIiArIHBsYWNpbmdPcHRpb25zLnJvb20uZ2V0UHJpbnRlZE5hbWUoKSArIFwiOiBUaGVyZSBhcmUgbm8gcm9vbXMgdG8gY29ubmVjdCB0byFcIik7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGxldCByb29tU2h1ZmZsZXIgPSBuZXcgU2h1ZmZsZXIocGxhY2VkUm9vbXMsIFJlZ2lvblJhbmRvbS5ybmcpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBjb25uZWN0YWJsZVJvb20gPSByb29tU2h1ZmZsZXIuZ2V0T25lKCk7IGNvbm5lY3RhYmxlUm9vbSAhPSB1bmRlZmluZWQ7IGNvbm5lY3RhYmxlUm9vbSA9IHJvb21TaHVmZmxlci5nZXRPbmUoKSkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHRyaWNraWVyID0gPFRyaWNraWVyT3B0aW9ucz4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvbiA6IHBsYWNpbmdPcHRpb25zLnJlZ2lvbixcclxuICAgICAgICAgICAgICAgICAgICBtYXAgOiBwbGFjaW5nT3B0aW9ucy5tYXAsXHJcbiAgICAgICAgICAgICAgICAgICAgb3RoZXJSb29tIDogY29ubmVjdGFibGVSb29tXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgbGV0IHRyaWNreSA9IHBsYWNpbmdPcHRpb25zLnJvb20uZ2V0QW55RGlyZWN0aW9uKHRyaWNraWVyKTtcclxuICAgICAgICAgICAgICAgIGlmICh0cmlja3kgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMucm9vbS5tYXBSb29tKGNvbm5lY3RhYmxlUm9vbSwgdHJpY2t5LnRyaWNreVJvb21EaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC5tYXAocGxhY2luZ09wdGlvbnMucm9vbSwgdHJpY2t5LngsIHRyaWNreS55KTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gVEhJUyBXT1JLU1xyXG4gICAgICAgICAgICAvLyBJIERPTidUIEtOT1cgV0hZXHJcbiAgICAgICAgICAgIC8vIEkgRE9OJ1QgQ0FSRSBXSFlcclxuICAgICAgICAgICAgLy8gTEVBVkVcclxuICAgICAgICAgICAgbGV0IGNvbm5lY3RhYmxlVGhyb3VnaEZvZGRlciA9IChmb2RkZXJTdGVwIDogbnVtYmVyLCBjb25uZWN0aW5nUm9vbSA6IFJvb21SYW5kb20pID0+IHtcclxuICAgICAgICAgICAgICAgIGxldCB0cmlja2llciA9IDxUcmlja2llck9wdGlvbnM+IHtcclxuICAgICAgICAgICAgICAgICAgICByZWdpb24gOiBwbGFjaW5nT3B0aW9ucy5yZWdpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgbWFwIDogcGxhY2luZ09wdGlvbnMubWFwLFxyXG4gICAgICAgICAgICAgICAgICAgIG90aGVyUm9vbSA6IGNvbm5lY3RpbmdSb29tXHJcbiAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgIGlmIChmb2RkZXJTdGVwID09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGxhY2luZ09wdGlvbnMucm9vbS5nZXRBbnlEaXJlY3Rpb24odHJpY2tpZXIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbmV3Rm9kZGVyID0g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aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZvZGRlclRyaWNreSA9IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG90aGVyUm9vbSA6IGNvbm5lY3RpbmdSb29tLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3RoZXJSb29tRGlyZWN0aW9uIDogb3Bwb3NpdGVEaXJlY3Rpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmlja3lSb29tRGlyZWN0aW9uIDogZGlyZWN0aW9uLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwIDogcGxhY2luZ09wdGlvbnMubWFwLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVnaW9uIDogcGxhY2luZ09wdGlvbnMucmVnaW9uLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeCA6IHdvdWxkYmVDb29yZGluYXRlc1swXSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHkgOiB3b3VsZGJlQ29vcmRpbmF0ZXNbMV1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdGb2RkZXIuaXNQbGFjZWFibGUoZm9kZGVyVHJpY2t5KSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3Rm9kZGVyLm1hcFJvb20oY29ubmVjdGluZ1Jvb20sIGZvZGRlclRyaWNreS50cmlja3lSb29tRGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC5tYXAobmV3Rm9kZGVyLCBmb2RkZXJUcmlja3kueCwgZm9kZGVyVHJpY2t5LnkpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXh0VHJpY2t5ID0gY29ubmVjdGFibGVUaHJvdWdoRm9kZGVyKGZvZGRlclN0ZXAgLSAxLCBuZXdGb2RkZXIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5leHRUcmlja3kgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMucmVnaW9uLnBsYWNlKG5ld0ZvZGRlcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5leHRUcmlja3k7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0ZvZGRlci51bm1hcFJvb20oZm9kZGVyVHJpY2t5LnRyaWNreVJvb21EaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC51bm1hcChmb2RkZXJUcmlja3kueCwgZm9kZGVyVHJpY2t5LnkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgZm9yIChsZXQgZm9kZGVyTGV2ZWwgPSAxOyBmb2RkZXJMZXZlbCA8IDEwOyBmb2RkZXJMZXZlbCsrKSB7XHJcbiAgICAgICAgICAgICAgICByb29tU2h1ZmZsZXIucmVzdGFydCgpO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgY29ubmVjdGFibGVSb29tID0gcm9vbVNodWZmbGVyLmdldE9uZSgpOyBjb25uZWN0YWJsZVJvb20gIT0gdW5kZWZpbmVkOyBjb25uZWN0YWJsZVJvb20gPSByb29tU2h1ZmZsZXIuZ2V0T25lKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgdHJpY2t5ID0gY29ubmVjdGFibGVUaHJvdWdoRm9kZGVyKGZvZGRlckxldmVsLCBjb25uZWN0YWJsZVJvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0cmlja3kgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLnJvb20ubWFwUm9vbSh0cmlja3kub3RoZXJSb29tLCB0cmlja3kudHJpY2t5Um9vbURpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC5tYXAocGxhY2luZ09wdGlvbnMucm9vbSwgdHJpY2t5LngsIHRyaWNreS55KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnRBc0Vycm9yKFwiVW5hYmxlIHRvIHBsYWNlIHJvb20gXCIgKyBwbGFjaW5nT3B0aW9ucy5yb29tLmdldFByaW50ZWROYW1lKCkgKyBcIjogQWxsIGF0dGVtcHRzIGZhaWxlZFwiKTtcclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59IiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIlN0b3JlZFZhcmlhYmxlLnRzXCIgLz5cclxuaW50ZXJmYWNlIFNhdmVkRXZlbnRPcHRpb25zPFQ+IGV4dGVuZHMgU3RvcmVkVmFyaWFibGVPcHRpb25zPFQ+IHtcclxuICAgIGRlc2NyaXB0aW9uIDogc3RyaW5nO1xyXG4gICAgdmFsdWVEZXNjcmlwdGlvbiA6ICh2YWx1ZSA6IFQpID0+IHN0cmluZztcclxufVxyXG5cclxuY2xhc3MgU2F2ZWRFdmVudDxUPiBleHRlbmRzIFN0b3JlZFZhcmlhYmxlPFQ+IHtcclxu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AgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJUaGUgb3JjIGNoaWVmIGlzIGFsaXZlLlwiXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbik7XHJcbiIsImludGVyZmFjZSBUZXN0aW5nT3B0aW9ucyB7XHJcbiAgICBuYW1lIDogc3RyaW5nO1xyXG4gICAgdmFsdWUgOiBudW1iZXI7XHJcbn1cclxuXHJcbmNsYXNzIERpY2Uge1xyXG4gICAgcHJvdGVjdGVkIHJhbmdlIDogQXJyYXk8bnVtYmVyPiA9IFswLCAwLCAxLCAxXTtcclxuICAgIHB1YmxpYyBtaW5SZXN1bHQgPSAwO1xyXG4gICAgcHJvdGVjdGVkIHRlc3RTdHJpbmcgOiBzdHJpbmc7XHJcblxyXG4gICAgcHVibGljIGNvbnN0cnVjdG9yICh0ZXN0U3RyaW5nIDogc3RyaW5nKSB7XHJcbiAgICAgICAgdGhpcy50ZXN0U3RyaW5nID0gdGVzdFN0cmluZztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgcm9sbCAoc3RhdCA6IG51bWJlcikgOiBBcnJheTxudW1iZXI+ICB7XHJcbiAgICAgICAgbGV0IHJuZyA9IHRoaXMucmFuZ2Uuc2xpY2UoKTtcclxuICAgICAgICBpZiAoc3RhdCA+PSAxMCkge1xyXG4gICAgICAgICAgICBybmcucHVzaCgyLCAxKTtcclxuICAgICAgICB9IGVsc2UgaWYgKHN0YXQgPj0gNykge1xyXG4gICAgICAgICAgICBybmcucHVzaCgxLCAxKTtcclxuICAgICAgICB9IGVsc2UgaWYgKHN0YXQgPj0gNCkge1xyXG4gICAgICAgICAgICBybmcucHVzaCgxKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgbGV0IHJlc3VsdHMgPSBbXTtcclxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHN0YXQ7IGkrKykge1xyXG4gICAgICAgICAgICBsZXQgaW5kZXggPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiAocm5nLmxlbmd0aCkpO1xyXG4gICAgICAgICAgICByZXN1bHRzLnB1c2gocm5nW2luZGV4XSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBUT0RPOiBQcmludCB0aGUgZGljZSByZXN1bHRzIGlmIE1lbW9yeS5TaG93RGljZSA9IDFcclxuXHJcbiAgICAgICAgcmV0dXJuIHJlc3VsdHM7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBzdW0gKGEsIGIpIHtcclxuICAgICAgICByZXR1cm4gYSArIGI7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNheSAocmVzdWx0cyA6IEFycmF5PG51bWJlcj4pIDogU2F5IHtcclxuICAgICAgICBsZXQgZmluYWxSZXN1bHQgPSByZXN1bHRzLnJlZHVjZShEaWNlLnN1bSk7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBTYXkoXHJcbiAgICAgICAgICAgIG5ldyBTYXlCb2xkKFwiW1wiLCB0aGlzLnRlc3RTdHJpbmcsIFwiXSBcIiksXHJcbiAgICAgICAgICAgIFwiID0gW1wiLCByZXN1bHRzLmpvaW4oXCJdIFtcIiksIFwiXVwiLFxyXG4gICAgICAgICAgICByZXN1bHRzLmxlbmd0aCA9PSAxID8gXCJcIiA6XHJcbiAgICAgICAgICAgICAgICAoXCIgPSBcIiArIGZpbmFsUmVzdWx0KVxyXG4gICAgICAgICk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyB0ZXN0QWdhaW5zdFJvbGwgKHBsYXllciA6IFRlc3RpbmdPcHRpb25zLCBlbmVteSA6IFRlc3RpbmdPcHRpb25zKSA6IG51bWJlciB7XHJcbiAgICAgICAgbGV0IHBsYXllckRpY2UgPSBuZXcgRGljZShwbGF5ZXIubmFtZSk7XHJcbiAgICAgICAgbGV0IHBsYXllclJlc3VsdCA9IHBsYXllckRpY2Uucm9sbCh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gICAgICAgICAgICAgICAgICAgICAgKHJlc3VsdC5xdWFudGl0eU11bHRpcGxpZXIgKiBjb250YWluZXIubGlxdWlkQ29udGVudHMubGVuZ3RoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb250YWluZXIubGlxdWlkQ29udGVudHMubGVuZ3RoKTtcclxuXHJcblxyXG4gICAgICAgICAgICBjb250YWluZXIubGlxdWlkQ29udGVudHMgPSBuZXcgQXJyYXkoZmluYWxRdWFudGl0eSk7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZmluYWxRdWFudGl0eTsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBjb250YWluZXIubGlxdWlkQ29udGVudHNbaV0gPSByZXN1bHQucmVzdWx0O1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgZ2V0TWl4dHVyZXMgKCkge1xyXG4gICAgICAgIGlmIChMaXF1aWQuc29ydGVkTWl4dHVyZXMpIHtcclxuICAgICAgICAgICAgcmV0dXJuIExpcXVpZC5taXh0dXJlcztcclxuICAgICAgICB9XHJcbiAgICAgICAgTGlxdWlkLm1peHR1cmVzLnNvcnQoKGEsIGIpID0+IHtcclxuICAgICAgICAgICAgaWYgKGIuZmlyc3RQcmlvcml0eSA8IGEuZmlyc3RQcmlvcml0eSkgcmV0dXJuIC0xO1xyXG4gICAgICAgICAgICBpZiAoYS5maXJzdFByaW9yaXR5IDwgYi5maXJzdFByaW9yaXR5KSByZXR1cm4gMTtcclxuICAgICAgICAgICAgaWYgKGIucHJpb3JpdHkgPCBhLnByaW9yaXR5KSByZXR1cm4gLTE7XHJcbiAgICAgICAgICAgIGlmIChhLnByaW9yaXR5IDwgYi5wcmlvcml0eSkgcmV0dXJuIDE7XHJcbiAgICAgICAgICAgIHJldHVybiAwO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIExpcXVpZC5zb3J0ZWRNaXh0dXJlcyA9IHRydWU7XHJcbiAgICAgICAgcmV0dXJuIExpcXVpZC5taXh0dXJlcztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGFkZE1peHR1cmUobWl4dHVyZSA6IExpcXVpZE1peHR1cmUpIHtcclxuICAgICAgICBMaXF1aWQubWl4dHVyZXMucHVzaChtaXh0dXJlKTtcclxuICAgICAgICBMaXF1aWQuc29ydGVkTWl4dHVyZXMgPSBmYWxzZTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVEZWZhdWx0TWl4aW5nID0gTGlxdWlkLnJ1bGVib29rTWl4aW5nLmNyZWF0ZUFuZEFkZFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIk1peGluZyB0aHJvdWdoIE1peHR1cmVzXCIsXHJcbiAgICAgICAgY29kZSA6IHJ1bm5lciA9PiB7XHJcbiAgICAgICAgICAgIGlmIChydW5uZXIubm91bi5saXF1aWRDb250ZW50cy5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBsZXQgbWl4dHVyZSA6IExpcXVpZE1peHR1cmU7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgTGlxdWlkLm1peHR1cmVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBtaXh0dXJlID0gTGlxdWlkLm1peHR1cmVzW2ldO1xyXG4gICAgICAgICAgICAgICAgbGV0IHByb3BvcnRpb25zID0gW107XHJcbiAgICAgICAgICAgICAgICBsZXQgbWl4dHVyZUl0ZXJhdG9yID0gbWl4dHVyZS5xdWFudGl0aWVzLmVudHJpZXMoKTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IG1peHR1cmVMaXF1aWQgPSBtaXh0dXJlSXRlcmF0b3IubmV4dCgpOyAhbWl4dHVyZUxpcXVpZC5kb25lOyBtaXh0dXJlTGlxdWlkID0gbWl4dHVyZUl0ZXJhdG9yLm5leHQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBtaXh0dXJlVHlwZSA9IG1peHR1cmVMaXF1aWQudmFsdWVbMF07XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG1peHR1cmVRdWFudGl0eSA9IG1peHR1cmVMaXF1aWQudmFsdWVbMV07XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG1hdGNoZWRRdWFudGl0eSA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgcnVubmVyLm5vdW4ubGlxdWlkQ29udGVudHMuZm9yRWFjaCgobGlxdWlkVHlwZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxpcXVpZFR5cGUgPT0gbWl4dHVyZVR5cGUgfHxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodHlwZW9mIG1peHR1cmVUeXBlID09IFwiZnVuY3Rpb25cIiAmJlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGlxdWlkVHlwZSBpbnN0YW5jZW9mIG1peHR1cmVUeXBlIHx8IG1peHR1cmVUeXBlKGxpcXVpZFR5cGUpKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZWRRdWFudGl0eSsrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbWl4dHVyZVR5cGUgaXMgbm90IGFsd2F5cyBjYWxsYWJsZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxyX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YgKG15Q29vcmRpbmF0ZXMgIT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IFJvb20uRElSRUNUSU9OUy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGxldCBkaXJlY3Rpb24gPSBSb29tLkRJUkVDVElPTlNbaV07XG4gICAgICAgICAgICAgICAgaWYgKGRpcmVjdGlvbiAhPSBEaXJlY3Rpb24uTk9SVEgpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvb3JkaW5hdGVzID0gUm9vbS5zaGlmdChteUNvb3JkaW5hdGVzLCBkaXJlY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm1hcC5ibG9jayhjb29yZGluYXRlc1swXSwgY29vcmRpbmF0ZXNbMV0pO1xuICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA9IFJvb20uc2hpZnQoY29vcmRpbmF0ZXMsIGRpcmVjdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMubWFwLmJsb2NrKGNvb3JkaW5hdGVzWzBdLCBjb29yZGluYXRlc1sxXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSxcbiAgICBjb25kaXRpb25zIDogcnVubmVyID0+IHtcbiAgICAgICAgcmV0dXJuIHJ1bm5lci5ub3VuLnJvb20gPT0gc291dGhlc3RSb29tO1xuICAgIH1cbn0pKVxuXG5UaGluZy5DYXJyeVJlbGF0aW9uLnNldFJlbGF0aW9uKFdvcmxkU3RhdGUucGxheWVyLCBtYXBPZlRlc3QpO1xuXG4vLyBTZXR0aW5ncy5zZXREZWJ1ZyhmYWxzZSk7XG5QbGF5QmVnaW5zLnJ1bGVib29rLmFkZFJ1bGUobmV3IFJ1bGUoe1xuICAgIG5hbWUgOiBcInJhbmRvbWl6ZSByZWdpb25cIixcbiAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxuICAgIGNvZGUgOiBhc3luYyBydW5uZXIgPT4ge1xuICAgICAgICAvL2xldCB0MCA9IHBlcmZvcm1hbmNlLm5vdygpO1xuICAgICAgICBhd2FpdCByZWdpb24ucmFuZG9taXplKCk7XG4gICAgICAgIC8vbGV0IHQxID0gcGVyZm9ybWFuY2Uubm93KCk7XG4gICAgfVxufSkpO1xuXG5SZWdpb25SYW5kb20ucnVsZWJvb2tSYW5kb21pemVSZWdpb24uYWRkUnVsZShuZXcgUnVsZSh7XG4gICAgbmFtZSA6IFwiQWRkIHJvb20gQSBhbmQgQiB0byByZWdpb25cIixcbiAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxuICAgIGNvZGUgOiBhc3luYyBydW5uZXIgPT4ge1xuICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uZXhlY3V0ZSh7XG4gICAgICAgICAgICBub3VuIDogPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHtcbiAgICAgICAgICAgICAgICBtYXAgOiByZWdpb24ubWFwLFxuICAgICAgICAgICAgICAgIHJvb20gOiByb29tYSxcbiAgICAgICAgICAgICAgICByZWdpb24gOiByZWdpb25cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSkudGhlbigpO1xuICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uZXhlY3V0ZSh7XG4gICAgICAgICAgICBub3VuIDogPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHtcbiAgICAgICAgICAgICAgICBtYXAgOiByZWdpb24ubWFwLFxuICAgICAgICAgICAgICAgIHJvb20gOiByb29tYixcbiAgICAgICAgICAgICAgICByZWdpb24gOiByZWdpb25cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSkudGhlbigpO1xuICAgIH0sXG4gICAgY29uZGl0aW9ucyA6IHJ1bm5lciA9PiB7XG4gICAgICAgIHJldHV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gU0VMRUNURURcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgYXdhaXQgKHNheSkuZ2V0SFRNTChcInBcIiwgW1wiY2hvaWNlXCJdKS50aGVuKGVsZW1lbnRBcnJheSA9PiB7XHJcbiAgICAgICAgICAgICAgICBDb250cm9scy5MaW5rcy5tYWtlQ3VzdG9tTGluayhlbGVtZW50QXJyYXlbMF0sIHtcclxuICAgICAgICAgICAgICAgICAgICBtb3VzZW92ZXI6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRPcmlnaW4ob3JpZ2luKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIG1vdXNlb3V0OiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50T3JpZ2luKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBjbGljazogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDaGFyYWN0ZXJDcmVhdGlvbi5QbGF5ZXJPcmlnaW4udmFsdWUgPSBvcmlnaW4uaWQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc2V0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShlbGVtZW50QXJyYXlbMF0sIENvbnRyb2xzLktleUhhbmRsZXIuZ2V0U2Vjb25kS2V5Q29kZSgpKTtcclxuICAgICAgICAgICAgICAgIGxlZnRTaWRlLmFwcGVuZENoaWxkKGVsZW1lbnRBcnJheVswXSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBwcmludENvbmZpcm0gKCkge1xyXG4gICAgICAgIChuZXcgU2F5KFwiQ29uZmlybVwi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3RDaGlsZCk7XHJcblxyXG4gICAgICAgIGF3YWl0IChuZXcgU2F5KG5ldyBTYXlCb2xkKFwiUGVya3MgKENob29zZSBhbnkpOlwiKSkuZ2V0SFRNTENvbnRlbnQoKS50aGVuKGVsZXMgPT4ge1xyXG4gICAgICAgICAgICBlbGVzLmZvckVhY2goZWxlID0+IHtcclxuICAgICAgICAgICAgICAgIGxlZnRTaWRlLmFwcGVuZENoaWxkKGVsZSk7XHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgfSkpO1xyXG5cclxuICAgICAgICBsZXQgcGVya3MgPSBQZXJrLmdldFBlcmtzKCk7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwZXJrcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBsZXQgcGVyayA9IHBlcmtzW2ldO1xyXG4gICAgICAgICAgICBsZXQgc2F5ID0gbmV3IFNheShwZXJrLm5hbWUpO1xyXG4gICAgICAgICAgICBpZiAocGVyay5pc0VuYWJsZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHBlcmsuaXNGb3JjZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheS5hZGQgKFwiIChNYW5kYXRvcnkpXCIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKFwiIC0gU2VsZWN0ZWRcIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocGVyay5pc0ZvcmNlZCgpKSB7XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiIChGb3JiaWRkZW4pXCIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGF3YWl0IChzYXkpLmdldEhUTUwoXCJwXCIsIFtcImNob2ljZVwiXSkudGhlbihlbGVtZW50QXJyYXkgPT4ge1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuTGlua3MubWFrZUN1c3RvbUxpbmsoZWxlbWVudEFycmF5WzBdLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgbW91c2VvdmVyOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50UGVyayhwZXJrKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIG1vdXNlb3V0OiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVtcHR5UGVyaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgY2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFwZXJrLmlzRm9yY2VkKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBlcmsudmFsdWUgPSAhcGVyay52YWx1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNldCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5hcHBseUNvZGUoZWxlbWVudEFycmF5WzBdLCBDb250cm9scy5LZXlIYW5kbGVyLmdldFNlY29uZEtleUNvZGUoKSk7XHJcbiAgICAgICAgICAgICAgICBsZWZ0U2lkZS5hcHBlbmRDaGlsZChlbGVtZW50QXJyYXlbMF0pO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcHJpbnRDb25maXJtICgpIHtcclxuICAgICAgICAobmV3IFNheShcIkNvbmZpcm1cIikpLmdldEhUTUwoXCJwXCIsIFtcImNob2ljZVwiXSkudGhlbihlbGVtZW50QXJyYXkgPT4ge1xyXG4gICAgICAgICAgICBlbGVtZW50QXJyYXlbMF0uYWRkRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsICgpID0+IHtcclxuICAgICAgICAgICAgICAgIHJlc29sdmVyKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShlbGVtZW50QXJyYXlbMF0sIENvbnRyb2xzLktleUhhbmRsZXIuZ2V0U2Vjb25kS2V5Q29kZSgpKTtcclxuICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50KGVsZW1lbnRBcnJheVswXSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gZW1wdHlQZXJrICgpIHtcclxuICAgICAgICB3aGlsZSAocmlnaHRTaWRlLmZpcnN0Q2hpbGQpIHJpZ2h0U2lkZS5yZW1vdmVDaGlsZChyaWdodFNpZGUuZmlyc3RDaGlsZCk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcHJpbnRQZXJrIChwZXJrIDogUGVyaykge1xyXG4gICAgICAgIGxldCBzYXkgPSBuZXcgU2F5KHBlcmsuZGVzY3JpcHRpb24pO1xyXG4gICAgICAgIHNheS5nZXRIVE1MQ29udGVudCgpLnRoZW4oKGVsZXMgPT4ge1xyXG4gICAgICAgICAgICBlbXB0eVBlcmsoKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICByaWdodFNpZGUuYXBwZW5kQ2hpbGQoZWxlc1tpXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcmVzZXQgKCkge1xyXG4gICAgICAgIFBlcmsudXBkYXRlUGVya3MoKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIuY2xlYXIoKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoY2NEaXYpO1xyXG4gICAgICAgIHByaW50VGFibGUoKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImJyXCIpKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImJyXCIpKTtcclxuICAgICAgICBwcmludENvbmZpcm0oKTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgbGV0IENDUGVyayA9IENoYXJhY3RlckNyZWF0aW9uLnJ1bGVib29rLmNyZWF0ZUFuZEFkZFJ1bGUoe1xyXG4gICAgICAgIG5hbWU6IFwiQ2hhcmFjdGVyIENyZWF0aW9uIC0gT3JpZ2luXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eTogUnVsZS5QUklPUklUWV9MT1csXHJcbiAgICAgICAgcHJpb3JpdHk6IFJ1bGUuUFJJT1JJVFlfSElHSCxcclxuICAgICAgICBjb2RlOiBhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgIEVsZW1lbnRzLnN0YXJ0TWVudSgpO1xyXG5cclxuICAgICAgICAgICAgbGV0IHByb21pc2UgPSBuZXcgUHJvbWlzZShyZXNvbHZlID0+IHtcclxuICAgICAgICAgICAgICAgIHJlc29sdmVyID0gcmVzb2x2ZTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXNldCgpO1xyXG5cclxuICAgICAgICAgICAgYXdhaXQgcHJvbWlzZTtcclxuXHJcbiAgICAgICAgICAgIGxldCBwZXJrcyA9IFBlcmsuZ2V0UGVya3MoKTtcclxuICAgICAgICAgICAgcGVya3MuZm9yRWFjaChwZXJrID0+IHtcclxuICAgICAgICAgICAgICAgIGlmIChwZXJrLmlzRW5hYmxlZCgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGVyay5jb25maX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IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgKDxIdW1hbm9pZD4gV29ybGRTdGF0ZS5wbGF5ZXIpLmFkZE1hbGVQYXJ0cygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICg8SHVtYW5vaWQ+IFdvcmxkU3RhdGUucGxheWVyKS5hZGRGZW1hbGVQYXJ0cygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAvLyBTb21lIHN0YXRzIGJlY29tZSBkaWZmZXJlbnQgd2hldGhlciB0ZSBwbGF5ZXIgaXMgbWFsZSBvciBmZW1hbGUsIHNvIHdlIGhhdmUgdG8gdXBkYXRlIHRoZW0gYWxsLlxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBvdGhlcklucHV0cyA9IGNjRGl2LmdldEVsZW1lbnRzQnlUYWdOYW1lKFwiaW5wdXRcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBvdGhlcklucHV0cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3RoZXJJbnB1dCA9IG90aGVySW5wdXRzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob3RoZXJJbnB1dCAhPSBpbnB1dCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3RoZXJJbnB1dC5kaXNwYXRjaEV2ZW50KG5ldyBFdmVudChcImNoYW5nZVwiKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2UoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSkpO1xyXG5cclxuXHJcblxyXG4gICAgICAgICAgICBjY0xlZnQuYXBwZW5kQ2hpbGQoY3JlYXRlUmFuZ2Uoe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CB2YWx1ZSA6IG51bWJlciwgaW5wdXQgOiBIVE1MSW5wdXRFbGVtZW50KSA9PiB7XHJcbiAgICAgICAgICAgICAgICBwbGF5ZXIuc2V0U3RhdChhdHRyLCB2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICBsZXQgcmVtYWluaW5nID0gbWF4U3RhdHNcclxuICAgICAgICAgICAgICAgICAgICAtIHBsYXllci5nZXRTdGF0KEF0dHJpYnV0ZXMuU3RyZW5ndGgpXHJcbiAgICAgICAgICAgICAgICAgICAgLSBwbGF5ZXIuZ2V0U3RhdChBdHRyaWJ1dGVzLkFnaWxpdHkpXHJcbiAgICAgICAgICAgICAgICAgICAgLSBwbGF5ZXIuZ2V0U3RhdChBdHRyaWJ1dGVzLkludGVsbGlnZW5jZSlcclxuICAgICAgICAgICAgICAgICAgICAtIHBsYXllci5nZXRTdGF0KEF0dHJpYnV0ZXMuQ2hhcm0pO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmIChyZW1haW5pbmcgPCAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgKz0gcmVtYWluaW5nO1xyXG4gICAgICAgICAgICAgICAgICAgIHJlbWFpbmluZyA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQudmFsdWUgPSB2YWx1ZS50b1N0cmluZygpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlucHV0LmRpc3BhdGNoRXZlbnQobmV3IEV2ZW50KFwiY2hhbmdlXCIpKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgc3RhdHNSZW1haW5pbmcubm9kZVZhbHVlID0gKHJlbWFpbmluZyA9PSAwID8gXCJEb25lXCIgOlxyXG4gICAgICAgICAgICAgICAgICAgIHJlbWFpbmluZyA+IDEgPyByZW1haW5pbmcudG9TdHJpbmcoKSArIFwiIHBvaW50cyByZW1haW5pbmdcIiA6XHJcbiAgICAgICA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SwgdmFsdWUsIGlucHV0KTtcclxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZSgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgICAgICBsZXQgY3JlYXRpb25Eb25lID0gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcclxuICAgICAgICAgICAgICAgIChuZXcgU2F5KFwiQ29uZmlybVwiKSkuZ2V0SFRNTChcInBcIiwgW1wiY2hvaWNlXCJdKS50aGVuKGVsZW1lbnRBcnJheSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudEFycmF5WzBdLmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEVsZW1lbnRzLmVuZE1lbnUoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIENvbnRyb2xzLktleUhhbmRsZXIuYXBwbHlDb2RlKGVsZW1lbnRBcnJheVswXSwgQ29udHJvbHMuS2V5SGFuZGxlci5nZXRTZWNvbmRLZXlDb2RlKCkpO1xyXG4gICAgICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludChlbGVtZW50QXJyYXlbMF0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50KGNjRGl2KTtcclxuXHJcbiAgICAgICAgICAgIHJldHVybiBjcmVhdGlvbkRvbmU7XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG5cclxuICAgIC8vIFRPRE86IFBpY2sgb3JpZ2luXHJcbiAgICAvLyBUT0RPOiBQaWNrIFBlcmtzXHJcbn0iLC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